手记

php+nginx

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



0人推荐
随时随地看视频
慕课网APP