1、在/usr/share/tomcat6/bin中有commons-daemon-native.tar.gz 压缩包 2、解压commons-daemon-native.tar.gz # tar -zxvf commons-daemon-native.tar.gz 3、解压完成,出现commons-daemon-1.0.2-native-src文件夹(目录) 4、 执行configure 文件 cd commons-daemon-1.0.2-native-src/unix ./configure 5、 编译 [root@localhost ~]# make #会报错 [root@localhost ~]# make clean [root@localhost ~]# make #重新编译成功 6、 编译完成后出现jsvc文件夹,复制jsvc到/usr/share/tomcat6/bin目录下面 [root@localhost ~]# cp jsvc ../../ 10、在/etc/init.d/目录下编写tomcat6启动服务配置文件。 [root@localhost ~]#cd /etc/init.d/ [root@localhost ~]# vi tomcat6
11、录入完成,按Esc键。输入: wq保存退出并赋予/etc/init.d/tomcat6文件可执行权限 [root@localhost~]# chmod 777 /etc/init.d/tomcat6 ------------------添加服务----------------------------------------- 12、[root@localhost~] #chkconfig --add tomcat6 ##添加tomcat服务 13、[root@localhost~] #chkconfig –list |grep tomcat6 ##查看tomcat服务是否被添加 --------------------启动服务--------------------------------------------- 14、[root@localhost~] # service tomcat6 start ##启动tomcat服务 15、[root@localhost~] # service tomcat6 stop ##停止tomcat服务 16、[root@localhost~] # service tomcat6 restart ##重启tomcat 17、[root@localhost~] # service tomcat6 status ##查看tomcat服务启动状态 然后给普通用户tomcat的权限,就可以了。 |
|
来自: hongjing_z > 《守护进程》