<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.umiacs.umd.edu/adapt/index.php?action=history&amp;feed=atom&amp;title=Chronopolis%3ABeta_SRB_Installation</id>
	<title>Chronopolis:Beta SRB Installation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.umiacs.umd.edu/adapt/index.php?action=history&amp;feed=atom&amp;title=Chronopolis%3ABeta_SRB_Installation"/>
	<link rel="alternate" type="text/html" href="https://wiki.umiacs.umd.edu/adapt/index.php?title=Chronopolis:Beta_SRB_Installation&amp;action=history"/>
	<updated>2026-04-07T10:54:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.7</generator>
	<entry>
		<id>https://wiki.umiacs.umd.edu/adapt/index.php?title=Chronopolis:Beta_SRB_Installation&amp;diff=1821&amp;oldid=prev</id>
		<title>Toaster at 17:00, 11 September 2008</title>
		<link rel="alternate" type="text/html" href="https://wiki.umiacs.umd.edu/adapt/index.php?title=Chronopolis:Beta_SRB_Installation&amp;diff=1821&amp;oldid=prev"/>
		<updated>2008-09-11T17:00:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Software Location==&lt;br /&gt;
&lt;br /&gt;
* SRB host: chronopolis-mcat.umiacs.umd.edu&lt;br /&gt;
* SRB installation: /export/srb/srb&lt;br /&gt;
* SRB Unix account: mcat&lt;br /&gt;
* SRB Vault location: /export/vault01/vault&lt;br /&gt;
* SRB Postgres backups: /export/vault01/backups&lt;br /&gt;
* SRB zone: chronopolis-umiacs&lt;br /&gt;
* SRB Domain:  umiacs&lt;br /&gt;
* SRB Admin User: umiacsSrbAdmin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SRB Installation==&lt;br /&gt;
&lt;br /&gt;
===Software===&lt;br /&gt;
&lt;br /&gt;
Download the following into /export/srb/srb:&lt;br /&gt;
* [http://www.sdsc.edu/srb/tarfiles/SRB3.4.1rele_bf.tar SRB Source code]&lt;br /&gt;
* [http://www.sdsc.edu/srb/tarfiles/install.pl srb installation script]&lt;br /&gt;
* [http://www.sdsc.edu/srb/tarfiles/gen_uuid.c gen_uuid.c]&lt;br /&gt;
* [ftp://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-07.03.0200.tar.gz PostGres ODBC Driver]&lt;br /&gt;
* [ftp://ftp.postgresql.org/pub/source/v7.4.8/postgresql-7.4.8.tar.gz Postgres 7.4.8]&lt;br /&gt;
* [http://freshmeat.net/redir/database/18016/url_tgz/pg_backup.sh Postgres backup script]&lt;br /&gt;
&lt;br /&gt;
===Configuration===&lt;br /&gt;
&lt;br /&gt;
In the install.pl edit the following variables and set to the values below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$SRB_FILE=&amp;quot;SRB3.4.1.tar&amp;quot;&lt;br /&gt;
$SRB_FILE_ALREADY_DECRYPTED=1;&lt;br /&gt;
$POSTGRES_FILE=&amp;quot;postgresql-7.4.8.tar.gz&amp;quot;;&lt;br /&gt;
$YOUR_ADMIN_PW=&amp;quot;adminpw&amp;quot;;&lt;br /&gt;
$YOUR_DOMAIN=&amp;quot;umiacs&amp;quot;;&lt;br /&gt;
$YOUR_ZONE=&amp;quot;chronopolis-umiacs&amp;quot;;&lt;br /&gt;
$RESOURCE_NAME=&amp;quot;chronopolis-mcat-unix1&amp;quot;;&lt;br /&gt;
$RESOURCE_DIR=&amp;quot;/export/vault01/vault&amp;quot;;&lt;br /&gt;
$SRB_PORT=&amp;quot;7618&amp;quot;;&lt;br /&gt;
$IP_ADDRESS_LOCALHOST=&amp;quot;chronopolis-mcat.umiacs.umd.edu&amp;quot;;&lt;br /&gt;
$SRB_COMMPORTS=&amp;quot;1&amp;quot;;&lt;br /&gt;
$SRB_COMMNUM=&amp;quot;200&amp;quot;;&lt;br /&gt;
$SRB_COMMSTART=&amp;quot;20000&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
around line 1053, change the host allow statement to use localhost&lt;br /&gt;
&lt;br /&gt;
runCmdNoLog(0,&amp;quot;echo host all all 128.8.120.45 255.255.255.255 trust | cat &amp;gt;&amp;gt; $postgresData/pg_hba.conf&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
Now, do the actual installation. This is a bit of a mess since we have to apply patches and from that I can tell, install.pl doesn&amp;#039;t let you apply patches prior to doing the install. (All this done from /export/srb/srb)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mcat@naraapp03 srb]$ openssl enc -d -bf-cbc -in SRB3.4.1rele_bf.tar -out SRB3.4.1.tar&lt;br /&gt;
enter bf-cbc decryption password:&lt;br /&gt;
[mcat@naraapp03 srb]$ perl install.pl &lt;br /&gt;
This script is install.pl version 3.x, last updated June 28, 2005&lt;br /&gt;
This host is chronopolis-mcat.umiacs.umd.edu&lt;br /&gt;
This host full network name is chronopolis-mcat.umiacs.umd.edu&lt;br /&gt;
This host full network address is chronopolis-mcat.umiacs.umd.edu&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
Some examples for testing and learning about the SRB are at:&lt;br /&gt;
http://www.sdsc.edu/srb/Edinburgh-Tutorials-May-2004/scmds.txt .&lt;br /&gt;
If your MCAT becomes slow, see index and vacuum options (top of script)&lt;br /&gt;
To use the SRB Scommands set your path to include the binaries:&lt;br /&gt;
set path=(/export/srb/srb/SRB3_4_1/utilities/bin $path)&lt;br /&gt;
Then Sinit, Sls, Sput, Sexit, etc should work.&lt;br /&gt;
To stop the the postgres and srb servers, run &amp;#039;install.pl stop&amp;#039;&lt;br /&gt;
To restart the postgres and srb servers, run &amp;#039;install.pl start&amp;#039;&lt;br /&gt;
To show the postgres and srb server processes, run &amp;#039;install.pl ps&amp;#039;&lt;br /&gt;
For man pages (csh): alias Sman &amp;#039;man -M /export/srb/srb/SRB3_4_1/utilities/man&amp;#039;&lt;br /&gt;
All done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Patching===&lt;br /&gt;
&lt;br /&gt;
Install the uuid generation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[mcat@naraapp03 srb]$ perl install.pl stop&lt;br /&gt;
This script is install.pl version 3.x, last updated June 28, 2005&lt;br /&gt;
This host is chronopolis-mcat.umiacs.umd.edu&lt;br /&gt;
This host full network name is chronopolis-mcat.umiacs.umd.edu&lt;br /&gt;
This host full network address is chronopolis-mcat.umiacs.umd.edu&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
running: /export/srb/srb/pgsql/bin/pg_ctl stop &lt;br /&gt;
Done stopping SRB and Postgres servers&lt;br /&gt;
Done at install.pl line 411.&lt;br /&gt;
[mcat@naraapp03 srb]$ cp gen_uuid.c SRB3_4_1/src/lib/gen_uuid.c &lt;br /&gt;
[mcat@naraapp03 srb]$ cd SRB3_4_1&lt;br /&gt;
[mcat@naraapp03 SRB3_4_1]$ make install&lt;br /&gt;
gcc -c -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPORTNAME_linux -DPARA_OPR=1 -DFED_MCAT  -I./src/include  -DMYSRB -DMCAT_VERSION_20 -DCOMM_PORT_NUM_START=20000 -DCOMM_PORT_NUM_COUNT=200 -DSRB_DATADIR=&amp;#039;&amp;quot;../data&amp;quot;&amp;#039; &lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
mkdir: cannot create directory `/export/srb/srb/SRBInstall&amp;#039;: File exists&lt;br /&gt;
chmod 755 /export/srb/srb/SRBInstall/data/lockDir /export/srb/srb/SRBInstall/data/CVS&lt;br /&gt;
[mcat@naraapp03 SRB3_3_1]$ cd ..&lt;br /&gt;
[mcat@naraapp03 srb]$ perl install.pl start&lt;br /&gt;
This script is install.pl version 3.x, last updated June 28, 2005&lt;br /&gt;
This host is narasrb01.umiacs.umd.edu&lt;br /&gt;
This host full network name is narasrb01.umiacs.umd.edu&lt;br /&gt;
...&lt;br /&gt;
[mcat@naraapp03 srb]$ set path=(/export/srb/srb/SRB3_4_1/utilities/bin $path)&lt;br /&gt;
[mcat@naraapp03 srb]$ Sinit -v&lt;br /&gt;
Using default Port 7618.&lt;br /&gt;
Client Release = SRB-3.4.1, API version = G.&lt;br /&gt;
Server Release = SRB-3.4.1, API version = G.&lt;br /&gt;
Client mcatZone = chronopolis-umiacs&lt;br /&gt;
Server mcatZone = chronopolis-umiacs&lt;br /&gt;
[mcat@naraapp01 srb]$ chmod 750 pg_backup.sh &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===PostGreSQL Tuning===&lt;br /&gt;
Now, we have to tune postgres a little bit.&lt;br /&gt;
&lt;br /&gt;
In /etc/sysctl.conf, add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# increase max shared memory to 1gb&lt;br /&gt;
kernel.shmmax=1073741824&lt;br /&gt;
kernel.shmall=1073741824&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can make it take affect immediately by running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[root@naraapp03 vault1]# echo 1073741824 &amp;gt; /proc/sys/kernel/shmmax &lt;br /&gt;
[root@naraapp03 vault1]# echo 1073741824 &amp;gt; /proc/sys/kernel/shmall &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In /etc/fstab, add &amp;#039;noatime&amp;#039; to the mount for /export/srb. In /export/srb/srb/pgsql/data/psotgresql.conf change the shared buffers to:&lt;br /&gt;
&lt;br /&gt;
shared_buffers = 114688&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==IPTables Config==&lt;br /&gt;
&lt;br /&gt;
In the UMfiles iptables config, create a new iptables-naraapp01 config and add the following lines after the allow for port 22&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
######&lt;br /&gt;
# tcp&lt;br /&gt;
[0:0] -A tcp_packets -p tcp -m tcp --dport 22 -j tcpallowed&lt;br /&gt;
[0:0] -A tcp_packets -p tcp -m tcp --dport 7618 -j tcpallowed&lt;br /&gt;
[0:0] -A tcp_packets -p tcp -m tcp --dport 20000:20200 -j tcpallowed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Database Backups==&lt;br /&gt;
&lt;br /&gt;
===Config===&lt;br /&gt;
&lt;br /&gt;
The postgresql databases are dumped and vacuumed nightly. The pg_backup.sh in /export/srb/srb is the script used to do this. It dumps backups to /export/vault1/backups. You can restore using the following command (substitute current backup where appropriate)&lt;br /&gt;
&lt;br /&gt;
In pg_backup.sh, edit the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
# Postgresql username to perform backups under.&lt;br /&gt;
postgresql_username=&amp;quot;mcat&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Postgresql password for the Postgresql username (if required).&lt;br /&gt;
postgresql_password=&amp;quot;password&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Postgresql hostname to connect to.&lt;br /&gt;
postgresql_hostname=&amp;quot;localhost&amp;quot;&lt;br /&gt;
&lt;br /&gt;
##################&lt;br /&gt;
# Locations      #&lt;br /&gt;
##################&lt;br /&gt;
#&lt;br /&gt;
# Location to place backups.&lt;br /&gt;
location_backup_dir=&amp;quot;/export/vault1/backups&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Location to place the pg_backup.sh logfile.&lt;br /&gt;
location_logfile=&amp;quot;/export/vault1/backups/dump.log&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Location of the psql binaries.&lt;br /&gt;
location_binaries=&amp;quot;/export/srb/srb/pgsql/bin&amp;quot;&lt;br /&gt;
&lt;br /&gt;
##################&lt;br /&gt;
# Permissions    #&lt;br /&gt;
##################&lt;br /&gt;
#&lt;br /&gt;
# Permissions for the backup location.&lt;br /&gt;
permissions_backup_dir=&amp;quot;0750&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Permissions for the backup files.&lt;br /&gt;
permissions_backup_file=&amp;quot;0640&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
# You must comment out the line below before using this script&lt;br /&gt;
#echo &amp;quot;You must set all values in the configuration section in this file then run ./pg_backup.sh configtest before using this script&amp;quot; &amp;amp;&amp;amp; exit 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now add it to cron&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
00 03 * * * /export/srb/srb/pg_backup.sh bva &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Restoring files===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gunzip /export/vault1/backups/July-2005/2005-07-01/10:38-postgresql_database-MCAT-backup.gz&lt;br /&gt;
pg_restore -d database -F c /export/vault1/backups/July-2005/2005-07-01/10:38-postgresql_database-MCAT-backup&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Toaster</name></author>
	</entry>
</feed>