分类:
2008-05-17 17:23:49
七.安装Tomcat 2.编辑以下文件
1.执行以下命令
//进入连接器编译目录
#./buildconf.sh
//运行配置脚本
#./configure --with-apxs2=/usr/local
/apache/bin/apxs
--enable-jni --enable-EAPI
#make //编译模块
#cd ~jim/src/*jk2*/jk/build/jk2/apache2
//进入编译好模块的目录
#cp *.so /usr/local/apache/modules/
//将模块拷贝到目录
#cp -R jakarta-tomcat-5.0.19 /usr/local/tomcat
//安装Tomcat
#touch /usr/local/apache/logs/shm.file
//建立共享内存文件
LoadModule jk2_module modules/mod_jk2.so
JkSet config.file
/usr/local/apache/conf/workers2.properties
DocumentRoot "/usr/local/tomcat/webapps"
/usr/local/tomcat/webapps/jsp-examples/for.jsp
/usr/local/tomcat/conf/jk2.propertie
handler.list=request,container,channelSocket
channelSocket.port=8009
channelSocket.address=127.0.0.1
channelSocket.maxPort=port+10
/usr/local/apache/conf/workers2.properties
[shm]
file=/usr/local/apache/logs/shm.file
size=1048576
[workerEnv:]
info=Global server options
timing=1
debug=0
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
[uri:/*.jsp]
worker=ajp13:localhost:8009
/etc/rc.d/init.d/httpd
#!/bin/sh
# chkconfig:2345 92 12
# description:Starting
Apache and Tomcat Server
LD_LIBRARY_PATH=/usr/java/j2sdk1.4.2_04
/jre/lib/i386:/usr/java/j2sdk1.4.2_04
/jre/lib/i386/server
export LD_LIBRARY_PATH
CATALINA_BASE=/usr/local/tomcat
export CATALINA_BASE
CATALINA_HOME=/usr/local/tomcat
export CATALINA_HOME
APACHE_HOME=/usr/local/apache
export APACHE_HOME
JAVA_HOME=/usr/java/j2sdk1.4.2_04
export JAVA_HOME
PROFILEDIR=/var/run
case "$1" in
start)
if [ -f $PROFILEDIR/Tomcat5_Apache2 ];
then
echo "Running Tomcat5_Apache2"
else
if [ -f $CATALINA_HOME/bin/startup.sh ];
then
if [ -f $APACHE_HOME/bin/apachectl ];
then
"$CATALINA_HOME/bin/startup.sh"
echo "Startting Tomcat5"
sleep 3
echo "Startting Apache2"
$APACHE_HOME/bin/apachectl start
echo "."
touch $PROFILEDIR/Tomcat5_Apache2
else
echo "Apache File Not Founds"
fi
else
echo "Tomcat File Not Founds"
fi
fi
;;
stop)
if [ -f $PROFILEDIR/Tomcat5_Apache2 ];
then
if [ -f $CATALINA_HOME/bin/shutdown.sh ];
then
if [ -f $APACHE_HOME/bin/apachectl ];
then
"$CATALINA_HOME/bin/shutdown.sh"
echo "Stopping Tomcat5"
sleep 3
echo "Stopping Apache2"
$APACHE_HOME/bin/apachectl stop
rm $PROFILEDIR/Tomcat5_Apache2
else
echo "Apache File Not Founds"
fi
else
echo "Tomcat File Not Founds"
fi
else
echo "Not Running Tomcat5_Apache2"
fi
;;
*)
echo "Usage; `basename $0`
{start|stop}" 1>&2
exit 1
;;
esac
exit 0
3.设置自动启动
|
八.安装CVS
1.编辑以下文件
|
2.执行以下命令
|
说明:
CVS的密码问题,以前众说纷纭,有的是编一段程序来生成密码,有的则用所谓的土去拷贝shadow密码。其实我可以告诉初学者一个最简单方便的方法,就是采用Webmin添加CVS用户,它自己就会帮你生成密码。
3.编辑以下文件:
|
说明:
主要是在最后加上用户名cvspub,让用户cvspub代替test1和test2去读写CVS仓库。
|