1. install Apahce, PHP, MySQL, and php to connect to the mysql Library components. # Yum-yinstallhttpdphpmysqlmysql-serverphp-mysql2. install apache extension # yum-yinstallhttpd-manualmod_sslmod_perlmod_auth_mysq...
1. install Apahce, PHP, MySQL, and php to connect to the mysql Library components.
# Yum-y install httpd php mysql-server php-mysql
2. install apache extension
# Yum-y install httpd-manual mod_ssl mod_perl mod_auth_mysql
3. install php extension
# Yum-y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc
4. install MySQL extension
# Yum-y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
5. configure the startup service
#/Sbin/chkconfig httpd on [set the startup of the httpd service on the apache server]
#/Sbin/service httpd start [start the httpd service, which has nothing to do with startup]
#/Sbin/service mysqld start [start the mysqld service, which has nothing to do with startup]
The apache configuration file is under/etc/httpd/conf.
Place modules in/usr/lib/httpd
The php configuration file is under/etc/php. d/and/etc/php. ini
Put the php modules under/usr/lib/php/modules.
6. install Tomcat 5
# Yum-y install tomcat5 tomcat5-webapps tomcat5-admin-webapps
7. start Tomcat 5
# Service tomcat5 start
8. enter http://www.2cto.com: 8080/in the browser, you can see the Apache SoftWare Foundation page, if not, please confirm whether it is a firewall problem
You can use the service tomcat5 stop command to stop tomcat.
You can use the chkconfig tomcat5 on command to start tomcat at startup.
The installation directory of Tomcat5 is located at/user/share/tomcat5.
9. Integration of Apache and Tomcat
If the website needs to be integrated with Apache and Tomcat, JK or Proxy can be used.
Use VI to edit the proxy_ajp.conf file
# Vi/etc/httpd/conf. d/proxy_ajp.conf
Enter the following content
ProxyPass/tomcat/ajp: // localhost: 8009/
After the file is stored, restart Apache
# Service httpd restart
10. enter http: // your IP address/tomcat/in the browser to view the Apache SoftWare Foundation page.