LNMP Compiling and installing
# You need to configure IP first
# The path of the package/usr/local/src
Yum install-y libjpeg-devel libpng-devel freetype-devel curl-devel python-devel curl-devel gcc gcc-c++ bison-devel ncurs Es-devel lrzsz openssl-devel libjpeg-devel libpng-devel freetype-devel curl-devel python-devel curl-devel
Yum install-y libxml2 libxml2-devel cmake
Yum-y install OpenSSL openssl-devel libxml2-devel libxslt-devel perl-devel perl-extutils-embed
Yum Install Bind-utils
#mysql Install
Cd/usr/local/src
Tar zxvf mysql-5.6.16.tar.gz
CD mysql-5.6.16
Cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_unix_addr=/tmp/mysql.sock-ddefault_charset=utf8-ddefault_ Collation=utf8_general_ci-dwith_extra_charsets=all-dwith_myisam_storage_engine=1-dwith_innobase_storage_engine =1-dwith_memory_storage_engine=1-dwith_readline=1-denabled_local_infile=1-dmysql_datadir=/usr/local/mysql/data -dmysql_user=mysql
Make && make install
wget http://www.cpan.org/modules/by-module/Data/Data-Dumper-2.154.tar.gz
Tar zxvf data-dumper-2.154.tar.gz
CD data-dumper-2.154
Yum Install Perl-extutils-cbuilder Perl-extutils-makemaker
Perl makefile.pl
Make && make install
Groupadd MySQL
Useradd-r-G MySQL MySQL
Cd/usr/local/mysql
Chown-r Mysql:mysql.
scripts/mysql_install_db--user=mysql
Chown-r Root.
Chown-r MySQL Data
#替换配置文件
Cp/usr/local/src/my.cnf/etc/my.cnf
Cp/usr/local/mysql/support-files/mysql.server/etc/init.d/mysql
Service MySQL Start
Ln-s/usr/local/mysql/bin/mysql/usr/bin/
#nginx compilation
cd/usr/local/src/
Tar zxvf zlib-1.2.8
CD zlib-1.2.8
./configure
Make && make install
cd/usr/local/src/
Tar zxvf nginx-1.9.1.tar.gz
CD nginx-1.9.1
./configure--prefix=/usr/local/nginx--sbin-path=/usr/sbin/nginx--conf-path=/etc/nginx/nginx.conf-- Error-log-path=/var/log/nginx/error.log--http-log-path=/var/log/nginx/access.log--pid-path=/var/run/nginx/ Nginx.pid --lock-path=/var/lock/nginx.lock--user=nginx--group=nginx--with-http_ssl_module--with-http_spdy _module--with-http_dav_module--with-http_flv_module--with-http_realip_module--with-http_addition_module-- With-http_xslt_module--with-http_stub_status_module--with-http_sub_module--with-http_random_index_module-- With-http_degradation_module--with-http_secure_link_module--with-http_gzip_static_module--with-http_perl_ Module--with-pcre--with-zlib=/usr/local/src/zlib-1.2.8--with-debug--with-file-aio--with-mail--with-mail_ssl_ Module--http-client-body-temp-path=/var/tmp/nginx/client_body--http-proxy-temp-path=/var/tmp/nginx/proxy-- http-fastcgi-temp-path=/var/tmp/nginx/fastcgi--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi--http-scgi-temp-path= /var/tmp/nginx/scgi--with-stream--with-ld-opt= "-wl,-e"
Make && make install
# Configuration file Replacement
Cp/usr/local/src/nginx.cnf/etc/nginx/nginx.conf
# launch Nginx specified configuration file, Vhost to be added
/usr/sbin/nginx-c/etc/nginx/nginx.conf
#php编译
Tar zxvf php-5.5.27.tar.gz
CD php-5.5.27
./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php5/etc--with-mysql=/usr/local/mysql-- With-mysqli=/usr/local/mysql/bin/mysql_config--with-mysql-sock=/tmp/mysql.sock--with-gd--with-iconv--with-zlib --enable-xml--enable-bcmath--enable-shmop--enable-sysvsem--enable-inline-optimization--enable-mbregex-- ENABLE-FPM--enable-mbstring--enable-ftp--enable-gd-native-ttf--with-openssl--enable-pcntl--enable-sockets-- With-xmlrpc--enable-zip--enable-soap--without-pear--with-gettext--enable-session--with-mcrypt--with-curl-- with-jpeg-dir=/usr/local/jpeg6/--with-png-dir=/usr/local/png--with-freetype-dir=/usr/local/freetype
Make && make install
# Configuration file Replacement
CP Php.ini-production/usr/local/php/etc/php.ini
Ln-s/usr/local/php/etc/php.ini/etc/php.ini
Cp/usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.conf
Ln-s/usr/local/php/etc/php-fpm.conf/etc/php-fpm.conf
/usr/local/php/sbin/php-fpm
#防火墙开启端口
Firewall-cmd--zone=public--add-port=80/tcp--permanent
Firewall-cmd--reload
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
LNMP Compile and install (centos7+nginx1.9+mysql5.6+php5.5)