1、安装tomcat和mysql:
yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat6-docs-webapp tomcat6-javadoc mysql-server java-1.6.0-openjdk
2、设置mysql密码:
service mysqld start mysqladmin -u root password '密码'
3、设置mysql和tomcat开机启动:
chkconfig mysqld on chkconfig tomcat6 on
4、开放8080端口:
/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT /etc/rc.d/init.d/iptables save /etc/init.d/iptables restart
5、站点根目录及配置文件位置:
/usr/share/tomcat6/webapps/ROOT /etc/tomcat6
6、测试:
http://localhost:8080