1、安装Apahce、PHP、MySQL和PHP连接MySQL数据库的包:
yum -y install httpd php mysql mysql-server php-mysql
2、安装Apache常用扩展包:
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
3、安装PHP常用扩展组包:
yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-devel
4、安装MySQL的常用扩展包:
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
5、安装Tomcat6相关软件包:
yum -y install tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat6-docs-webapp tomcat6-javadoc
说明:如果是CentOS 5.x,yum安装的是Tomcat5版本,如下:
yum -y install tomcat5 tomcat5-webapps tomcat5-admin-webapps tomcat5-docs-webapp tomcat5-javadoc
6、全部软件包一键安装命令如下:
yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-devel mysql-connector-odbc mysql-devel libdbi-dbd-mysql tomcat6 tomcat6-webapps tomcat6-admin-webapps tomcat6-docs-webapp
7、配置Apache、MySQL、Tomcat服务开机自启动:
chkconfig httpd on
chkconfig mysqld on
chkconfig tomcat6 on
8、重启Apache、MySQL、Tomcat服务:
/etc/init.d/httpd restart
/etc/init.d/mysqld restart
/etc/init.d/tomcat6 restart
说明: Apache的配置文件是/etc/httpd/conf/里 modules放在/usr/lib/httpd/里 php的配置文件在/etc/php.d/里和/etc/php.ini php的modules放在/usr/lib/php/modules里 MySQL的配置文件在/etc/my.cnf里 Tomcat6安装目录位于/user/share/tomcat6/里 Tomcat6的配置文件位于/etc/tomcat6/里
© 著作权归作者所有
文章评论(0)