This chapter explains the procedures taken to install AccelNET onto a RedHat Linux 9.0 system. All new accelerator control systems shipped from NEC should have AccelNET preinstalled.
Initial setup of RedHat Linux 9.0 is not covered.
To prepare the system you must be logged in, or su'd to root.
If you are not root, then su -
and type in the root password.
First, check for RedHat installed postgresql and postgresql-server packages.
root#
rpm -q postgresql-server
root#
rpm -q postgresql
If the packages are installed, you need to remove them.
Be careful of the order you remove the packages. It may complain about dependencies.
root#
rpm -e postgresql-devel
root#
rpm -e postgresql-jdbc
root#
rpm -e postgresql-odbc
root#
rpm -e postgresql-perl
root#
rpm -e postgresql-python
root#
rpm -e postgresql-server
root#
rpm -e postgresql-tcl
root#
rpm -e postgresql-test
root#
rpm -e php-pgsql
root#
rpm -e postgresql
Now that you have postgres removed, you can begin the AccelNET installation.
Continuing on from the Preperation section (as root), you must mount the AccelNET installation media. There are 2 methods of doing this.
Method 1 (AccelNET CDROM):
If /dev/cdrom does not exist, you will need to replace it with the proper CDROM device node.
root#
mount -t iso9660 /dev/cdrom /mnt/cdrom
Method 2 (NFS share on kitchen):
The machine must be properly configured for NEC's internal network and be plugged into the network.
root#
mount -t nfs kitchen:/acc.base /mnt/cdrom
You should now have the AccelNET installation media mounted to /mnt/cdrom. Next, a few libraries must be installed that are not standard in RedHat 9.0.
root#
cd /mnt/cdrom/redhat/8.0
root#
./install_libs
Now that the proper libraries are in place, AccelNET can actually be installed:
root#
cd /mnt/cdrom/installation
root#
./install_accelnet
If all went well, all of the needed files should be located in /AccelNET.
First, set initial passwords for the csadmin and postgres accounts:
root#
passwd csadmin
root#
passwd csoperator
root#
passwd postgres
Since you are using RedHat 9.0, the camac 'crate_24' command must be overwritten:
Not all of these commands are run as root, pay close attention to the examples! Not all of the chown and chmod commands may be necessary, but are included for completeness.
csadmin$
cp /AccelNET/necdrivers/rh9/crate_24 /AccelNET/sbin/crate_24
csadmin$
chown csadmin.cs_admin /AccelNET/sbin/crate_24
csadmin$
chmod 755 /AccelNET/sbin/crate_24
csadmin$
ln -s /AccelNET/sbin/crate_24 /AccelNET/sbin/crate
Next, the nec initialization script must be configured and installed.
root#
/AccelNET/necdrivers/build_nodes
root#
cp /AccelNET/necdrivers/nec /etc/init.d/nec
root#
chmod 755 /etc/init.d/nec
root#
cd /etc/init.d
root#
vi nec
Uncomment the lines to load and unload the device drivers needed for the specific machine.
For RedHat 9.0, you will need to insert the 'rh9' directory between the necdrivers and filename in the commands. (e.g. /sbin/insmod -f /AccelNET/necdrivers/rh9/f_ksc2915mod_24.o major=80) Make sure you use the _24.o files.
Insert the following line just after the 'chkconfig: 2345 92 92' line:
# description: NEC AccelNET device driver loading/unloading
Save the file and close vi.
Finally, add the init script to chkconfig:
root#
chkconfig --add nec
root#
chkconfig nec on
It is a good idea to reboot (type 'reboot' as root) at this point to make sure that the nec startup script is working and that postgres is starting properly. After rebooting, you can view the loaded modules by typing 'lsmod' and check for errors with 'dmesg'. To verify that postgres started properly, make sure that 'ps ax | grep postmaster' returns an entry with '/AccelNET/pgbin/bin/postmaster -S -D/AccelNET/postgres' or similar.