3.
Finally you should configure alternative to use Sun's JVM as the default JVM. To do this type:
# /usr/sbin/alternatives --config java
4.
In the future when we update Java, we only need to update this symlink (for JAVA_HOME) and paragraph 2 and 2
# cd /usr/java/
# ln -s jdk1.5.0_22 jdk
5.
Last check:
# java -version
java version «1.5.0_22»
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_22-b03, mixed mode)
6.
I think this step is not really necessary now but anyway:
# cd /etc/profile.d
# vi java.sh
# svn co https://source.sakaiproject.org/svn/sakai/branches/sakai_2-6-x/ sakai_2-6-x
# cd sakai_2-6-x/master
# mvn clean install
# cd…
# mvn clean install | tee maven-sakai-log
Check the build log — maven-sakai-log and deploy
# mvn sakai:deploy -Dmaven.tomcat.home=/srv/tomcat | tee maven-sakai-deploy-log
Note: You can also issue mvn clean install sakai:deploy from any sakai project module top-level folder in order to build and deploy portions of Sakai such as individual tools.
6.
From the Installation guides (http://confluence.sakaiproject.org/display/DOC/Installation+(2.6) ):
Both Oracle 10g AND Oracle 9i users must use the 10g driver; the latest 10g «Release 2» (10.2.x) or higher is recommended.
Install Oracle JDBC driver (or connector) for your installation. For Oracle download the ojdbc14.jar file and copy it to $CATALINA_HOME/common/lib:
7.
Check location of sakai.properties file in the source code:
— root@server031 sakai_2-6-x]# ls -l reference/docs/sakai.properties
-rw-r--r-- 1 root root 24375 Jan 13 16:50 reference/docs/sakai.properties
The default location for your local sakai.properties file is $CATALINA_HOME/sakai. This folder is not created by Maven during the build and deployment process, so you will have to create it manually or via a script.
If you checkout a copy of sakai.properties from our SVN repository make sure it corresponds to the version of Sakai you are using (e.g. Sakai 2.6.x):
$ svn co source.sakaiproject.org/svn/reference/branches/sakai_2-6-x/docs/sakai.properties
Now start tomcat:
# /etc/init.d/tomcat start
check the log during boot:
# tail -f /srv/tomcat/logs/catalina.out
8. On startup, Sakai will generate all database objects (tables, keys, constraints, etc.) automatically, obviating the need to run DDL scripts manually per the sakai.properties setting auto.ddl.
# establish auto.ddl — on by default
auto.ddl=true
#auto.ddl=false
Once the database schema is created you should set auto.ddl=false and restart tomcat.
9. Configuring mail properties:
stop Sakai, remove the sakai-mailarchive-james directory under webapps (but leave sakai-mailarchive-james.war), and then start Sakai again
3.
# tar -xvzf tomcat-connectors-1.2.28-src.tar.gz
Read docs/webserver_howto/apache.html or native/BUILDING.txt for options.
# cd tomcat-connectors-1.2.28-src/native/
# which apxs
# ./configure --with-apxs=/usr/sbin/apxs --enable-api-compatibility
# make
# make install
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
— chmod 755 /usr/lib64/httpd/modules/mod_jk.so
Please be sure to arrange /etc/httpd/conf/httpd.conf…
Check:
# ls -l /etc/httpd/modules/mod_jk.so
-rwxr-xr-x 1 root root 959821 Jan 7 14:10 /etc/httpd/modules/mod_jk.so
4.
# chkconfig --add httpd
# chkconfig httpd on
5.
# mkdir -p /etc/httpd/conf/vhosts.d
6. add those lines to /etc/httpd/conf/httpd.conf file:
Include /etc/httpd/conf/mod_jk.conf
Include /etc/httpd/conf/vhosts.d/*.conf
# mod_jk config
# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
JkWorkersFile /etc/httpd/conf/workers.properties
# Where to put jk shared memory
# Update this path to match your local state directory or logs directory
JkShmFile /var/log/httpd/mod_jk.shm
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
JkLogFile /var/log/httpd/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
#JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Globally deny access to the WEB-INF directory
<LocationMatch '.*WEB-INF.*'>
AllowOverride None
deny from all
# cat /etc/httpd/conf/workers.properties
#
# This file provides minimal jk configuration properties needed to
# connect to Tomcat.
#
# We define a workers named worker1 and worker2
workers.tomcat_home=/srv/tomcat/
workers.java_home=/srv/jdk
ps=/
# worker.list=worker1,worker2
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=1
# worker.worker2.type=ajp13
# worker.worker2.host=sakai26.dyndns.org
# worker.worker2.port=8009
# worker.worker2.lbfactor=1
# Load-balancing behaviour (add when you have more than 1 worker and change worker.workerX.host and worker.list accordingly)
# worker.loadbalancer.type=lb
# Status worker for managing load balancer (add when you have more than 1 worker)
worker.status.type=status
# if not specified, the global error log is used
ErrorLog /var/log/httpd/server029.its.your.domain-error_log
CustomLog /var/log/httpd/server029.its.your.domain-access_log combined
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off
9a. Create (just in case) /srv/sakai
# mkdir -p /srv/sakai
10. Finally, you must edit $CATALINA_HOME/conf/server.xml to make sure that the AJP connection is enabled on port 8009, and to turn off clear-text traffic on port 8080. The AJP connector should NOT be commented out:
Make sure you're asking Tomcat to look for connection on localhost (127.0.0.1) only, meaning it'll ignore your public-facing traffic, for even tighter security.
And the HTTP connector on port 8080 should be commented out (no need to listen on 8080 in our case):
You can also use APACHE to handle HTTPS traffic, with Tomcat backstage:
— 1.
# yum install mod_ssl openssl
# ls -l /etc/pki/tls/certs
Generate a self-signed certificate
— Using OpenSSL we will generate a self-signed certificate. If you are using this on a production server you will need a key from Trusted Certificate Authority, but if you are just using this on a personal site or for testing purposes a self-signed certificate is fine. To create the key you will need to be root so you can either su to root or use sudo in front of the commands
openssl genrsa -out ca.key 1024 # Generate private key
# ServerAlias www.server029.its.your.domain
# if not specified, the global error log is used
ErrorLog /var/log/httpd/server029.its.your.domain-error_log
CustomLog /var/log/httpd/server029.its.your.domain-access_log combined
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off
# Per-Server Logging:
# The home of a custom SSL log file. Use this when you want a
# compact non-error SSL logfile on a virtual host basis.
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
Comments (3)
RSS Collapse / Expandt0lkman
lkolchin
thirilog
Only registered and authorized users can leave comments. Login or Register