LNMP Environment Building Source code package installation linux,nginx,mysql,php

Source: Internet
Author: User
Environment: Contos 6.5

Description

Source Code directory:/data/software/soft

Installation directory:/usr/local/webserver/

Source Code Package: Http://pan.baidu.com/s/1kTy3UXh

Get ready:

Yum-y install gcc automake autoconf libtool makeyum-y install gcc gcc-c++ glibcyum-y install libmcrypt-devel Mhash-deve L libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel GL IBC glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel Curl curl-devel e2fsprogs e2fsprogs-devel krb5 k Rb5-devel libidn libidn-devel OpenSSL openssl-devel

To install the PHP script:
Spath=/data/software/softcd ${spath}tar zvxf php-5.6.9.tar.gzcd php-5.6.9webpath=/usr/local/webserver./configure-- prefix=${webpath}/php  --enable-fpm  --with-openssl  --with-mcrypt--enable-mbstring--with-curl-- Disable-debug  --disable-rpath--enable-inline-optimization--with-bz2  --with-zlib--enable-sockets-- Enable-sysvsem--enable-sysvshm--enable-pcntl--enable-mbregex--with-mhash--enable-zip--with-pcre-regex-- With-mysql--with-mysqli--with-gd--with-jpeg-dirmake All Install

Install Nginx ready, install Zlib,openssl,pcre script:

Spath=/data/software/softcd ${spath}tar-xzvf pcre-8.34.tar.gz tar-xzvf openssl-1.0.1c.tar.gz TAR-XZVF ZLIB-1.2.8.TAR.GZCD ${spath}/zlib-1.2.8./configuremake && make Installcd ${spath}/openssl-1.0.1c./config. Config-tmake && make INSTALLCD ${spath}/pcre-8.34./configuremakemake Install

Install Nginx script (including Echo and Realip module):
Webpath=/usr/local/webserverspath=/data/software/softcd ${spath}tar XZVF Nginx-1.4.2.tar.gztar XZVF ECHO-NGINX-MODULE-0.57.TAR.GZCD nginx-1.4.2./configure--sbin-path=${webpath}/nginx/nginx--conf-path=${webpath}/ nginx/nginx.conf--pid-path=${webpath}/nginx/nginx.pid--with-http_ssl_module--with-pcre=${spath}/pcre-8.34-- with-zlib=${spath}/zlib-1.2.8--with-openssl=${spath}/openssl-1.0.1c--add-module=/data/software/soft/ echo-nginx-module-0.57--with-http_realip_modulemake && make install
Install MySQL Script
Yum Install Ncurses-develgroupadd mysqluseradd-r-g MySQL mysqlspath=/data/software/softcd ${spath}tar zvxf MYSQL-5.6.16.TAR.GZCD mysql-5.6.16cmake-dcmake_install_prefix=/usr/local/webserver/mysql-dmysql_unix_addr=/usr/ Local/webserver/mysql/mysql.sock-ddefault_charset=utf8-ddefault_collation=utf8_general_ci-dwith_innobase_ STORAGE_ENGINE=1-DWITH_ARCHIVE_STORAGE_ENGINE=1-DWITH_BLACKHOLE_STORAGE_ENGINE=1-DMYSQL_DATADIR=/DATA/MYSQLDB- Dmysql_tcp_port=3306-denable_downloads=1make && make Installchown mysql.mysql-r/usr/local/webserver/ Mysqlchown mysql.mysql-r/data/mysqldb/usr/local/webserver/mysql/scripts/mysql_install_db--user=mysql--datadir=/ Data/mysqldbcp/usr/local/webserver/mysql/support-files/my-default.cnf/etc/my.cnf
MySQL related operations
CP Support-files/mysql.server/etc/init.d/mysqld Vim/etc/profile//Added to $path      path=/usr/local/webserver/mysql/ Bin:/usr/local/webserver/mysql/lib: $PATH      export pathsource/etc/profile//Make effective service mysqld start// Start Mysqlchkconfig--level mysqld on//Set boot start NETSTAT-TULNP | grep 3306//view port mysql-u root-p//login mysqladmin-u root password ' 123456 '//Set Password


The above describes the LNMP environment to build the source code package installation linux,nginx,mysql,php, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.