Some tips for Linux users.
Quick Installation instructions on Red Hat 8.0
Red Hat comes with 4Suite 0.11.1 still. You can safely remove it
As root:
rpm -e 4Suite
If you do not wish to use the repository, look at this Akara item on trimming what the 4Suite installer sets up).
Unpack 4Suite and install it as usual:
python setup.py install
If you do not wish to use the repository, you're ready to go. If you do want to use the repository, read on.
Use redhat-config-packages to install postgresql, or just mount the second CD and run:
rpm -i /mnt/cdrom/RedHat/RPMS/postgresql*
Then mount the third CD and run:
rpm -i /mnt/cdrom/RedHat/RPMS/postgresql-python* /mnt/cdrom/RedHat/RPMS/mx*
Create a user for the 4Suite daemon, say "ftserver":
createuser ftserver
Set permissions for that user in the library:
chown -R ftserver /usr/lib/python2.2/site-packages/Ft
Prepare a spot for daemon pid and log files:
mkdir /var/local/4ss chown ftserver /var/local/4ss
Use my 4Suite configuration helper to create a config file and save it as /usr/local/etc/4ss.conf. Then set permissions on it:
chown ftserver /usr/local/etc/4ss.conf
Then create a Postgres DBMS user for ftserver
su - postgres createuser ftserver exit
You have to at least give create database permissions.
Now edit the ftserver user's environment through the log in profile (usually ~/.bash_profile). Add the following at the end:
export FTSERVER_CONFIG_FILE=/usr/local/etc/4ss.conf export FT_DATABASE_DIR=/usr/lib/python2.2/site-packages/Ft/Share/Data export PATH=$PATH:$HOME/lib/python2.2/site-packages/Ft/Share/Bin/
Now switch to the ftserver user:
su - ftserver
And you can initialize the repository
4ss_manager init
And start it
4ss_manager start
Setting up the 4Suite repository to start on boot
I suggest the following script for 4Suite start-up
#!/bin/sh 4ss_manager stop --username=<username> --password=<password> 4ss_manager start --username=<username> --password=<password>
The script does an explicit stop because in some cases of unclean shutdown, 4Suite might not restart reliably without an explicit stop command.
Save this script in the home directory of the preferred 4Suite daemon user, and be sure the permissions on it are 600 so that other users cannot snoop on the 4Suite superuser password. For instance, if you save this as /home/ftserver/start-4ss.sh, then:
chmod 600 /home/ftserver/start-4ss.sh
Then run this script from a system startup file. For instance, on Red Hat, you might add the following to /etc/rc.d/rc.local:
su -c "/home/ftserver/start-4ss.sh" ftserver
Assuming "ftserver" is the 4Suite daemon user name.
If you need a similar script for shutdown, you can simply use:
#!/bin/sh 4ss_manager stop --username=<username> --password=<password>
If course, for people with System V style UNIX (such as Red Hat or Solaris), you should do things the more conventional way. The following is an init script for 4suite server. The following was contributed by Rich Long:
#!/bin/sh
if [ "$1" = "" -o "$1" = "start" ]
then
4ss_manager start --username=<username> --password=<password>
elif [ "$1" = "stop" ]
then
4ss_manager stop --username=<username> --password=<password>
else
echo "Usage: $0 [ start | stop ]"
fi
You would place this script in /etc/init.d . I suggest calling it "4ss".
Then in order to start or stop it at the right run levels, you would create symbolic links to /etc/rc[No title found].d/S[No title found]4ss . The priority for start up will have to be higher than that of any other daemons used, e.g. the Postgresql back end. The priority for shutdown will have to be lower.
For example, to start the repository in runlevel 3, and shut it down in run level 1, and given that Postgresql has a priority of 20, and shutdown priority of 80, you would create links as follows:
ln -s /etc/init.d/4ss /etc/rc3.d/S30_4ss ln -s /etc/init.d/4ss /etc/rc1.d/K30_4ss
I added the underscores for clarity.
