In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you CentOS 7.x how to compile and install Nginx1.10.3+MySQL5.7.16+PHP multi-version omnipotent environment, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Preparation article
I. Firewall configuration
CentOS 7.x uses firewall as the firewall by default, which is changed to iptables firewall here.
1. Close firewall:
Systemctl stop firewalld.service # stop firewall
Systemctl disable firewalld.service # prevents firewall from booting
2. Install iptables firewall
Yum install iptables-services # installation
Vi / etc/sysconfig/iptables # Editing Firewall profile
# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
* filter
: INPUT ACCEPT [0:0]
: FORWARD ACCEPT [0:0]
: OUTPUT ACCEPT [0:0]
-An INPUT-m state-- state RELATED,ESTABLISHED-j ACCEPT
-An INPUT-p icmp-j ACCEPT
-An INPUT-I lo-j ACCEPT
-An INPUT-p tcp-m state-- state NEW-m tcp-- dport 22-j ACCEPT
-An INPUT-p tcp-m state-- state NEW-m tcp-- dport 80-j ACCEPT
-An INPUT-p tcp-m state-- state NEW-m tcp-- dport 3306-j ACCEPT
-An INPUT-j REJECT-- reject-with icmp-host-prohibited
-A FORWARD-j REJECT-- reject-with icmp-host-prohibited
COMMIT
: wq! # Save exit
Systemctl restart iptables.service # finally restart the firewall to make the configuration effective
Systemctl enable iptables.service # set the firewall to boot
/ usr/libexec/iptables/iptables.init restart # restart the firewall
2. Close SELINUX
Vi / etc/selinux/config
# SELINUX=enforcing # comment out
# SELINUXTYPE=targeted # comment out
SELINUX=disabled # increased
: wq! # Save exit
Setenforce 0 # makes the configuration effective immediately
III. System agreement
Software source code package location: / usr/local/src
Source package compilation installation location: / usr/local/ software name
Download the software package
1. Download nginx
Http://nginx.org/download/nginx-1.10.3.tar.gz
2. Download MySQL
Https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.16.tar.gz
3. Download php
Http://mirrors.sohu.com/php/php-7.1.3.tar.gz
Http://mirrors.sohu.com/php/php-7.0.17.tar.gz
Http://mirrors.sohu.com/php/php-5.6.30.tar.gz
Http://mirrors.sohu.com/php/php-5.5.38.tar.gz
Http://mirrors.sohu.com/php/php-5.4.45.tar.gz
Http://mirrors.sohu.com/php/php-5.3.29.tar.gz
Http://museum.php.net/php5/php-5.2.17.tar.gz
Http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz
4. Download cmake (MySQL compilation tool)
Https://cmake.org/files/v3.7/cmake-3.7.2.tar.gz
5. Download pcre (nginx pseudo-static is supported)
Ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz
6. Download openssl (nginx extension)
Https://www.openssl.org/source/openssl-1.1.0e.tar.gz
7. Download zlib (nginx extension)
Http://www.zlib.net/zlib-1.2.11.tar.gz
8. Download libmcrypt (php extension)
Https://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
9. Download yasm (php extension)
Http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
10. T1lib (php extension)
Http://download.freenas.org/distfiles/t1lib-5.1.2.tar.gz
11. Download the gd library installation package
Https://github.com/libgd/libgd/releases/download/gd-2.1.1/libgd-2.1.1.tar.gz
12. Libvpx (required for gd library)
Https://codeload.github.com/webmproject/libvpx/tar.gz/v1.3.0
13. Tiff (required for gd library)
Http://download.osgeo.org/libtiff/tiff-4.0.7.tar.gz
14. Libpng (required for gd library)
Ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.28.tar.gz
15. Freetype (required for gd library)
Http://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.gz
16. Jpegsrc (required for gd library)
Http://www.ijg.org/files/jpegsrc.v9b.tar.gz
17. Boost (required to compile mysql)
Https://ufpr.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz
The above packages are uploaded to the / usr/local/src directory
Install compilation tools and library files (install using yum command)
Yum install-y apr* autoconf automake bison bzip2 bzip2* cloog-ppl compat* cpp curl curl-devel fontconfig fontconfig-devel freetype freetype* freetype-devel gcc gcc-c++ gtk+-devel gd gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel libtool* libgomp libxml2 libxml2-devel libXpm* libxml* libXaw-devel libXmu-devel libtiff libtiff* make mpfr ncurses* ntp openssl openssl-devel patch pcre-devel perl php-common php-gd policycoreutils telnet t1lib t1lib * nasm nasm* wget zlib-devel
Installation section
The following is done by using the putty tool to remotely log in to the server and operate under the command line
First, install MySQL
1. Install cmake
Cd / usr/local/src
Tar zxvf cmake-3.7.2.tar.gz
Cd cmake-3.7.2
. / configure
Make
Make install
2. Install MySQL
Cd / usr/local/src
Mkdir-p / usr/local/boost
Cp boost_1_59_0.tar.gz / usr/local/boost
Groupadd mysql # add mysql Group
Useradd-g mysql mysql-s / bin/false # create a user mysql and join the mysql group, and do not allow mysql users to log in directly to the system
Mkdir-p / data/mysql # create MySQL database storage directory
Chown-R mysql:mysql / data/mysql # sets MySQL database storage directory permissions
Mkdir-p / usr/local/mysql # create the MySQL installation directory
Cd / usr/local/src # enters the package storage directory
Tar zxvf mysql-5.7.16.tar.gz # decompression
Cd mysql-5.7.16 # enter the directory
Cmake. -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DMYSQL_DATADIR=/data/mysql-DWITH_INNOBASE_STORAGE_ENGINE=1-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DWITH_EMBEDDED_SERVER=OFF-DWITH_BOOST=/usr/local/boost
Note: you can use the-DDOWNLOAD_BOOST=1-DWITH_BOOST=/usr/local/boost parameter to install the boost package online, which requires the server to connect to the network, so it is easy to download and fail.
Cmake. -DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DMYSQL_DATADIR=/data/mysql-DMYSQL_UNIX_ADDR=/tmp/mysql.sock-DMYSQL_USER=mysql-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DENABLED_LOCAL_INFILE=ON-DWITH_INNOBASE_STORAGE_ENGINE=1-DWITH_FEDERATED_STORAGE_ENGINE=1-DWITH_BLACKHOLE_STORAGE_ENGINE=1-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1-DWITH_EMBEDDED_SERVER=OFF-DDOWNLOAD_BOOST=1-DWITH_BOOST=/usr/local/boost
Make # compilation
Make install # installation
Compilation error, before recompilation to delete the failed file, recompile, need to clear the old object files and cache information.
Make clean
Rm-f CMakeCache.txt
Rm-rf / etc/my.cnf # Delete the default configuration file of the system (do not delete it if there is no default)
Cd / usr/local/mysql # enter the MySQL installation directory
. / bin/mysqld-- user=mysql-- initialize-- basedir=/usr/local/mysql-- datadir=/data/mysql # generate mysql system database
-- initialize means the password is generated by default,-- initialize-insecure means no password is generated, and the password is empty.
See this line [Note] A temporary password is generated for root@localhost: I > X18*=Rav=7
Cp / usr/local/mysql/support-files/my-default.cnf / usr/local/mysql/my.cnf
Ln-s / usr/local/mysql/my.cnf / etc/my.cnf # soft connections added to the / etc directory
Cp / usr/local/mysql/support-files/mysql.server / etc/rc.d/init.d/mysqld # add Mysql to the system startup
Chmod 755 / etc/init.d/mysqld # increased execution permissions
Chkconfig mysqld on # join Boot Boot
Vi / etc/rc.d/init.d/mysqld # editing
Basedir=/usr/local/mysql # MySQL Program installation path
Datadir=/data/mysql # MySQl database storage directory
: wq! # Save exit
Service mysqld start # Startup
Vi / etc/profile # adds the mysql service to the system environment variable: add the following line at the end
Export PATH=$PATH:/usr/local/mysql/bin
: wq! # Save exit
Source / etc/profile # makes the configuration effective immediately
The following two lines link the library files of myslq to the default location of the system, so that you don't have to specify the library file address of mysql when compiling software like PHP.
Ln-s / usr/local/mysql/lib/mysql / usr/lib/mysql
Ln-s / usr/local/mysql/include/mysql / usr/include/mysql
Mkdir / var/lib/mysql # create directory
Ln-s / tmp/mysql.sock / var/lib/mysql/mysql.sock # add soft links
Mysql_secure_installation # modify the Mysql password, enter the previously generated secret CSJlm3DyTG.d enter, and follow the prompts.
Press y | Y for Yes, any other key for No: y # do you want to install password security plug-ins? Select y
There are three levels of password validation policy: # there are several password strength choices
LOW Length > = 8
MEDIUM Length > = 8, numeric, mixed case, and special characters
STRONG Length > = 8, numeric, mixed case, special characters and dictionary file
Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0 # Select 0, as long as 8 digits, select 1 with uppercase, lowercase, special characters, etc.
UNINSTALL PLUGIN validate_password; # Uninstall the password strength plugin
Use mysql
Update mysql.user set authentication_string=password ('123456') where user='root'; # Log in to the mysql console to modify
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password AS' 123456password; # change password
Second, install Nginx
1. Install pcre
Cd / usr/local/src
Mkdir / usr/local/pcre
Tar zxvf pcre-8.40.tar.gz
Cd pcre-8.40
. / configure-- prefix=/usr/local/pcre
Make
Make install
2. Install openssl
Cd / usr/local/src
Mkdir / usr/local/openssl
Tar zxvf openssl-1.1.0e.tar.gz
Cd openssl-1.1.0e
. / config-- prefix=/usr/local/openssl
Make
Make install
Vi / etc/profile
Export PATH=$PATH:/usr/local/openssl/bin
: wq!
Source / etc/profile
3. Install zlib
Cd / usr/local/src
Mkdir / usr/local/zlib
Tar zxvf zlib-1.2.11.tar.gz
Cd zlib-1.2.11
. / configure-- prefix=/usr/local/zlib
Make
Make install
4. Install Nginx
Groupadd www
Useradd-g www www-s / bin/false
Cd / usr/local/src
Tar zxvf nginx-1.10.3.tar.gz
Cd nginx-1.10.3
/ configure-- prefix=/usr/local/nginx-- without-http_memcached_module-- user=www-- group=www-- with-http_stub_status_module-- with-http_ssl_module-- with-http_gzip_static_module-- with-openssl=/usr/local/src/openssl-1.1.0e-- with-zlib=/usr/local/src/zlib-1.2.11-- with-pcre=/usr/local/src/pcre-8.40
Note:-- with-openssl=/usr/local/src/openssl-1.1.0e-- with-zlib=/usr/local/src/zlib-1.2.11-- with-pcre=/usr/local/src/pcre-8.40 points to the path of decompression of the source package, not the path of installation, otherwise an error will be reported.
Make
Make install
/ usr/local/nginx/sbin/nginx # launch Nginx
Set nginx to boot
Vi / etc/rc.d/init.d/nginx # Edit startup file to add the following
# # #
#! / bin/sh
#
# nginx-this script starts and stops the nginx daemon
#
# chkconfig:-85 15
# description: Nginx is an HTTP (S) server, HTTP (S) reverse\
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: / etc/nginx/nginx.conf
# config: / usr/local/nginx/conf/nginx.conf
# pidfile: / usr/local/nginx/logs/nginx.pid
# Source function library.
. / etc/rc.d/init.d/functions
# Source networking configuration.
. / etc/sysconfig/network
# Check that networking is up.
["$NETWORKING" = "no"] & & exit 0
Nginx= "/ usr/local/nginx/sbin/nginx"
Prog=$ (basename $nginx)
NGINX_CONF_FILE= "/ usr/local/nginx/conf/nginx.conf"
[- f / etc/sysconfig/nginx] & &. / etc/sysconfig/nginx
Lockfile=/var/lock/subsys/nginx
Make_dirs () {
# make required directories
User= `$ nginx-V 2 > & 1 | grep "configure arguments:" | sed's / [^ *] *-- user=\ ([^] *\). * /\ 1Uniple g'- `
If [- z "`grep $user / etc/ passwd`]; then
Useradd-M-s / bin/nologin $user
Fi
Options= `$ nginx-V 2 > & 1 | grep 'configure arguments:' `
For opt in $options; do
If [`echo $opt | grep'. *-temp-path' `]; then
Value= `echo $opt | cut-d "="-f 2`
If [!-d "$value"]; then
# echo "creating" $value
Mkdir-p $value & & chown-R $user $value
Fi
Fi
Done
}
Start () {
[- x $nginx] | | exit 5
[- f $NGINX_CONF_FILE] | | exit 6
Make_dirs
Echo-n $"Starting $prog:"
Daemon $nginx-c $NGINX_CONF_FILE
Retval=$?
Echo
[$retval-eq 0] & & touch $lockfile
Return $retval
}
Stop () {
Echo-n $"Stopping $prog:"
Killproc $prog-QUIT
Retval=$?
Echo
[$retval-eq 0] & & rm-f $lockfile
Return $retval
}
Restart () {
# configtest | | return $?
Stop
Sleep 1
Start
}
Reload () {
# configtest | | return $?
Echo-n $"Reloading $prog:"
Killproc $nginx-HUP
RETVAL=$?
Echo
}
Force_reload () {
Restart
}
Configtest () {
$nginx-t-c $NGINX_CONF_FILE
}
Rh_status () {
Status $prog
}
Rh_status_q () {
Rh_status > / dev/null 2 > & 1
}
Case "$1" in
Start)
Rh_status_q & & exit 0
, 1
Stop)
Rh_status_q | | exit 0
, 1
Restart | configtest)
, 1
Reload)
Rh_status_q | | exit 7
, 1
Force-reload)
Force_reload
Status)
Rh_status
Condrestart | try-restart)
Rh_status_q | | exit 0
*)
Echo $"Usage: $0 {start | stop | status | restart | condrestart | try-restart | reload | force-reload | configtest}"
Exit 2
Esac
# # #
: wq! # Save exit
Chmod 775 / etc/rc.d/init.d/nginx # gives file execution permissions
Chkconfig nginx on # set boot up
/ etc/rc.d/init.d/nginx restart # restart
Open the server IP address in the browser and you will see the following interface, indicating that Nginx has been installed successfully.
Extended reading:
The method of directly downloading txt, pdf, doc, xls and other files in Nginx configuration
Add the following code to the nginx configuration file
Location / {
If ($request_filename ~ * ^. *?\. (txt | pdf | doc | xls) $) {
Add_header Content-Disposition: 'attachment;'
}
}
Third, install php
1. Install yasm
Cd / usr/local/src
Tar zxvf yasm-1.3.0.tar.gz
Cd yasm-1.3.0
. / configure
Make
Make install
2. Install libmcrypt
Cd / usr/local/src
Tar zxvf libmcrypt-2.5.8.tar.gz
Cd libmcrypt-2.5.8
. / configure
Make
Make install
3. Install libvpx
Cd / usr/local/src
Tar zxvf libvpx-1.3.0.tar.gz
Cd libvpx-1.3.0
. / configure-- prefix=/usr/local/libvpx-- enable-shared-- enable-vp9
Make
Make install
4. Install tiff
Cd / usr/local/src
Tar zxvf tiff-4.0.7.tar.gz
Cd tiff-4.0.7
. / configure-prefix=/usr/local/tiff-enable-shared
Make
Make install
5. Install libpng
Cd / usr/local/src
Tar zxvf libpng-1.6.28.tar.gz
Cd libpng-1.6.28
. / configure-prefix=/usr/local/libpng-enable-shared
Make
Make install
6. Install freetype
Cd / usr/local/src
Tar zxvf freetype-2.7.1.tar.gz
Cd freetype-2.7.1
. / configure-prefix=/usr/local/freetype-enable-shared
Make
Make install
7. Install jpeg
Cd / usr/local/src
Tar zxvf jpegsrc.v9b.tar.gz
Cd jpeg-9b
. / configure-prefix=/usr/local/jpeg-enable-shared
Make
Make install
8. Install libgd
Cd / usr/local/src
Tar zxvf libgd-2.1.1.tar.gz
Cd libgd-2.1.1
. / configure-- prefix=/usr/local/libgd-- enable-shared-- with-jpeg=/usr/local/jpeg-- with-png=/usr/local/libpng-- with-freetype=/usr/local/freetype-- with-fontconfig=/usr/local/freetype-- with-xpm=/usr/lib64-- with-tiff=/usr/local/tiff-- with-vpx=/usr/local/libvpx
Make
Make install
Note: if libgd compilation fails, you can skip it and directly use the default version 2.1.0 of the system. When compiling php, change the parameter-- with-gd=/usr/local/libgd to-- with-gd.
9. Install t1lib
Cd / usr/local/src
Tar zxvf t1lib-5.1.2.tar.gz
Cd t1lib-5.1.2
. / configure-prefix=/usr/local/t1lib-enable-shared
Make without_doc
Make install
10. Install php
Note: if the system is 64-bit, execute the following two commands, otherwise there will be an error in installing php.
\ cp-frp / usr/lib64/libltdl.so* / usr/lib/
\ cp-frp / usr/lib64/libXpm.so* / usr/lib/
10.1. Install php7.1.3
Cd / usr/local/src
Tar-zvxf php-7.1.3.tar.gz
Cd php-7.1.3
Export LD_LIBRARY_PATH=/usr/local/libgd/lib
. / configure-- prefix=/usr/local/php71-- with-config-file-path=/usr/local/php71/etc-- with-mysqli=/usr/local/mysql/bin/mysql_config-- with-mysql-sock=/tmp/mysql.sock-- with-pdo-mysql=/usr/local/mysql-- with-gd=/usr/local/libgd-- with-png-dir=/usr/local/libpng-- with-jpeg-dir=/usr/local/jpeg-- with-freetype-dir=/usr/local / freetype-- with-xpm-dir=/usr/lib64-- with-zlib-dir=/usr/local/zlib-- with-iconv-- enable-libxml-- enable-xml-- enable-shmop-- enable-sysvsem-- enable-inline-optimization-- enable-opcache-- 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-- enable-ctype-- enable-mysqlnd
Make # compilation
Make install # installation
Note: if prompted by the wrong version of libgd, change the php compilation parameter-- with-gd=/usr/local/libgd to-- with-gd.
Cp php.ini-production / usr/local/php71/etc/php.ini # copy the php configuration file to the installation directory
Rm-rf / etc/php.ini # Delete the configuration file that comes with the system
Ln-s / usr/local/php71/etc/php.ini / etc/php.ini # add soft link to / etc directory
Cp / usr/local/php71/etc/php-fpm.conf.default / usr/local/php71/etc/php-fpm.conf # copy template file as php-fpm configuration file
Ln-s / usr/local/php71/etc/php-fpm.conf / etc/php-fpm.conf # add a soft connection to the / etc directory
Vi / usr/local/php71/etc/php-fpm.conf # editing
Pid = run/php-fpm.pid # cancel the previous semicolon
Include=/usr/local/php71/etc/php-fpm.d/*.conf
: wq! # Save exit
Cp / usr/local/php71/etc/php-fpm.d/www.conf.default / usr/local/php71/etc/php-fpm.d/www.conf
Vi / usr/local/php71/etc/php-fpm.d/www.conf # editing
User = www # set the php-fpm running account to www
Group = www # set the php-fpm running group to www
Listen = 127.0.0.1 9000
: wq! # Save exit
Set php-fpm to boot
Cp / usr/local/src/php-7.1.3/sapi/fpm/init.d.php-fpm / etc/rc.d/init.d/php71-fpm # copy php-fpm to the startup directory
Chmod + x / etc/rc.d/init.d/php71-fpm # add execute permission
Chkconfig php71-fpm on # set boot up
Vi / etc/rc.d/init.d/php71-fpm
Prefix=/usr/local/php71
Php_fpm_BIN=$ {exec_prefix} / sbin/php71-fpm
: wq! # Save exit
Mv / usr/local/php71/sbin/php-fpm / usr/local/php71/sbin/php71-fpm
Vi / usr/local/php71/etc/php.ini # Edit configuration file
Find: disable_functions =
Modified to: disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups Posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname
# list the functions that can be disabled by PHP. If some programs need to use this function, you can delete it and undisable it.
Find:; date.timezone =
Change it to: date.timezone = PRC # set time zone
Find: expose_php = On
Modified to: expose_php = Off # suppresses the display of php version information
Find: short_open_tag = Off
Modified to: short_open_tag = ON # supports php short tags
Find opcache.enable=0.
Modified to support opcode caching for opcache.enable=1 # php
Found:; opcache.enable_cli=1 # php supports opcode caching
Modified to: opcache.enable_cli=0
On the last line, add: zend_extension=opcache.so # to enable opcode caching
: wq! # Save exit
10.2. Install php7.0.17
Note: if the system is 64-bit, execute the following command, otherwise there will be an error in installing php.
\ cp-frp / usr/lib64/libltdl.so* / usr/lib/
\ cp-frp / usr/lib64/libXpm.so* / usr/lib/
Cd / usr/local/src
Tar-zvxf php-7.0.17.tar.gz
Cd php-7.0.17
Export LD_LIBRARY_PATH=/usr/local/libgd/lib
. / configure-- prefix=/usr/local/php70-- with-config-file-path=/usr/local/php70/etc-- with-mysqli=/usr/local/mysql/bin/mysql_config-- with-mysql-sock=/tmp/mysql.sock-- with-pdo-mysql=/usr/local/mysql-- with-gd=/usr/local/libgd-- with-png-dir=/usr/local/libpng-- with-jpeg-dir=/usr/local/jpeg-- with-freetype-dir=/usr/local / freetype-- with-xpm-dir=/usr/lib64-- with-zlib-dir=/usr/local/zlib-- with-iconv-- enable-libxml-- enable-xml-- enable-shmop-- enable-sysvsem-- enable-inline-optimization-- enable-opcache-- 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-- enable-ctype-- enable-mysqlnd
Make # compilation
Make install # installation
Note: if you are prompted for the wrong version of libgd, modify the php compilation parameter-- with-gd=/usr/local/libgd to-- with-gd.
Cp php.ini-production / usr/local/php70/etc/php.ini # copy the php configuration file to the installation directory
# rm-rf / etc/php.ini # Delete the configuration file that comes with the system
# ln-s / usr/local/php70/etc/php.ini / etc/php.ini # add soft link to / etc directory
Cp / usr/local/php70/etc/php-fpm.conf.default / usr/local/php70/etc/php-fpm.conf # copy template file as php-fpm configuration file
# ln-s / usr/local/php70/etc/php-fpm.conf / etc/php-fpm.conf # add a soft connection to the / etc directory
Vi / usr/local/php70/etc/php-fpm.conf # editing
Pid = run/php-fpm.pid # cancel the previous semicolon
Include=/usr/local/php70/etc/php-fpm.d/*.conf
: wq! # Save exit
Cp / usr/local/php70/etc/php-fpm.d/www.conf.default / usr/local/php70/etc/php-fpm.d/www.conf
Vi / usr/local/php70/etc/php-fpm.d/www.conf # editing
User = www # set the php-fpm running account to www
Group = www # set the php-fpm running group to www
Listen = 127.0.0.1purl 9001
: wq! # Save exit
Set php-fpm to boot
Cp / usr/local/src/php-7.0.17/sapi/fpm/init.d.php-fpm / etc/rc.d/init.d/php70-fpm # copy php-fpm to the startup directory
Chmod + x / etc/rc.d/init.d/php70-fpm # add execute permission
Chkconfig php70-fpm on # set boot up
Vi / etc/rc.d/init.d/php70-fpm
Prefix=/usr/local/php70
Php_fpm_BIN=$ {exec_prefix} / sbin/php70-fpm
: wq! # Save exit
Mv / usr/local/php70/sbin/php-fpm / usr/local/php70/sbin/php70-fpm
Vi / usr/local/php70/etc/php.ini # Edit configuration file
Find: disable_functions =
Modified to: disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups Posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname
# list the functions that can be disabled by PHP. If some programs need to use this function, you can delete it and undisable it.
Find:; date.timezone =
Change it to: date.timezone = PRC # set time zone
Find: expose_php = On
Modified to: expose_php = Off # suppresses the display of php version information
Find: short_open_tag = Off
Modified to: short_open_tag = ON # supports php short tags
Find opcache.enable=0.
Modified to support opcode caching for opcache.enable=1 # php
Found:; opcache.enable_cli=1 # php supports opcode caching
Modified to: opcache.enable_cli=0
On the last line, add: zend_extension=opcache.so # to enable opcode caching
: wq! # Save exit
10.3. Install php5.6.30
Note: if the system is 64-bit, execute the following two commands, otherwise there will be an error in installing php (32-bit system does not need to be executed)
\ cp-frp / usr/lib64/libltdl.so* / usr/lib/
\ cp-frp / usr/lib64/libXpm.so* / usr/lib/
Cd / usr/local/src
Tar-zvxf php-5.6.30.tar.gz
Cd php-5.6.30
Export LD_LIBRARY_PATH=/usr/local/libgd/lib
. / configure-- prefix=/usr/local/php56-- with-config-file-path=/usr/local/php56/etc-- with-mysql=/usr/local/mysql-- with-mysqli=/usr/local/mysql/bin/mysql_config-- with-mysql-sock=/tmp/mysql.sock-- with-pdo-mysql=/usr/local/mysql-- with-gd=/usr/local/libgd-- with-png-dir=/usr/local/libpng-- with-jpeg-dir=/usr/local/jpeg -with-freetype-dir=/usr/local/freetype-- with-xpm-dir=/usr/lib64-- with-vpx-dir=/usr/local/libvpx/-- with-zlib-dir=/usr/local/zlib-- with-t1lib=/usr/local/t1lib-- with-iconv-- enable-libxml-- enable-xml-- enable-bcmath-- enable-shmop-- enable-sysvsem-- enable-inline-optimization-- enable-opcache-- 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-- enable-ctype-- enable-mysqlnd
Make # compilation
Make install # installation
If there is a compilation error, you can clean it up and compile it again.
Make clean # cleanup
Make # compilation
Cp php.ini-production / usr/local/php56/etc/php.ini # copy the php configuration file to the installation directory
# rm-rf / etc/php.ini # Delete the configuration file that comes with the system
# ln-s / usr/local/php56/etc/php.ini / etc/php.ini # add soft link to / etc directory
Cp / usr/local/php56/etc/php-fpm.conf.default / usr/local/php56/etc/php-fpm.conf # copy template file as php-fpm configuration file
# ln-s / usr/local/php56/etc/php-fpm.conf / etc/php-fpm.conf # add a soft connection to the / etc directory
Vi / usr/local/php56/etc/php-fpm.conf # editing
User = www # set the php-fpm running account to www
Group = www # set the php-fpm running group to www
Pid = run/php-fpm.pid # cancel the previous semicolon
Listen = 127.0.0.1purl 9002
: wq! # Save exit
Set php-fpm to boot
Cp / usr/local/src/php-5.6.30/sapi/fpm/init.d.php-fpm / etc/rc.d/init.d/php56-fpm # copy php-fpm to the startup directory
Chmod + x / etc/rc.d/init.d/php56-fpm # add execute permission
Chkconfig php56-fpm on # set boot up
Vi / etc/rc.d/init.d/php56-fpm
Prefix=/usr/local/php56
Php_fpm_BIN=$ {exec_prefix} / sbin/php56-fpm
: wq! # Save exit
Mv / usr/local/php56/sbin/php-fpm / usr/local/php56/sbin/php56-fpm
Vi / usr/local/php56/etc/php.ini # Edit configuration file
Find: disable_functions =
Modified to: disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups Posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname
# list the functions that can be disabled by PHP. If some programs need to use this function, you can delete it and undisable it.
Find:; date.timezone =
Change it to: date.timezone = PRC # set time zone
Find: expose_php = On
Modified to: expose_php = Off # suppresses the display of php version information
Find: short_open_tag = Off
Modified to: short_open_tag = ON # supports php short tags
Find opcache.enable=0.
Modified to support opcode caching for opcache.enable=1 # php
Found:; opcache.enable_cli=1 # php supports opcode caching
Modified to: opcache.enable_cli=0
On the last line, add: zend_extension=opcache.so # to enable opcode caching
: wq! # Save exit
10.4. Install php5.5.38
Note: if the system is 64-bit, execute the following two commands, otherwise there will be an error in installing php (32-bit system does not need to be executed)
\ cp-frp / usr/lib64/libltdl.so* / usr/lib/
\ cp-frp / usr/lib64/libXpm.so* / usr/lib/
Cd / usr/local/src
Tar-zvxf php-5.5.38.tar.gz
Cd php-5.5.38
Export LD_LIBRARY_PATH=/usr/local/libgd/lib
. / configure-- prefix=/usr/local/php55-- with-config-file-path=/usr/local/php55/etc-- with-mysql=/usr/local/mysql-- with-mysqli=/usr/local/mysql/bin/mysql_config-- with-mysql-sock=/tmp/mysql.sock-- with-pdo-mysql=/usr/local/mysql-- with-gd=/usr/local/libgd-- with-png-dir=/usr/local/libpng-- with-jpeg-dir=/usr/local/jpeg -with-freetype-dir=/usr/local/freetype-- with-xpm-dir=/usr/-- with-vpx-dir=/usr/local/libvpx/-- with-zlib-dir=/usr/local/zlib-- with-t1lib=/usr/local/t1lib-- with-iconv-- enable-libxml-- enable-xml-- enable-bcmath-- enable-shmop-- enable-sysvsem-- enable-inline-optimization-- enable-opcache-- 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-- enable-ctype-- enable-mysqlnd
Make # compilation
Make install # installation
Cp php.ini-production / usr/local/php55/etc/php.ini # copy the php configuration file to the installation directory
# rm-rf / etc/php.ini # Delete the configuration file that comes with the system
# ln-s / usr/local/php55/etc/php.ini / etc/php.ini # add soft link to / etc directory
Cp / usr/local/php55/etc/php-fpm.conf.default / usr/local/php55/etc/php-fpm.conf # copy template file as php-fpm configuration file
# ln-s / usr/local/php/etc/php-fpm.conf / etc/php-fpm.conf # add a soft connection to the / etc directory
Vi / usr/local/php55/etc/php-fpm.conf # editing
User = www # set the php-fpm running account to www
Group = www # set the php-fpm running group to www
Pid = run/php-fpm.pid # cancel the previous semicolon
Listen = 127.0.0.1 purl 9003
: wq! # Save exit
Set php-fpm to boot
Cp / usr/local/src/php-5.5.38/sapi/fpm/init.d.php-fpm / etc/rc.d/init.d/php55-fpm # copy php-fpm to the startup directory
Chmod + x / etc/rc.d/init.d/php55-fpm # add execute permission
Chkconfig php55-fpm on # set boot up
Vi / etc/rc.d/init.d/php55-fpm
Prefix=/usr/local/php55
Php_fpm_BIN=$ {exec_prefix} / sbin/php55-fpm
: wq! # Save exit
Mv / usr/local/php55/sbin/php-fpm / usr/local/php55/sbin/php55-fpm
Vi / usr/local/php55/etc/php.ini # Edit configuration file
Find: disable_functions =
Modified to: disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups Posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname
# list the functions that can be disabled by PHP. If some programs need to use this function, you can delete it and undisable it.
Find:; date.timezone =
Change it to: date.timezone = PRC # set time zone
Find: expose_php = On
Modified to: expose_php = Off # suppresses the display of php version information
Find: short_open_tag = Off
Modified to: short_open_tag = ON # supports php short tags
Find opcache.enable=0.
Modified to support opcode caching for opcache.enable=1 # php
Found: opcache.enable_cli=1 # php supports opcode caching
Modified to: opcache.enable_cli=0
On the last line, add: zend_extension=opcache.so # to enable opcode caching
: wq! # Save exit
10.5. Install php5.4.45
Cd / usr/local/src
Tar-zvxf php-5.4.45.tar.gz
Cd php-5.4.45
Mkdir-p / usr/local/php54 # establish the php installation directory
. / configure-- prefix=/usr/local/php54-- with-config-file-path=/usr/local/php54/etc-- with-mysql=/usr/local/mysql-- with-mysqli=shared-- with-mysql-sock=/tmp/mysql.sock-- with-pdo-mysql=/usr/local/mysql-- with-gd-- with-png-dir=/usr/local/libpng-- with-jpeg-dir=/usr/local/jpeg-- with-freetype-dir=/usr/local/freetype-- with-xpm -dir=/usr/-- with-vpx-dir=/usr/local/libvpx/-- with-zlib-dir=/usr/local/zlib-- with-t1lib=/usr/local/t1lib-- with-iconv-- enable-libxml-- enable-bcmath-- enable-shmop-- enable-sysvsem-- enable-inline-optimization-- with-curlwrappers-- 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 enable-ctype enable-mysqlnd
Make # compilation
Make install # installation
Cp php.ini-production / usr/local/php54/etc/php.ini # copy the php configuration file to the installation directory
# rm-rf / etc/php.ini # Delete the configuration file that comes with the system
# ln-s / usr/local/php54/etc/php.ini / etc/php.ini # add soft links
Cp / usr/local/php54/etc/php-fpm.conf.default / usr/local/php54/etc/php-fpm.conf # copy template file as php-fpm configuration file
Vi / usr/local/php54/etc/php-fpm.conf # editing
User = www # set the php-fpm running account to www
Group = www # set the php-fpm running group to www
Pid = run/php-fpm.pid # cancel the previous semicolon
Listen = 127.0.0.1 purl 9004
: wq! # Save exit
Set php-fpm to boot
Cp / usr/local/src/php-5.4.45/sapi/fpm/init.d.php-fpm / etc/rc.d/init.d/php54-fpm # copy php-fpm to the startup directory
Chmod + x / etc/rc.d/init.d/php54-fpm # add execute permission
Chkconfig php54-fpm on # set boot up
Vi / etc/rc.d/init.d/php54-fpm
Prefix=/usr/local/php54
Php_fpm_BIN=$ {exec_prefix} / sbin/php54-fpm
: wq! # Save exit
Mv / usr/local/php54/sbin/php-fpm / usr/local/php54/sbin/php54-fpm
Vi / usr/local/php54/etc/php.ini # Edit configuration file
Find: disable_functions =
Modified to: disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups Posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname
# list the functions that can be disabled by PHP. If some programs need to use this function, you can delete it and undisable it.
System operation and maintenance www.osyunwei.com warm reminder: the original content of qihang01 all rights reserved, reprint please indicate the source and the original link
Find:; date.timezone =
Change it to: date.timezone = PRC # set time zone
Find: expose_php = On
Modified to: expose_php = OFF # suppresses the display of php version information
Find: short_open_tag = Off
Modified to: short_open_tag = ON # supports php short tags
# compiling php mysqli extensions
Cd / usr/local/src/php-5.4.45/ext/mysqli
/ usr/local/php54/bin/phpize
. / configure-with-php-config=/usr/local/php54/bin/php-config-with-mysqli=/usr/local/mysql/bin/mysql_config
Make
Make install
Vi / usr/local/php54/etc/php.ini
Extension=mysqli.so
: wq! # Save exit
10.6. Install php5.3.29
Cd / usr/local/src
Tar zxvf gd-2.0.35.tar.gz
Cd gd-2.0.35
/ configure-- enable-m4_pattern_allow-- prefix=/usr/local/gd-- with-jpeg=/usr/lib-- with-png=/usr/lib-- with-xpm=/usr/lib-- with-freetype=/usr/lib-- with-fontconfig=/usr/lib
Make # compilation
Make install # installation
Cd / usr/local/src
Tar-zvxf php-5.3.29.tar.gz
Cd php-5.3.29
/ configure-- prefix=/usr/local/php53-- with-config-file-path=/usr/local/php53/etc-- with-mysql=/usr/local/mysql-- with-mysqli=/usr/local/mysql/bin/mysql_config-- with-mysql-sock=/tmp/mysql.sock-- with-pdo-mysql=/usr/local/mysql-- with-gd=/usr/local/gd-- with-png-dir=/usr/lib-- with-jpeg-dir=/usr/lib-- with- Freetype-dir=/usr/lib-with-iconv-with-zlib-dir=/usr/local/zlib-enable-xml-enable-magic-quotes-enable-safe-mode-enable-bcmath-enable-shmop-enable-sysvsem-enable-inline-optimization-with-curlwrappers-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-- enable-ctype-- with-mysqli=shared-- enable-mysqlnd
Make # compilation
Make install # installation
Cp php.ini-production / usr/local/php53/etc/php.ini # copy the php configuration file to the installation directory
# rm-rf / etc/php.ini # Delete the configuration file that comes with the system
# ln-s / usr/local/php53/etc/php.ini / etc/php.ini # add soft links
Cp / usr/local/php53/etc/php-fpm.conf.default / usr/local/php53/etc/php-fpm.conf # copy template file as php-fpm configuration file
Vi / usr/local/php53/etc/php-fpm.conf # editing
User = www # set the php-fpm running account to www
Group = www # set the php-fpm running group to www
Pid = run/php-fpm.pid # cancel the previous semicolon
Listen = 127.0.0.1v 9005
: wq! # Save exit
Set php-fpm to boot
Cp / usr/local/src/php-5.3.29/sapi/fpm/init.d.php-fpm / etc/rc.d/init.d/php53-fpm # copy php-fpm to the startup directory
Chmod + x / etc/rc.d/init.d/php53-fpm # add execute permission
Chkconfig php53-fpm on # set boot up
Vi / etc/rc.d/init.d/php53-fpm
Prefix=/usr/local/php53
Php_fpm_BIN=$ {exec_prefix} / sbin/php53-fpm
: wq! # Save exit
Mv / usr/local/php53/sbin/php-fpm / usr/local/php53/sbin/php53-fpm
Service php53-fpm start # Startup
Vi / usr/local/php53/etc/php.ini # Edit configuration file
Find: disable_functions =
Modified to: disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_space,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ctermid,posix_get_last_error,posix_getcwd, posix_getegid,posix_geteuid,posix_getgid, posix_getgrgid,posix_getgrnam,posix_getgroups Posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid, posix_getrlimit, posix_getsid,posix_getuid,posix_isatty, posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid, posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname
# list the functions that PHP can disable. If some programs need to use this function, you can delete it and undisable it.
Find:; date.timezone =
Change it to: date.timezone = PRC # set time zone
Find: expose_php = On
Modified to: expose_php = OFF # suppresses the display of php version information
Find: short_open_tag = Off
Modified to: short_open_tag = ON # supports php short tags
Vi / usr/local/php53/etc/php.ini # add the mysqli extension, on the last line
Extension= "/ usr/local/php53/lib/php/extensions/no-debug-non-zts-20090626/mysqli.so"
: wq! # Save exit
10.7. Install php5.2.17
# compile gd-2.0.35. If you have already compiled in the previous step, just ignore it.
Cd / usr/local/src
Tar zxvf gd-2.0.35.tar.gz
Cd gd-2.0.35
/ configure-- enable-m4_pattern_allow-- prefix=/usr/local/gd-- with-jpeg=/usr/lib-- with-png=/usr/lib-- with-xpm=/usr/lib-- with-freetype=/usr/lib-- with-fontconfig=/usr/lib
Make # compilation
Make install # installation
Cd / usr/local/src
Tar zxvf php-5.2.17.tar.gz
Gunzip php-5.2.17-fpm-0.5.14.diff.gz
Patch-d php-5.2.17-p1
< php-5.2.17-fpm-0.5.14.diff #给php源码打上fpm补丁 curl -o php-5.2.17.patch https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt cd php-5.2.17 patch -p0 -b :wq! #保存退出 chown www.www /usr/local/nginx/html/ -R #设置目录所有者 chmod 700 /usr/local/nginx/html/ -R #设置目录权限 在浏览器中打开服务器IP地址,会看到下面的界面 后记: CentOS 7.x +php 7.0/7.1组合建议使用系统自带的GD库进行编译,php默认去掉了mysql驱动,只有mysqli和mysqlnd驱动。 CentOS 7.x +php 5.5/5.6组合建议使用libgd-2.1.1进行编译,php驱动包括mysql,mysqli和mysqlnd CentOS 7.x +php 5.4组合建议使用系统自带的GD库进行编译,php驱动包括mysql,mysqli(需要加载),mysqlnd CentOS 7.x +php 5.3组合建议使用gd-2.0.35进行编译,php驱动包括mysql,mysqli(需要加载),mysqlnd CentOS 7.x +php 5.2组合建议使用gd-2.0.35进行编译,php驱动包括mysql,mysqli(需要加载) 推荐:CentOS 7.x使用php 5.5/5.6组合最佳。 后记: php各个小版本的安装过程相同,如php 7.1.2和php 7.1.3安装过程一样,php 7.0.16和php 7.0.17安装过程一样。 阿里云的CentOS 7.x镜像自带的yum.repos.d文件默认被修改为阿里云自己的镜像源了,但是,这个源有些问题,很多软件包无法yum安装,导致后面的php等编译会出错,解决办法就是替换yum源为CentOS官方源。 阿里云默认的yum源:CentOS official source:
The above is all the contents of the article "how CentOS 7.x compiles and installs Nginx1.10.3+MySQL5.7.16+PHP multi-version universal environment". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.