标签:php文件 com detail ted rest bzip2 pen color star
依赖:
yum install gcc automake autoconf libtool make yum install libmcrypt-devel mhash-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel --setopt=protected_multilib=false yum install php-pecl-http php httpd php-devel php-mongo mod_php yum install phpMyAdmin // phpMyAdmin的php相关的包比较全保险装一个
github: https://github.com/iwind/rockmongo
参考:https://blog.csdn.net/wkh___/article/details/83540713 (如果打开页面是php文件源码,注意补这个包并修改httpd配置)
php中添加mongo库文件
echo "extension=mongo.so" >> /etc/php.ini
项目文件放到httpd路径下,如果自定义修改httpd配置
# rockmongo域 cp -r /path/rockmongo /var/www/html/ # 独立项目 cp /path/rockmongo/* /var/www/html/
httpd配置添加
AddType application/x-httpd-php .php AddType application/x-httpd-php-source .php5 AddType application/x-httpd-php-source .phps DirectoryIndex index.html index.htm index.php //增加对php的索引
重启
systemctl restart php-fpm
systemctl restart httpd
标签:php文件 com detail ted rest bzip2 pen color star
原文地址:https://www.cnblogs.com/jiangxu67/p/11214910.html