Build the Environment: Centos 6.8,nginx 1.9.14,mysql 5.6.23,php 5.6.17
Objective: Lnmp has now become a mainstream Web server building solution, such as the company's internal Ecstore,discuz, which is planned to replace the Zabbix of the NAGIOS+CHECK_MK monitoring platform. Can be based on LNMP. This stand-alone LNMP build to be familiar with the e-commerce cluster to prepare, by the way, record the construction process, the province of each build, the next time the building will have to start again.
LNMP Installation Environment Preparation:
Yum-y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-deve L zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel Curl curl-devel e2fsprogs E2 Fsprogs-devel krb5 krb5-devel libidn libidn-devel OpenSSL openssl-devel openldap openldap-devel openldap-clients Openldap-servers make libtool* git tree bision pcre-devel perl
Installing Libiconv
Cd/usr/local/srcwget Http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gztar zxvf libiconv-1.14.tar.gz CD libiconv-1.14/./configure--prefix=/usr/local make && make install
Installing Libmcrypt
Cd/usr/local/srcwget FTP://MCRYPT.HELLUG.GR/PUB/CRYPTO/MCRYPT/LIBMCRYPT/LIBMCRYPT-2.5.7.TAR.GZTAR-ZXVF LIBMCRYPT-2.5.7.TAR.GZCD libmcrypt-2.5.7./configuremake make install CD libltdl/./configure--enable-ltdl-install Make make Install
Installing Mhash
wget Http://sourceforge.net/projects/mhash/files/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz/downloadtar XFMHASH-0.9.9.9.TAR.BZ2 CD mhash-0.9.9.9./configuremake&& make install
Installing Mcript
CD /USR/LOCAL/SRCTAR ZXVF MCRYPT-2.6.8.TAR.GZ CD mcrypt-2.6.8/ export ld_library_path=/usr/local/lib: $LD _library_path #注意一下这步运行下, Otherwise, the following may be an error./configure make make install
Ln-s/usr/local/lib/libmcrypt.la/usr/lib/libmcrypt.la ln-s/usr/local/lib/libmcrypt.so/usr/lib/libmcrypt.so ln-s/ Usr/local/lib/libmcrypt.so.4/usr/lib/libmcrypt.so.4 ln-s/usr/local/lib/libmcrypt.so.4.4.8/usr/lib/ libmcrypt.so.4.4.8 ln-s/usr/local/lib/libmhash.a/usr/lib/libmhash.a ln-s/usr/local/lib/libmhash.la/usr/lib/ libmhash.la ln-s/usr/local/lib/libmhash.so/usr/lib/libmhash.so ln-s/usr/local/lib/libmhash.so.2/usr/lib/ Libmhash.so.2 ln-s/usr/local/lib/libmhash.so.2.0.1/usr/lib/libmhash.so.2.0.1 ln-s/usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
MySQL compilation installation
Install cmake (remember that you need to cmake compile the installation from MySQL 5.5), from download in https://cmake.org/download/.
Tar zxvfcmake-3.4.1.tar.gzcd cmake-3.4.1./bootstrapmake && make install
Second, create the user and MySQL required directory
New MySQL User
Groupadd-r mysqluseradd-r-G MySQL MySQL
New MySQL Required Directory
Mkdir-p/usr/local/mysql mkdir-p/data/mysqldb
Database file directory creation can be referenced http://zhoufan.blog.51cto.com/4278592/1790308 create LVM and Mount.
Third, compile and install MySQL
MySQL source code can be downloaded from http://dev.mysql.com/downloads/mysql/.
Tar zxvf mysql-5.6.23.tar.gzcd mysql-5.6.23cmake-dcmake_install_prefix=/usr/local/mysql\-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=1\- Dsysconfdir=/etc\-dwith_ssl=system\-dwith_zlib=system\-dwith_libwrap=0make&& make install
This article is from the "Frank" blog, so be sure to keep this source http://zhoufan.blog.51cto.com/4278592/1793095
Centos 6 compile and install LNMP