Install lamp in yum

Source: Internet
Author: User
Tags mysql functions php mysql php software

1. Install apahce, PHP, MySQL, and PHP to connect to the MySQL library components.
# Yum-y install httpd PHP MySQL mysql-server PHP-MySQL
Yum downloads the corresponding software version from the specified server (mirror: 163.com server), automatically processes the dependency, and installs the software.
2. install Apache Extension
# Yum-y install httpd-manual mod_ssl mod_perl mod_auth_mysql
Make Apache better support other software.
3. install PHP Extension
# Yum-y install PHP-Gd PHP-xml php-mbstring PHP-ldap php-pear PHP-XMLRPC
Apache does not support PHP files. Install the corresponding PHP software and configure HTTP. conf so that Apache can parse the. php file.
4. Install MySQL extension
# Yum-y install mysql-connector-ODBC mysql-devel libdbi-DBD-MySQL
Follow the steps below to implement MySQL functions.
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]
6. simple configuration file:
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.
7. install Tomcat 5
# Yum-y install tomcat5 tomcat5-webapps tomcat5-admin-webapps
Install the Tomcat 5 installation package and the corresponding dependency package
8. start Tomcat 5
# Service tomcat5 start
# Chkconfig tomcat5 on
9. Enter http: // your IP address: 8080/in the browser. You can see the Apache Software Foundation page. If you cannot see the page, check whether it is a firewall problem.
A cat header ----------------> Tomcat 5 is successfully installed.
10. 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
Enter http: // your IP address/tomcat/in the browser to view the Apache Software Foundation page.
As you may have guessed by now, this is the default Tomcat home page. It can be found on the local filesystem:
$ Catalina_home/webapps/root/index. jsp
In this way, the. jsp file can be parsed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.