创意电子

标题: centos 编译安装php8 php7升级php8 [打印本页]

作者: IT二把刀    时间: 2021-8-15 01:33
标题: centos 编译安装php8 php7升级php8
php7用yum安装的最好是删掉比较好,自己编译安装的可以不用删,但还是最好备份一下之前版本配置,还有版本切换的时间记得,扩展要同时更新。
在centos7下编译安装php8
更新系统软件

yum updatewget -O php8.tar.gz https://www.php.net/distributions/php-8.0.9.tar.gztar -xvf php8.tar.gzcd php-8.0.9./configure --prefix=/usr/local/php --with-config-file-path=etc --enable-fpm   --with-fpm-user=nginx --with-fpm-group=nginx --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-soap --with-libxml-dir --with-xmlrpc --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --enable-mbregex --enable-mbregex-backtrack --with-libmbfl --with-onig --enable-pdo --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-libxml-dir --with-xsl --enable-zip --enable-mysqlnd-compression-support --with-pear --enable-opcachemake && make installvi /etc/profile/*在文件末尾增长下面两行*/PATH=$PATH:/usr/local/php/binexport PATH/*生效环境变量*/source /etc/profile建立软连接,可以直接利用PHP命令




欢迎光临 创意电子 (https://wxcydz.cc/) Powered by Discuz! X3.4