1. Turn off SELinux
- Edit/etc/selinux/config
- selinux= "Disabled"
2. Install the compiler
Yum Install GCC gcc-c++-y
3. Installing the PHP Component
Yum Install Perl Install libxml2 libxml2-devel libmcrypt zlib autoconf curl-devel libxpm-devel
4. Install Mysql
: http://dev.mysql.com/downloads/mysql/
Yum Install ncurses ncurses-devel cmake
Cmake-dcmake_install_prefix=/usr/local/mysql
Make && make install
Groupadd MySQL && useradd-g mysql MySQL
[Modify Mysql config file]
* The specified path needs to be changed to MySQL for the owning user and user group
* You need to change the MySQL installation directory user and user group to MySQL
1 [Mysqld]2datadir=/data/mysql//database file storage directory3socket=/tmp/Mysql.sock//sock file storage directory4User=MySQL//MySQL running user5# Disabling symbolic-links are recommended to prevent assorted security risks6symbolic-links=07 8 [Mysqld_safe]9log-error=/var/log/mysqld.log//MySQL error log pathTenpid-file=/var/run/mysqld/mysqld.pid//PID file path
[Initialize Database]
cd/usr/local/MySQL. /scripts/mysql_install_db--datadir=/data/mysql/--user=mysql--basedir=/usr/local/mysql/
4. Installing OpenSSL
Official website: http://www.openssl.org/
5. Installing Jpeg6
: http://ijg.org/files/
Mkdir/usr/local/jpeg6
Mkdir/usr/local/jpeg6/bin
Mkdir/usr/local/jpeg6/lib
Mkdir/usr/local/jpeg6/include
Mkdir/usr/local/jpeg6/man
Mkdir/usr/local/jpeg6/man/man1
./configure--prefix=/usr/local/jpeg6/--enable-shared--enable-static make make Install
6. Installing libpng
: http://www.libpng.org/pub/png/libpng.html
./configure--prefix=/usr/local/libpngmake make andinstall
7. Installing FreeType
: http://sourceforge.net/projects/freetype/files/
./configure--prefix=/usr/local/freetypemake make andinstall
8. Install GD Library
: http://libgd.bitbucket.org/
Compile parameters |
Explain |
Prefix |
installation directory |
With-jpeg |
JPEG installation directory |
With-png |
PNG installation directory |
With-freetype |
FreeType installation directory |
|
|
5. Install PHP
Official website: http://php.net/
Compile parameters |
Explain |
Prefix |
installation directory |
enable-fpm |
Open PHP-FPM |
With-fpm-user |
PHP-FPM Running Users |
With-fpm-group |
PHP-FPM running groups of users |
With-openssl |
Compile OpenSSL [Specify path to fourth installation] |
With-pdo-mysql |
Compile pdo-mysql support for MySQL |
With-pdo-oci |
Compiling PDO-OCI support for Oracle |
With-mysqli |
Compiling the With-mysqli module [path of Mysql_config] |
With-gd |
Compiling the GD module |
With-odbc |
Compiling ODBC modules |
With-png-dir |
Compiling a PNG module |
With-jpeg-dir |
Compiling the JPCG module |
With-curl |
Compiling the Curl module |
With-mysql |
Compiling the MySQL module |
Error encountered:
Configure:error:png.h not found.
CentOS 6.4 LNMP Environment compilation installation