centos 6.6编译安装nginx1.6.2+mysql5.6.21+php5.6.3.docx
还剩
12页未读,
继续阅读
下载文档到电脑,马上远离加班熬夜!
亲,喜欢就下载吧,价低环保!
内容要点:
至此,CentOS 6.6 编译安装 Nginx1.6.2+MySQL5.6.21+PHP5.6.3 教程完成。在最后一行添加:zend_extension=opcache.so #开启 opcode 缓存功能:wq! #保存退出11、配置 Nginx 支持 PHPvi /usr/local/nginx/conf/nginx.conf #配置修改user www www; #首行 user 去掉注释 ,修改 Nginx 运行组为 www www;必须与/usr/local/php/etc/php-fpm.conf 中的 user,group 配置相同,否则 php 运行出错index index.html index.htm index.php; #添加 index.php# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000#location ~ \.php$ {root html;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params;}#取消 FastCGI server 部分 location 的注释,注意 fastcgi_param 行的参数,改为$document_root$fastcgi_script_name,或者使用绝对路径/etc/init.d/nginx restart #重启 nginxservice php-fpm start #启动 php-fpm测试篇cd /usr/local/nginx/html/ #进入 nginx 默认网站根目录rm -rf /usr/local/nginx/html/* #删除默认测试页vi index.php #新建 index.php 文件:wq! #保存退出chown www.www /usr/local/nginx/html/ -R #设置目录所有者chmod 700 /usr/local/nginx/html/ -R #设置目录权限在浏览器中打开服务器 IP 地址,会看到下面的界面export LD_LIBRARY_PATH=/usr/local/libgd/lib./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-pdo-mysql=/usr/local/mysql --with-gd --with-png-dir=/usr/local/libpng --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype --with-xpm-dir=/usr/ --with-vpx-dir=/usr/local/libvpx/ --with-zlib-dir=/usr/local/zlib --with-t1lib=/usr/local/t1lib --with-iconv --enable-libxml --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-op
发表评论
暂无评论,赶快抢占沙发吧。