Heim  >  Artikel  >  Backend-Entwicklung  >  php7安装----

php7安装----

WBOY
WBOYOriginal
2016-06-23 13:08:21787Durchsuche

php7安装,

从php.net下载最新php-7.0.5

解压,进入到解压目录


./configure --prefix=/usr/local/php-7.0.5 - --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-gd --with-iconv --with-zlib --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --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 --with-jpeg-dir --with-freetype-dir  --with-bz2 --with-config-file-path=/usr/local/php-7.0.5 --with-apxs2


解释 : --prefix=/usr/local/php-7.0.5 是将php安装目录,--with-config-file-path配置php.ini文件位置,-with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd 开启mysql 支持,一定不能忘记了。--with-apxs2加上这句将生成libphp7.so这个文件,将这个文件移动到 /usr/libexec/apache2/libphp7.so,然后在apache的配置文件httpd.conf里加入这样一句 

LoadModule php7_module /usr/libexec/apache2/libphp7.so

如果在./configure的时候不知道怎么写参数噢,使用./configure --help查看

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:Composer设置忽略版本匹配Nächster Artikel:小白(续2)