[root@localhost ~]# cat /etc/redhat-release
#重启后生效开启 [root@localhost ~]# chkconfig iptables off or #即时生效,重启后失效开启 [root@localhost ~]# service iptables stop
#即时生效,重启后失效 [root@localhost ~]#setenforce 0 //将SELINUX=enforcing修改为disabled然后重启生效 [root@localhost ~]# vi /etc/selinux/config
[root@localhost ~]#wget http://www.atomicorp.com/installers/atomic [root@localhost ~]#sh ./atomic [root@localhost ~]#yum check-update
# yum remove httpd # yum remove mysql # yum remove php
# yum install nginx # service nginx start # chkconfig --levels 235 nginx on //设2、3、5级别开机启动
# yum install mysql mysql-server mysql-devel
# service mysqld start
# chkconfig --levels 235 mysqld on
//登陆MySQL删除空用户,修改root密码
mysql>select user,host,password from mysql.user;
mysql>drop user ''@localhost;
mysql>update mysql.user set password = PASSWORD('your password') where user='root';
mysql>flush privileges;
//同样注意不要换行 # yum install php lighttpd-fastcgi php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap //安装php和所需组件使PHP支持MySQL、FastCGI模式 #yum install php-tidy php-common php-devel php-fpm php-mysql # service php-fpm start # chkconfig --levels 235 php-fpm on
//将配置文件改为备份文件
# mv /etc/nginx/nginx.conf /etc/nginx/nginx.confbak
//由于原配置文件要自己去写因此可以使用默认的配置文件作为配置文件
# cp /etc/nginx/nginx.conf.default /etc/nginx/nginx.conf
//修改nginx配置文件server段,添加fastcgi支持
# vi /etc/nginx/nginx.conf
//加入index.php
index index.php index.html index.htm;
//将下列代码注释去掉,并修改成nginx默认路径
location ~ .php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
//编辑文件php.ini,在文件末尾添加cgi.fix_pathinfo = 1 [root@CentOS ~]# vi /etc/php.ini
# service nginx restart # service php-fpm restart
# vi /usr/share/nginx/html/info.php <?php phpinfo(); ?>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有