Notice: 函数 WP_Scripts::localize 的调用方法不正确$l10n 参数必须是一个数组。若要将任意数据传递给脚本,请改用 wp_add_inline_script() 函数。 请查阅调试 WordPress来获取更多信息。 (这个消息是在 5.7.0 版本添加的。) in /data/www/appblog/wp-includes/functions.php on line 6131

CentOS下安装配置PHP 7

安装编译环境

# yum install wget gcc gcc-c++ g++ autoconf autoconf2.13 automake make m4

安装配置PHP

# yum install openssl openssl-devel python-devel libxml2 libxml2-devel zlib-devel pcre-devel libcurl-devel libjpeg-devel libpng-devel libpng12-devel freetype-devel mhash-devel libmcrypt-devel libXpm-devel libedit-devel re2c libxslt libxslt-devel libicu-devel

# wget http://php.net/distributions/php-7.1.16.tar.gz
# tar -zxf php-7.1.16.tar.gz
# cd php-7.1.16
# ./configure --prefix=/data/server/php7 \
--with-config-file-path=/data/server/php7/etc \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--enable-bcmath \
--with-pdo_sqlite \
--with-gettext \
--with-iconv \
--enable-ftp \
--with-sqlite3 \
--enable-xml \
--enable-mbstring \
--enable-sockets \
--enable-zip \
--enable-soap \
--enable-fileinfo \
--enable-exif \
--with-readline \
--with-libedit \
--with-openssl \
--with-zlib \
--with-curl \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-libxml-dir \
--with-xpm-dir \
--with-mcrypt \
--with-mhash \
--enable-mysqlnd \
--enable-pdo \
--with-mysqli \
--with-pdo-mysql \
--without-pear \
--with-libdir=lib64 \
--with-mysql-sock \
--enable-opcache \
--enable-fastcgi \
--enable-intl \
--with-xsl \
--disable-cgi
# make
# make install
# cd /data/server/php7/etc/
# cp php-fpm.conf.default php-fpm.conf
# cp php-fpm.d/www.conf.default php-fpm.d/www.conf
# ln -s /data/server/php7/bin/* /usr/bin/
# ln -s /data/server/php7/sbin/* /usr/bin/
# php -v

el6(CentOS 6)手动安装依赖

libicu-devel: https://pkgs.org/download/libicu-devel

# rpm -ivh libicu-devel-4.2.1-14.el6.x86_64.rpm

libmcrypt: https://pkgs.org/download/libmcrypt

# rpm -ivh libmcrypt-2.5.8-9.el6.x86_64.rpm

libmcrypt-devel: https://pkgs.org/download/libmcrypt-devel

# rpm -ivh libmcrypt-devel-2.5.8-9.el6.x86_64.rpm

libedit-devel: https://pkgs.org/download/libedit-devel

# yum install ncurses-devel
# rpm -ivh libedit-devel-2.11-4.20080712cvs.1.el6.x86_64.rpm

国内镜像

http://mirrors.ustc.edu.cn/epel/6/x86_64/Packages/l/
http://mirrors.hust.edu.cn/epel/6/x86_64/Packages/l/

上一篇 CentOS下安装配置VsFTP
下一篇 使用yum搭建LNMP环境