更改tomcat访问端口为80
[root@caoquanwen usr]# cd /usr/local/tomcat/bin
[root@caoquanwen bin]# tar xvf commons-daemon-native.tar.gz
[root@caoquanwen bin]# cd commons-daemon-1.1.0-native-src/unix/
configure INSTALL.txt Makefile.in native/
configure.in Makedefs.in man/ support/
[root@caoquanwen unix]# sh support/buildconf.sh
support/buildconf.sh: line 22: autoconf: command not found
support/buildconf.sh: cannot generate configure script
[root@caoquanwen unix]# yum install autoconf 安装所需要的conf
[root@caoquanwen unix]# yum install gcc 安装编译C语言程序
[root@caoquanwen unix]# sh support/buildconf.sh
support/buildconf.sh: configure script generated successfully
[root@caoquanwen unix]# ./configure --with-java=/usr/local/java
[root@caoquanwen unix]# make 生成jsvc
[root@caoquanwen unix]# cp jsvc /usr/local/tomcat/bin/
删除刚才解压的文件
[root@caoquanwen bin]# rm commons-daemon-1.1.0-native-src/ -rf
[root@caoquanwen bin]# vim daemon.sh
export JAVA_HOME=/usr/local/java
export TOMCAT_HOME=/usr/local/tomcat
export CATALINA_HOME=/usr/local/tomcat
export CATALINA_BASE=/usr/local/tomcat
export CATALINA_BASE=/usr/local/tomcat
export CATALINE_TMPDIR=/usr/local/tomcat/temp
指定用户
test “.$TOMCAT_USER” = . && TOMCAT_USER=tomcat