This type of installation requires more steps than the single user installation, requires superuser access to the installation host. However, it support multiple users accessing EyeDB databases and can start automaticaly EyeDB on machine boot.
The first step of the shared installation is to select, when configuring EyeDB, a prefix directory, usually empty, whose ownership will be given to a special user. It is a good practice to select a filename ending with
eyedb. For instance:
The default prefix (
/usr/local/eyedb) can perfectly be used.
The second step is to create a special Unix user that will own the installation directory and who will be used to run the EyeDB server. It is recommended that this user is a system user and has a disabled account that does not authorize to login. It is convenient to use 'eyedb' as user name.
On Debian distributions, this can be done using the adduser command, as in:
adduser --system --group --no-create-home eyedb
Adding system user `eyedb' (UID 115) ...
Adding new group `eyedb' (GID 129) ...
Adding new user `eyedb' (UID 115) with group `eyedb' ...
Not creating home directory `/home/eyedb'.
After creating this Unix user, the third step is to create the installation directory and give it the right permissions:
chown eyedb.eyedb /usr/local/eyedb
After building, install EyeDB by running make install. This will install the files in the directories specified when configuring EyeDB (here
/usr/local/eyedb, the default prefix).
Running make install must be done under the created Unix user. This can be done using for instance the su or sudo commands:
sudo -u eyedb make install
After installing EyeDB, a post-installation setup script must be run, as in the single user installation. This script is located in subdirectory
share/eyedb/tools under the
prefix directory and is named
Running this script must be done under the created Unix user, using for instance the su or sudo commands:
sudo -u eyedb /usr/local/eyedb/share/eyedb/tools/eyedb-postinstall.sh
==== Starting EyeDB server
Starting EyeDB Server
Compiled Aug 17 2009 16:40:17
Program Pid 31589
==== Creating EYEDBDBM database
==== Stopping EyeDB server
Killing EyeDB Server Pid 31589
The last step is to create EyeDB users to perform standard EyeDB tasks (creating databases, inserting and querying data...). Creating a EyeDB user and assigning this user permissions must be done under the created Unix user, using for instance the su or sudo commands:
sudo -u eyedb /usr/local/eyedb/sbin/eyedbctl startStarting EyeDB Server Version V2.8.8 Compiled Aug 17 2009 16:40:17 Architecture x86_64-unknown-linux-gnu Program Pid 31727
sudo -u eyedb /usr/local/eyedb/bin/eyedbadmin user add --strict-unix francois
sudo -u eyedb /usr/local/eyedb/bin/eyedbadmin user sysaccess francois dbcreate
/usr/local/eyedb/bin/eyedbadmin database create foo
/usr/local/eyedb/bin/eyedbadmin database list foo
Note that the last two commands are not run using sudo, as the created EyeDB user (here 'francois') has permission to create EyeDB databases.
The final step is to allow, on Linux systems, EyeDB to start automatically at boot time. A System-V init script is provided to start and stop EyeDB; this script is located after installation in
/usr/local/eyedb/share/eyedb/eyedb.rc (if prefix was
/usr/local/eyedb). This script uses only LSB logging function and can therefore be used on any Linux distribution. The following steps are needed:
copy the given script to the init scripts directory (for instance
/etc/init.d, but this may vary depending on your distribution)
update the system init scripts configuration by making the appropriate links between the runlevel directories and the init script (this is usually done by a distribution specific command such as update-rc.d or chkconfig