1. Environmental preparation
Preliminary understanding:
Learn about system CPU providers and related configuration information ( cat /proc/cpuinfo )
Memory usage ( free -m ) is displayed in bytes, available memory = free+buffers+cached
View disk usage ( df -h )
Turn off the firewall:
Check the firewall ( service iptables status )
Turn off the firewall ( service iptables stop )
Check the boot auto-start ( chkconfig --list ) to see the boot status of iptables
Turn the firewall on and off ( chkconfig iptables off ) you can view it with chkconfig --list
The specified level can be turned off using ( chkconfig --level level iptables off )
vi /etc/sysconfig/selinux ( selinux is equivalent to antivirus software) can not be changed by setting SELINUX=disabled
Temporarily turn off selinux ( setenforce 0 )
2. Software installation
Install jdk ( Java Development Kit )
Check if jdk is installed ( rpm -qa|grep jdk )
If there are any, delete ( rpm -e java name) , resolve dependencies ( rpm -e --nodeps java name)
Confirm to delete
Find the jdk path and give the permission to execute x ( chmod u+x jdk-1_5_0_22-linux-i586-rpm.bin )
Install jdk ( ./jdk-1_5_0_22-linux-i586-rpm.bin ) enter y
Confirm installation ( rpm -ql jdk )
Configure environment variables ( vi /etc/profile )
Enter export JAVA_HOME=/usr/java/jdk1.5.0_22 in the last line
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin/:$PATH
Make the configuration take effect ( source /etc/profile )
Check ( java -version or javac )
Install mysql (using yum source)
Change to the yum source directory ( cd /etc/yum.repos.d/ )
Move CentOS5-Base-163.repo to that directory ( cp /root/CentOS5-Base-163.repo ./ )
Clear yum cache ( yum clean all )
Get package information remotely to local ( yum list )
Install mysql using yum ( yum install mysql-server )
Enter the key ( rpm --import http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5 )
Execute again ( yum install mysql-server )
Start ( /etc/init.d/mysqld start or service mysqld start )
enter mysql ( mysql )
install tomcat
Move Tomact to opt directory ( mv /root/apache-tomcat-6.0.33.tar.gz /opt/ )
Decompress Tomcat ( tar zxvf apache - tomcat-6.0.33.tar.gz ) in the directory to decompress
3. Project deployment and configuration
Unzip oa to webapps ( unzip cwoa2011.zip -d /opt/apache-tomcat-6.0.33/webapps/oa )
Move redmoonoa.sql to opt
(/opt/apache-tomcat-6.0.33/webapps/oa/setup/redmoonoa.sql)
enter mysql ( mysql )
Execute the statement source /opt/redmoonoa.sql
View the database ( show databases ; must have ; )
使用redmoonoa(use redmoonoa)
Exit and end the process (in the bin directory, execute ./shutdown.sh and use ps -fe|grep tomcat to view)
Modify the port and password ( vi /opt/apache-tomcat-6.0.33/webapps/oa/WEB-INF/proxool.xml )
Port is 3306 ; password is empty
Modify the log storage path ( vi log4j.properties is also under WEB-INF )
The address is changed to log4j.appender.R.File=/opt/apache-tomcat-6.0.33/logs/oa.log
Modify the cache file directory ( vi classes/cache.ccf )
The address is changed to DiskPath=/opt/apache-tomcat-6.0.33/logs/CacheTemp
reboot to take effect
4. Check and confirm
Check the log file for errors ( cd /opt/apache-tomcat-6.0.33/logs/ )
Enter the URL http://ip address: 8080 to see if you can enter tomcat
Enter the URL http://ip address: 8080/oa to see if you can enter oa