Install MySQL + PHP + Apache in Linux

Source: Internet
Author: User

I installed MySQL + PHP + Apache yesterday. I recorded the process. Although I copied most of the processes on the Internet, it is also clear in the install file, however, I will record the principle that is easier to find next time. I installed MySQL + PHP + Apache yesterday. I recorded the process. Although I copied most of the processes on the Internet, it is also clear in the install file, but based on the principle that irrigation is justified, let's just fill it.
Install MySQL + PHP + Apache
I. Download Software
Http://www.apache.org apache_1.3.33
Http://www.php.net php_5.0.2
Libxml2-2.6.11 http://www.xmlsofe.org
MySQL-3.23.57-1.i386.rpm (MySQL Server) http://www.mysql.com
MySQL-client-3.23.57-1.i386.rpm (MYSQL client utility) http://www.mysql.com
MySQL-devel-3.23.57-1.i386.rpm (MySQL contains files and libraries) http://www.mysql.com
MySQL-shared-3.23.57-1.i386.rpm (client program shared library) http://www.mysql.com
Ii. Install MySQL
MySQL is usually installed during Linux installation, so check whether the system has been installed.
Rpm-Q MySQL (lower case Oh) delete it if any
Rpm-e -- nodeps if MySQL is not deleted, a version conflict will occur when MySQL is installed. Force Delete
Rpm-IVH -- force MySQL-3.23.57-1.i386.rpm no way. There is always a conflict, only force installation pull.
Rpm-IVH -- force MySQL-client-3.23.57-1.i386.rpm
Rpm-IVH -- force MySQL-devel-3.23.57-1.i386.rpm
Rpm-IVH -- force MySQL-shared-3.23.57-1.i386.rpm
Then run rpm-Q to check whether the above four parts have been installed.
Iii. Install libxml
CD/usr/local/libxml2-2.6.11
./Configure
Make
Make install
4. Compile and install Apache (if you want to install SSL, compile mod_ssl before pulling)
CD/usr/local/apache_1.3.33
./Configure -- prefix =/usr/local/Apache -- enable-module = so
Make
Make install
V. Configure PHP and compile and install PHP.
CD/usr/local/PHP
. /Configure -- With-apxs =/usr/local/Apache/bin/apxs -- With-mysql -- With-config-file-Path =/usr/local/lib -- With-libxml -Dir = .. /libxml
Make
Make install
Cp php. ini-Dist/usr/local/lib/PHP. ini
6. Modify/usr/local/Apache/CONF/httpd. conf.
VI/usr/local/Apache/CONF/httpd. conf
Addtype application/X-httpd-PHP. php. php3
7. Test
VI/usr/local/Apache/htdocs/1. php is to create a PHP file. Enter the following section

$ Myvar = "Hello, world! ";
Echo $ myvar;
Phpinfo ();
?>

Start apache service
/Usr/local/Apache/bin/apachectl stop
/Usr/local/Apache/bin/apachectl start
Input 127.0.0.1/1. php In the browser. Many tables should be displayed at this time. Congratulations! PHP has been installed successfully.

This article is more about: http://www.infosecurity.org.cn/forum/read.php? FID = 10 & tid = 34 & fpage = 2

Related Article

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.