5月25日任务
11.10/11.11/11.12 安装PHP5
11.13 安装PHP7
php中mysql,mysqli,mysqlnd,pdo到底是什么 http://blog.csdn.net/u013785951/article/details/60876816
查看编译参数 http://ask.apelearn.com/question/1295
1.1 编译安装
1.2 错误解决
1.3 查看加载的模块
1.4 拷贝配置文件到/usr/local/php/etc/目录下
1.5 查看参数
2. 安装PHP7
2.1 编译安装
查看模块
拷贝配置文件
1. 安装PHP5
1.1 编译安装
cd /usr/local/src/
wget http://cn2.php.net/distributions/php-5.6.32.tar.gz
tar zxf php-5.6.32.tar.gz
cd php-5.6.32
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif
make && make install
--prefix
: 指定安装目录
--with-apxs2
: Apache工具, 自动安装扩展模块的
--with-config-file-path
: 指定配置文件php.ini的路径
--with-mysql
: 指定mysql路径
--with-mysql
--with-pdo-mysql
--with-mysqli
以上3个是mysql的驱动/库, 用于mysql与php通信
其他的
: 指定php需要的模块
1.2 错误解决
一般先安装一遍库
yum install -y libxml2-devel openssl-devel bzip2-devel libjpeg-devel libpng-devel freetype-devel libcurl-devel autoconf
yum install -y epel-release
安装扩展源
yum install -y libmcrypt-devel
如没有包, 尝试重新安装扩展源yum reinstall -y epel-release
1.3 查看加载的模块
/usr/local/php/bin/php -m
(静态模块)
php是http的一个扩展模块, 无需启动
1.4 拷贝配置文件到/usr/local/php/etc/目录下
cp php.ini-production /usr/local/php/etc/php.ini
1.5 查看参数
/usr/local/php/bin/php -i |less
2. 安装PHP7
2.1 编译安装
安装参数跟php5有点不同, 其他差不多
cd /usr/local/src/
wget http://cn2.php.net/distributions/php-7.2.0.tar.bz2
tar jxf php-7.2.0.tar.bz2
cd php-7.2.0
./configure --prefix=/usr/local/php7 --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php7/etc --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif
make && make install
查看模块
ls /usr/local/apache2.4/modules/libphp7.so
/usr/local/php7/bin/php -m
Apache配置文件http.conf中, php5和php7注释掉一个, 否则会冲突
vim /usr/local/apache2.4/conf/httpd.conf
搜libphp5.so或libphp7.so
拷贝配置文件
cp php.ini-production /usr/local/php7/etc/php.ini
精彩评论
不用翻吧
币种不一样, 按你注册时选的区域来的
加速用的
Press any key to start...or Press Ctrl+C to cancel [Info] C
感谢楼主,顺便分享个自用的防封梯子:https://xbsj3462.fun/i/xy049,速度快延迟低,新用户注册免
您好 感谢大神的教程 按着您的教程安装了 ssr和trojan 但是每隔一两天就连不上了 甚至在gcp本身的管理页用
第五步没看懂什么意思
您的免费试用赠金还剩 NT$9,067.00 每月估算费用为 $5.40 每小时约为 $0.007 用多少,付多少