一.安装apache
yum install httpd
可能会用到的:
systemctl start httpd.service #启动apache
systemctl stop httpd.service #停止apache
systemctl restart httpd.service #重启apache
systemctl enable httpd.service #设置apache开机启动
yum install PHP
yum install PHP-devel
三.支持mongodb
可能需要openssl扩展
yum install openssl openssl-devel
pecl install mongodb 从 http://pecl.PHP.net/package/mongodb
pecl install mongo 从 http://pecl.PHP.net/package/mongo
echo "extension=mongodb.so" >> `PHP --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
或者(对应版本)echo "extension=mongo.so" >> `PHP --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
systemctl restart httpd.service
ok了