Note: Next revision cycle, start building everything into $HOME/\[app\]-\[version#\] and creating a symlink to $HOME/\[app\] so that there is no question about what the current, in use, directory is. |
Note: When downloading software to install in these instructions, always
download the source code, and avoid binary installers. Binary installers tend
to make inaccurate assumptions about what libraries you have installed on your
system, as well as other problems.
cd /opt tar -xzvf /root/openssl-0.9.8a.tar.gz cd openssl-0.9.8a ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl make make install |
openssl x509 -in /usr/local/ssl/certs/mitClient.crt -inform DER -outform \ PEM -out /usr/local/ssl/certs/mitCA.pem |
ps > /tmp/foo ps -elf >> /tmp/foo cd /usr/local/ssl/bin ./openssl genrsa -rand /tmp/foo 1024 >/usr/local/ssl/private/`hostname`-key.pem |
cd /usr/local/ssl/bin ./openssl req -key /usr/local/ssl/private/`hostname`-key.pem -new \ >../certs/`hostname`-req.pem |
Please be aware, the organization (O) is: Massachusetts Institute of Technology and the common name (CN) is the name of the server or service, including the domain name (.mit.edu). Also, some servers, such as Thalia servers, can represent an entire subdomain. These servers will need certificates issued with a wildcard in the domain name, such as \*.isda-thalia-1.mit.edu. Remember, if the server is a Thalia server, if will need a wildcard certificate and DNS record for \*.\[hostname\], and if it is doing any type of authentication, it will need a joint client/server certificate to be able to connect to the Shibboleth server (and have end users connect to it as well). |
cd /usr/local/ssl/bin ./openssl req -key /usr/local/ssl/private/`hostname`-key.pem -new \ -x509 -nodes >../certs/`hostname`-temp.cert |
openssl req -in ./req.pem -text |
openssl rsa -in /usr/local/ssl/private/`hostname`-key.pem -text |
openssl x509 -in /usr/localx/ssl/certs/`hostname`-cert.pem -text |
groupadd www useradd -g www -d /home/www -m -r -s /bin/bash www |
mkdir /home/www/weblib mkdir /home/www/etc cp -a /root/weblib /home/www/weblib scp -r root@trogdor.mit.edu:${REPOS_HOME}/System-configs/www-user/etc /home/www/etc cp /root/map-dev-ws1-new-keytab /home/www/etc/krb/daemon.map-dev-ws1.krb5.keytab chown -R www:www /home/www/etc chmod a-w,o-rx,u+r /home/www/etc/krb/daemon.map-dev-ws1.krb5.keytab |
scp -R root@trogdor.mit.edu:${REPOS_HOME}/System-configs/www-user/weblib /home/www/weblib/ |
groupadd repos useradd -g dbusr -d /home/www -m -r -s /bin/bash repos |
groupadd dbuser useradd -g dbusr -d /home/www -m -r -s /bin/bash dbusr |
cd /opt tar -xzvf /root/httpd-2.2.4.tar.gz cd httpd-2.2.4 |
./configure --prefix=/home/www/apache-2.2.4 --enable-ssl \ --with-ssl=/usr/local/ssl \ --enable-modules="most mod_rewrite" make make install ln -s /home/www/apache-2.2.4 /home/www/apache |
cd /opt tar -xzvf /root/tomcat-connectors-1.2.21-src.tar.gz cd tomcat-connectors-1.2.21-src |
cd native ./configure --with-apxs=/home/www/apache/bin/apxs --enable-ssl make make install |
chmod u+x,u-w jdk-6-linux-i586.bin |
cd /usr/local /root/jdk-6-linux-i586.bin |
./jdk-6-linux-i586-rpm.bin rpm -ivh jdk-6-linux-i586 |
cat > /etc/profile.d/java_home.sh export JAVA_HOME=/usr/local/jdk1.6.0 ^C chmod a+xr,a-w /etc/profile.d/java_home.sh |
cd /home/www tar -xzvf /root/sash-server-2.0.4-BETA.tar.gz ln -s sash-server-2.0.4-BETA sash-server cd sash-server-2.0.4-BETA |
cat > /etc/profile.d/sash_home.sh export SASHSRV_HOME=/home/www.sash-server-2.0.4-BETA export LD_LIBRARY_PATH=/usr/lib:/home/www/weblib ^c chmod a-w,a+rx /etc/profile.d/sash_home.sh source /etc/profile.d/sash_home.sh |
cp /root/mkInstance $SASHSRV_HOME/bin cp /root/modify-instance-file.sh $SASHSRV_HOME/bin cp /root/mit-worker-consolidater.sh $SASHSRV_HOME/bin chmod ug+rx,a-w $SASHSRV_HOME/bin/modify-instance-file.sh $SASHSRV_HOME/bin/mit-worker-consolidater.sh $SASHSRV_HOME/bin/mkInstance |
cd ${SASHSRV_HOME}/core/server/webapps/manager/WEB-INF/lib unzip -j /root/sash-2.0-flattened-jars.zip sash-2.0-flattened-jars/commons-io-1.3.1-1.jar |
cd $SASHSRV_HOME/conf/template |
cd conf mkdir jk cd jk |
cp /opt/tomcat-connectors-1.2.21-src/conf/workers.properties \ $SASHSRV_HOME/conf/template/conf/jk cp /root/sashsrv.conf /home/www/sash-server-2.0.4-BETA/conf/template/conf |
workers.tomcat_home=%%CATALINA_BASE%% workers.java_home=/usr/local/jdk1.6.0 ps=/ worker.list=ajp13 worker.ajp13.port=%%AJP_PORT%% worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers= ajp13 |
<Listener className="org.apache.jk.config.ApacheConfig" modJk="/home/www/apache/modules/mod_jk.so" jkDebug="info" workersConfig="%%CATALINA_BASE%%/conf/jk/workers.properties" jkLog="%%CATALINA_BASE%%/logs/mod_jk.log"/> |
<Listener className="org.apache.jk.config.ApacheConfig" append="true" /> |
<!-- <Connector port="%%HTTP_PORT%%" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" /> --> |
<!-- An AJP Connector - uncomment if needed --> <Connector port="%%AJP_PORT%%" protocol="AJP/1.3" /> |
<role rolename="manager"/> <user username="tomcat" password="*****" roles="tomcat,manager"/> |
cd $SASHSRV_HOME/conf vi sashsrv.conf # The base port for the JMX handlers - MIT addition # JMX_BASE=9000 |
LD_LIBRARY_PATH=/home/www/sash-server-2.0.4-BETA/lib:${LD_LIBRARY_PATH} |
chown -R www:www /home/www |
sed -i s:SASHSRV_USER=\"sashsrv\":SASHSRV_USER=\"www\":g $SASHSRV_HOME/bin/setvars sed -i s:SASHSRV_USER=\"sashsrv\":SASHSRV_USER=\"www\":g $SASHSRV_HOME/bin/sash-server.init sed -i s:SASHSRV_USER=\"sashsrv\":SASHSRV_USER=\"www\":g $SASHSRV_HOME/bin/sash-server-CS2.init |
cd $SASHSRV_HOME/servers rm -rf default cd $SASHSRV_HOME/bin ./mkInstance -N default cd $SASHSRV_HOME/servers/default |
source /etc/profile.d/java_home.sh $SASHSRV_HOME/bin/sashctl all start |
LoadModule jk_module "/usr/local/apache/libexec/mod_jk.so" |
LoadModule jk_module "/home/www/apache/modules/mod_jk.so" |
ServerRoot "/home/www/apache" # change to apache home directory User www # change from daemon Group www # change from daemon Include conf/extra/httpd-vhosts.conf # Uncomment Include conf/extra/httpd-ssl.conf # Uncomment |
# SASH Server/mod_jk includes Include /home/www/sash-server-2.0.4-BETA/core/conf/auto/mod_jk.conf <IfModule \!mod_rewrite.c> LoadModule rewrite_module "/home/www/apache/modules/mod_rewrite.so" </IfModule> |
NameVirtualHost \*:80 <VirtualHost *:80> ServerName \*.isda-thalia2.mit.edu RewriteEngine On RewriteCond %{HTTP_HOST} !^isda-thalia2\.mit\.edu [NC] RewriteCond %{HTTP_HOST} !^test\.isda-thalia2\.mit\.edu [NC] RewriteCond %{HTTP_HOST} !^demo\.isda-thalia2\.mit\.edu [NC] RewriteCond %{HTTP_HOST} !^hst\.isda-thalia2\.mit\.edu [NC] RewriteCond %{HTTP_HOST} !^ap\.isda-thalia2\.mit\.edu [NC] RewriteRule \^/(.*) [http://isda-thalia2.mit.edu/$1] [L,R] </VirtualHost></pre></code> |
<VirtualHost \*:80> RewriteEngine On RewriteRule \^/(.*) [https://finniganfen.mit.edu/$1] [L,R] </VirtualHost> |
RewriteCond %{REQUEST_URI} !/WarehouseService |
# points to directory with tomcat servers DocumentRoot "/home/www/sash-server-2.0.4-BETA/servers/" # the servername of the server ServerName gybe.mit.edu:443 # the admins of this server ServerAdmin dracus@mit.edu,dongq@mit.edu,dtanner@mit.edu # error log file ErrorLog /home/www/apache/logs/error_log # access log file TransferLog /home/www/apache/logs/access_log # public server certificate SSLCertificateFile /usr/local/ssl/certs/gybe.mit.edu.pem # private server certificate SSLCertificateKeyFile /usr/local/ssl/private/https-key.pem #certificate path SSLCACertificatePath /usr/local/ssl/certs # certificate authority key SSLCACertificateFile /usr/local/ssl/certs/mitCA.pem SSLVerifyClient require SSLVerifyDepth 10 |
SSLOptions +StdEnvVars +ExportCertData |
JkEnvVar SSL_CLIENT_DN nodefault JkEnvVar SSL_CLIENT_S_DN_CN nodefault JkEnvVar SSL_CLIENT_S_DN_Email nodefault JkEnvVar SSL_CLIENT_S_DN nodefault JkEnvVar HTTP_ACCEPT_LANGUAGE nodefault JkEnvVar SSL_CLIENT_CERT none |
cp /root/MitIdService.jar $SASHSRV_HOME/core/shared/lib |
cp /root/rolesApplicationContext.xml $SASHSRV_HOME/core/shared/classes/ |
chmod a+rx,a-w /etc/init.d/web |
ln -s /etc/init.d/web /root/startweb ln -s /etc/init.d/web /root/stopweb ln -s /etc/init.d/web /etc/rc.d/rc1.d/K15web ln -s /etc/init.d/web /etc/rc.d/rc2.d/K15web ln -s /etc/init.d/web /etc/rc.d/rc3.d/K15web ln -s /etc/init.d/web /etc/rc.d/rc4.d/K15web ln -s /etc/init.d/web /etc/rc.d/rc5.d/K15web ln -s /etc/init.d/web /etc/rc.d/rc6.d/K15web ln -s /etc/init.d/web /etc/rc.d/rc2.d/S15web ln -s /etc/init.d/web /etc/rc.d/rc3.d/S15web ln -s /etc/init.d/web /etc/rc.d/rc4.d/S15web ln -s /etc/init.d/web /etc/rc.d/rc5.d/S15web |
cp $SASHSRV_HOME/bin/sash-server.init /etc/init.d/sash-server chmod a+rx,a-w /etc/init.d/sash-server |
ln -s /etc/init.d/sash-server /etc/rc.d/rc1.d/K16web ln -s /etc/init.d/sash-server /etc/rc.d/rc2.d/K16web ln -s /etc/init.d/sash-server /etc/rc.d/rc3.d/K16web ln -s /etc/init.d/sash-server /etc/rc.d/rc4.d/K16web ln -s /etc/init.d/sash-server /etc/rc.d/rc5.d/K16web ln -s /etc/init.d/sash-server /etc/rc.d/rc6.d/K16web ln -s /etc/init.d/sash-server /etc/rc.d/rc2.d/S16web ln -s /etc/init.d/sash-server /etc/rc.d/rc3.d/S16web ln -s /etc/init.d/sash-server /etc/rc.d/rc4.d/S16web ln -s /etc/init.d/sash-server /etc/rc.d/rc5.d/S16web |
pathmunge /usr/local/bin pathmunge /usr/kerberos/bin |
cd /home/www/sash-server-2.0.4-BETA/servers/$SERVER/webapps cp -a geows\* mapws\* mitidws\* uaws\* testcert\* TestRemoteAlfresco\* \ /home/www/sash-server-2.0.4-BETA/servers/$SERVER/webapps |
ls -1 --hide=balancer --hide ROOT --hide=jsp-examples \ --hide=servlets-examples --hide=tomcat-docs --hide=webdav |
mv /home/https/weblib/ /home/www/weblib ln -s /home/www/weblib /home/https/weblib |
mkdir /home/www/weblib |
export LD_LIBRARY_PATH=/usr/lib:/home/www/weblib |
cp /root/libMitIdNativeClient.so /home/www/weblib |
/etc/init.d/web restart |
Send email to accounts@mit.edu and ask for a kerberos principle in the format of daemon.\[hostname\].krb5.keytab. When you receive it, install it in /home/www/etc/krb as daemon.\[hostname\].krb5.keytab. |
Send email to Mark Silis or Jim Repa and request that the kerberos principle above (daemon/\[hostname\].mit.edu@ATHENA.MIT.EDU) be added to the access control list for the databases on Illinois that the web service will be using (often mitid or roles). |
ls -l / |
mit-openafs-setup-1.2-3.noarch.rpm mit-krb-config-1.0-3.noarch.rpm mit-openafs-package.patch |
rpm -ivh mit-krb-config-1.0-3.noarch.rpm rpm -ivh mit-openafs-setup-1.2-3.noarch.rpm |
cd /opt/mit-openafs-setup/bin ./setup |
cd /opt/mit-openafs-setup/bin patch < /root/mit-openafs-package.patch ./setup |
cd /usr/local tar -xzvf /root/moira-rhel4-clients.tar.gz |
/etc/init.d/web start |
/etc/init.d/web stop |