Installation

Rainer Glaschick edited this page May 16, 2014 · 16 revisions

Prerequisites

You need Java 7. We recommend using the Open JDK, but the Oracle JDK is fine, too. If you use the Oracle JDK, you should install the "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files", too!

Extract the archive

There is no installer - it is not needed, because all you have to do is download and extract the appropriate archive.

On the client side, you need - obviously - the client archive.

On the server side, you need the server archive only. It already contains the client and the command line tool you need for administration purposes.

It is recommended that you always download the tar.gz archive(s), because the "*.tar.gz" files are smaller than their corresponding "*.zip" files and they preserve the executable flags of the executable files (scripts).

Downloading and extracting is already sufficient! You can now use the CloudStore-commands referencing them like this:

<downloadDirectory>/cloudstore/bin/cloudstore

or

<downloadDirectory>/cloudstore/bin/cloudstore-server

Personal installation on a GNU/Linux

However, you might want to invoke the cloudstore command without a qualified path. Hence, here is how you can make a real installation for your current user:

Extract + move to ~/bin/cloudstore

If you don't have a bin directory in your home, yet, create it by opening a terminal and entering the following command:

mkdir ~/bin

The tilde ("~") is an abbreviation for $HOME - both point to your home directory (e.g. "/home/myname").

You then extract the archive and move the extracted directory. The following command assumes that you downloaded the file "co.codewizards.cloudstore.client-<version>-bin.tar.gz" to your ~/Downloads folder:

cd ~/Downloads
tar xzf co.codewizards*.tar.gz
mv cloudstore ~/bin/

The last command moves the folder "cloudstore" into the bin directory inside your user's home.

Add ~/bin/cloudstore/bin to your PATH

Edit your ~/.profile file and add the line "export PATH=$HOME/bin/cloudstore/bin:$PATH" to it via the following commands:

echo >> ~/.profile
echo 'export PATH=$HOME/bin/cloudstore/bin:$PATH' >> ~/.profile

The next time you log in to your system, you'll have cloudstore in your path.

To apply this to the current shell (without logging out and in again), simply source the file:

. ~/.profile

Note: The dot (".") is an abbreviation of the source command.

System-wide installation on a GNU/Linux

Instead of a personal installation usable by one user only, you might prefer a system-wide installation:

Extract + move to /opt/cloudstore

For a system-wide installation, it is recommended that you extract and move the archive to /opt/cloudstore.

cd ~/Downloads
cp co.codewizards*.tar.gz /tmp/
sudo -i
cd /tmp
tar xzf co.codewizards*.tar.gz
mkdir /opt
mv cloudstore /opt/

The above commands first copy the cloudstore-archive from your user's Downloads directory into /tmp/. Then the sudo command acquires root privileges by opening a root-login-shell. If you don't use an Ubuntu-like system, you might need to use the command su - instead (please consult your distro's documentation about acquiring root privileges). Once being root, you're allowed to write into /opt/.

After the above commands, the CloudStore server is located in /opt/cloudstore/.

Add /opt/cloudstore/bin to your PATH

Most current GNU/Linux distros have a /etc/profile.d directory. You can add files there instead of modifying the /etc/profile which is clearly recommended. Thus, as root you create the file "/etc/profile.d/cloudstore.sh", with one single line setting the PATH and make the new file executable:

sudo -i
cd /etc/profile.d
echo 'export PATH=/opt/cloudstore/bin:$PATH' > cloudstore.sh
chmod +x cloudstore.sh

The next time, you log-in to your system, CloudStore's scripts are in your PATH and you thus have the cloudstore command available everywhere.

To apply this to the current shell (without logging out and in again), simply source the file:

. /etc/profile.d/cloudstore.sh

Note: The dot (".") is an abbreviation of the source command.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.