Home > Backend Development > PHP7 > php7.0.5 installation tutorial

php7.0.5 installation tutorial

藏色散人
Release: 2023-02-17 17:32:01
Original
3022 people have browsed it

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.

php7.0.5 installation tutorial

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:

  1. Download address http://cn2.php.net/distributions/php-7.0. 5.tar.gz
  2. Install the packages required for compilation. If some packages cannot be found, please execute
yum  install epel-release  //扩展包更新包
yum  update //更新yum源
Copy after login

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
Copy after login

make & make install

  1. Execute the compilation command
./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/
Copy after login

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

  1. Configuration file
  2. ##
    # 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
    Copy after login
It should be noted that in php7 www. The conf configuration file configures the port number and other information of phpfpm. If you modify the default 9000 port number, you need to change it here, and then change the nginx configuration

Start

#  /etc/init.d/php-fpm
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template