php7学习记录

安装

安装必要的依赖

yum install -y epel-release
yun update -y
 
yum install -y autoconf curl-devel openssl openssl-devel openssl openssl-devel gcc gcc-c++ libxml2 libxml2-devel libpng libpng-devel bzip2 bzip2-devel freetype-devel libicu-devel

wget https://nih.at/libzip/libzip-1.2.0.tar.gz
tar -zxvf libzip-1.2.0.tar.gz
cd libzip-1.2.0
./configure
make && make install
 
cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h

安装php7.3

wget https://www.php.net/distributions/php-7.3.13.tar.gz
tar -xzvf php-7.3.13.tar.gz

//预编译
./configure --prefix=/usr/local/php7  --with-bz2 --with-curl --enable-filter --enable-fpm --with-gd --enable-intl --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-openssl --with-zlib --with-freetype-dir --disable-phpdbg --disable-phpdbg-webhelper --enable-opcache --enable-simplexml --enable-xmlreader --enable-xmlwriter --enable-zip --enable-soap --enable-shmop --enable-sockets --enable-sysvmsg --enable-bcmath --enable-mbstring --enable-mysqlnd  --enable-tokenizer

// make安装
make && make install

//加入环境变量中
vi /etc/profile
export PATH=/usr/local/php7/bin:$PATH
source /etc/profile

//拷贝配置文件
php -i | grep php.ini
cp php.ini-development /usr/local/php7/lib/php.ini

你可能感兴趣的:(php)