LNMP environment to build a detailed

Source: Internet
Author: User
Tags openssl php software mysql database

Physical environment:

Operating system: CentOS 5.5 32-bit

MySQL Database: mysql-5.1.58.tar.gz

Nginx Package: nginx-0.7.65.tar.gz

PHP software package: php-5.3.8.tar.gz

1 Installing the MySQL database

TAR-ZXVF mysql-5.1.58.tar.gz

CD mysql-5.1.58

./configure--prefix=/usr/local/mysql--enable-assembler--with-extra-charsets=complex--enable-thread-safe-client --with-big-tables--with-readline--with-ssl--with-embedded-server--enable-local-infile--with-plugins=partition, Innobase,myisammrg

Make

Make install

Create a MySQL database server configuration file

CP SUPPORT-FILES/MY-MEDIUM.CNF/ETC/MY.CNF

cd/usr/local/mysql/

Initializing the MySQL Database

bin/mysql_install_db--user=mysql

Modify the permissions of the file and its directory so that its directory or file is hosted by Root, and the host group is MySQL, (data is hosted by MySQL)

Chown-r Root.

Chown-r MySQL Data

Chgrp-r MySQL.

Start the MySQL database

/usr/local/mysql/bin/mysqld_safe--user=mysql &

Netstat-tnl|grep 3306

Setting up a MySQL startup script file

CP Support-files/mysql.server/etc/rc.d/init.d/mysqld

chmod +x/etc/rc.d/init.d/mysqld

/etc/init.d/mysqld restart

/usr/local/mysql/bin/mysql-uroot-p

2 Installation Nginx Service

Installing the OPENSSL-0.9.8I.TAR.GZ Package

./config--prefix=/usr/local/openssl

Make &&make Install

Install the pcre-8.12.tar.gz package (you can install the CD inside Pcre and Pcre-devel)

./configure--prefix=/usr/local/pcre

Make &&make Install

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.