Installation and configuration of lanmp (Linux Apache Nginx Mysql Php)

Source: Internet
Author: User

1) install Centos 5,
Http://mirrors.sohu.com/centos/5/isos/i386/
Disable selinux and firewall during installation

2) install necessary components
LANG = C
Yum-y install gcc-c ++ autoconf libjpeg-devel libpng-devel freetype-devel libxml2 libxml2-devel zlib-devel glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses- devel curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn-devel openssl-devel openldap-devel nss_ldap openldap-clients openldap-servers

3) install Apache
If you use the system's apache + php + mysql
Available
Yum-y install httpd php mysql php-pdo php-mcrypt php-mbstring

If you want to compile apache on your own, go to apache.org to download the latest apache version and compile and install it.
./Configure -- prefix =/usr/local/apache -- enable-so
Make
Make install

Compile php and related components. You can download the latest php5.2 version from www.php.net.
./Configure -- prefix =/usr/local/php -- with-apxs2 =/usr/local/apache2/bin/apxs -- with-mysql =/usr/local/mysql
(Assume that the previously compiled mysql is installed in/usr/local/mysql. If the mysql with the system is used, you can -- with-mysql =/usr)

4) Compile nginx
Download nginx (www.nginx.net) and compile
./Configure -- prefix =/usr/local/nginx & make install

5) Compile mysql
Download (dev.mysql.com) and compile mysql
./Configure -- prefix =/usr/local/mysql & make install

6) detailed performance adjustment and Website planning

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.