Home >Backend Development >PHP7 >php7.0.5 installation tutorial
Installation method of php7.0.5: First download "php-7.0.5.tar.gz"; then update the expansion package through the command "yum install epel-release"; then execute the compilation command; finally modify the configuration file That’s it.
Recommended: "PHP Video Tutorial"
The official version of PHP7.0 is also out today. I compiled and installed it and wrote down the installation steps. I compiled it in centos6.6 environment, as follows:
yum install epel-release //扩展包更新包 yum update //更新yum源
and then execute the following command
yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers libmcrypt libmcrypt-devel libXpm-devel
make & make install
./configure --prefix=/usr/local/php --enable-fpm --with-mcrypt=/usr/local/libmcrypt --with-zlib --enable-mbstring --enable-pcntl --with-openssl --enable-soap --with-pear --with-png-dir --with-pcre-regex --enable-mysqlnd \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-mysql-sock=/var/lib/mysql/mysql.sock --with-gd --with-jpeg-dir=/usr/lib --enable-gd-native-ttf --with-gettext --with-curl --enable-sockets --enable-bcmath --enable-xml --with-bz2 --enable-zip --with-freetype-dir=/usr/include/freetype2/
What you need to pay attention to in the above command is
The --with-mysqli parameter specifies the bin file path where mysql is located, such as: /usr/bin/mysql_config
--with-freetype-dir specified path
It is /usr/include/freetype2/ If you installed freetype2 with yum
Others are based on your actual needs Just add or delete
# cp php.ini-development /usr/local/php/lib/php.ini # cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf# cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf # cp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm
Start
# /etc/init.d/php-fpm
The above is the detailed content of php7.0.5 installation tutorial. For more information, please follow other related articles on the PHP Chinese website!