1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > centos6.3 nginx php CentOS 6.3 编译安装Nginx+MySQL+PHP

centos6.3 nginx php CentOS 6.3 编译安装Nginx+MySQL+PHP

时间:2023-11-04 18:52:29

相关推荐

centos6.3 nginx php CentOS 6.3 编译安装Nginx+MySQL+PHP

测试篇

cd /usr/local/nginx/html/ #进入nginx默认网站根目录

rm -rf /usr/local/nginx/html/* #删除默认测试页

vi index.php #编辑

phpinfo();

?>

:wq! #保存退出

chown www.www /usr/local/nginx/html/ -R #设置目录所有者

chmod 700 /usr/local/nginx/html/ -R #设置目录权限

shutdown -r now #重启系统

在浏览器中打开服务器IP地址,会看到下面的界面,配置成功

服务器相关操作命令

service nginx restart #重启nginx

service MySQLd restart #重启mysql

/usr/local/php5/sbin/php-fpm #启动php-fpm

/etc/rc.d/init.d/php-fpm restart #重启php-fpm

/etc/rc.d/init.d/php-fpm stop #停止php-fpm

/etc/rc.d/init.d/php-fpm start #启动php-fpm

#############################################################################

备注:

nginx默认站点目录是:/usr/local/nginx/html/

权限设置:chown www:www /usr/local/nginx/html/ -R

MySQL数据库目录是:/data/mysql

权限设置:chown mysql.mysql -R /data/mysql

至此,CentOS 6.3编译安装Nginx1.2.2+MySQL5.5.25a+PHP5.4.5完成

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。