继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

php+nginx

android零基础入门
关注TA
已关注
手记 288
粉丝 97
获赞 603

yum -y install yum-fastestmirror

yum -y install patch make gcc gcc-c++gcc-g77 flex bison

yum -y install libtool libtool-libskernel-devel autoconf

yum -y install libjpeg libjpeg-devel libpnglibpng-devel

yum -y install freetype freetype-devellibxml2 libxml2-devel zlib zlib-devel

yum -y install glib2 glib2-devel bzip2diff*

yum -y install bzip2-devel ncursesncurses-devel curl curl-devel e2fsprogs

yum -y install e2fsprogs-devel krb5krb5-devel libidn libidn-devel

yum -y install openssl openssl-develvim-minimal


yum -y install phpphp-mysql php-cgiphp-mbstring php-gd php-fastcgi php-pear php-pear-DBphp-fpm php-cli php-pdo php-mcryptphp-tidy php-xml php-xmlrpcphp-pecl-memcache php-eaccelerator


rpm -Uvh ftp://ftp.univie.ac.at/systems/linux/fedora/epel/beta/6/i386/epel-release-6-5.noarch.rpm

yum -y install nginx


所有的配置文件都在 /etc 目录


chkconfig php-fpm on

chkconfig nginx on


创建www用户和组,以及主机需要的目录,日志目录


groupadd www

useradd -g www www

mkdir -p /home/www

chmod +w /home/www

mkdir -p /home/www/logs

chmod 777 /home/www/logs

chown -R www:www /home/www


#vi /etc/nginx/nginx.conf


service php-fpm start

service nginx start


OK!


nginx测试

/usr/local/nginx/sbin/nginx-t

nginx平滑重启命令

/usr/local/nginx/sbin/nginx -s reload


linux 打开某些端口

/etc/sysconfig/iptables

直接填上

-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT



打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP