Build lamp in centos 6.6

Source: Internet
Author: User
Tags mcrypt

Build lamp in centos 6.6
The steps for building a lamp in centos 6.6 are as follows:Install apache Install mysql Php installationProblems and SolutionsApache installation problems Install mysql Php installation problems

Environment display (to show innocence)

Steps for installing apache
Download apache
Dependencies required for apache installation (apr, apr-util, pcre)
Vc/By73ibGludXjPtc2ztcTH6b/hybrid + zcrHy/nT0LCy17Cyvdbosdi2qNKq1/HRrc/hybrid + rotate/rotate "brush: SQL;"> ./configure --prefix=/usr/local/apr ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr./configure --prefix=/usr/local/pcre./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre

If you ask what is next, it's dependency, where it comes from, from. in the/configure file, if you have a shell script, you can open it in vi to see why it was written. (I forgot to mention one important thing. I installed apache 2.4.18, these dependencies need to be installed during the installation. Other versions do not know. However, if an error is reported during configuration compilation, the installation is required, in addition, I tested the installation using the yum-saving method, but the apr-configure dependency was not found when I configured apache, so I didn't use the yum installation here)

Install mysql
Download mysql
Follow the steps below in the official documents
Official steps

Use rpm to import the mysql installation file to the yum Library (these two statements are a script, and the following sentence is a case)

Check whether the mysql installation source exists in the yum library.

Check available mysql version database sources

Install mysql

Enable mysql Service

Check the mysql enabling status (omitted)

Use the first statement to find the initial mysql password, and then log on to and change the password (because of the security mechanism of mysql, the new password must contain uppercase or lowercase letters, numbers, and special characters. The length must be greater than or equal to 8)

Install php
Based on previous experience, install the dependency before installing php. Here, the dependency is (libmcrypt, mcrypt, mhash) in the initial image. I installed the dependency in this order, other installation statements are not written. Only the most critical configuration statements are written, because this is the easiest way to report errors.
Note that you do not need to specify a directory when installing libmcrypt, mcrypt, and mhash. If you specify a directory, you cannot find mcrypt When configuring php. The reason is not clear, you can leave a message to tell me, so the first three sentences configure did not specify the installation directory. According to my understanding, it seems that even if the directory is specified, he will only go to the default installation path of libmcrypt (the default installation path on my machine is/usr/local/lib /)

./configure./configure ./configure./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --disable-cli --enable-shared --with-libxml-dir --with-gd --with-openssl --enable-mbstring --with-mcrypt --with-mysqli --with-mysql --enable-opcache --enable-mysqlnd --enable-zip --enable-exif --with-zlib-dir --with-pdo-mysql --with-jpeg-dir --with-freetype-dir --with-curl --without-pdo-sqlite --without-sqlite3
Problems encountered

Apache Problems
In general, the dependency cannot be found, or there is no installation error. If you install the dependency correctly, there will be no problem. As mentioned above, I used yum to install the dependency, if you fail to compile apache and cannot find apr-config, it is recommended that you use a stupid method (. /configure) install it again

Mysql Problems
As mentioned above, an error will be reported when you change the password, as long as the official requirements (length> = 8 + special characters + uppercase/lowercase letters + numbers) should be okay.

Php Problems
The yum installation dependency has not been tested. If you install it manually, do not specify a directory. As for the reason, I am not clear. If you have a clear idea, you can leave a message to tell me that I will update this article.

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.