Apache + php + mysql Configuration Guide _ MySQL

Source: Internet
Author: User
Author: vipcui I. System requirements: This system passed the REDHAT7.2 test. 2. server software requirements: 1. download APACHEWEBSERVERwww from the APACHE website. apache. org2. download the php parser www. php. net3. download mysqlsourceforge from the mysql website. netprojec Apache


Author: vipcui
  
I. System requirements:
The system passed the REDHAT7.2 test.
II. server software requirements:
1: Download apache web server http://www.apache.org/
2. go to the php web site to download the php parser http://www.php.net/
3. download the mysql http://sourceforge.net/projects/mysql/ from the mysql website
III. install and debug WEB SERVER
Download the above files and put them in the same directory. I will put them under/usr/local and use the tar command to unpack the files.
  
Tar zxvf apache_1.3.12.tar.gz
Tar zxvf php-4.0.6.tar.gz
Tar zxvf mysql-3.22.40.tar.gz
For ease of installation, it is recommended to name the Directory
# Mv apache_1.3.12 apache
# Music php-4.0.6 php
# Music mysql-3.22.40 mysql
Install mysql
  
4. install mysql before installing web services
  
Cd mysql
  
./Configure
  
Make
  
Make install
  
Depending on the machine performance, the compilation process takes some time. after compilation, the system installs mysql under/usr/local by default.
  
After the installation is complete, start the mysql process.
  
Cd/usr/local/bin
  
./Mysql_install_db (install the basic mysql database)
  
./Safe_mysqld & (starts the process and transfers it to the background)
  
Here mysql is installed. run./mysql to check whether the database can be connected. if it is normal, you can see this interface.
  
Welcome to the MySQL monitor. Commands end with; or g.
  
Your MySQL connection id is 880 to server version: 3.22.40
  
Type 'HELP' for help.
  
Mysql>
  
Congratulations, you have installed mysql.
  
For mysql usage, refer to his doc document.
  
5.
Integrate apache and php4
  
This is the key and the most difficult step for all the work. it may be because of such errors during the installation of different versions. you can modify the version information accordingly.
  
Cd apache
./Configure
This step seems dispensable, but I have to make this step
Cd ../php
  
./Configure -- with-mysql =/usr/local -- with-apache =/usr/local/apache -- enable-track-vars
  
Make
  
Make install
Cd ../apache
  
./Configure -- activate-module = src/modules/php4/libphp4.a
  
Make
  
Make install
  
This step is to install the apache WEB service. you can refer to./configure-help to add the required modules or install the service by referring to the installation manual.
  
Copy the php configuration file to the corresponding directory.
  
Cd ../php
  
Cp php. ini-dist/usr/local/lib/php. ini
  
Php. ini does not need to be modified. you can refer to the relevant instructions for modification.
  
After configuring PHP, configure Apache Web SERVER. configure httpd. conf first.
  
Cd/usr/local/apache/conf
  
Vi httpd. conf
  
Modify the following content for php:
  
# AddType application/x-httpd-php. php
  
# AddType application/x-httpd-php-source. phps
  
Remove the annotator of the above two lines and determine the suffix of the php document based on the actual situation. according to the needs of horde, we recommend that you change the first line to the following form:
  
AddType application/x-httpd-php. php. php3. htm. phtml. php4
In addition, you must modify the default homepage type. we recommend that you set <
  
DirectoryIndex index.htm
  
Change to this
  
DirectoryIndex index.htm index.html index. php3 index. php default. php
  

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.