3-02 2,804 views
"lamp"
~ yum -y install httpd mysql mysql-server php php-mysql php-gd php-mbstring
启动服务
~ service httpd start
~ service mysqld start
开启PHP错误提示:1)vi /etc/php.ini 2)设置display_errors = On(530行左右)
关闭防火墙 service iptables stop
关闭selinux vi /etc/selinux/config
PHP代码默认放在/var/www/html
设置自启动
~ chkconfig httpd --level 2345 on
~ chkconfig mysqld --level 2345 on
"lnmp"
~ yum -y install nginx mysql mysql-server php php-mysql php-gd php-mbstring php-fpm
启动服务
~ service nginx start
~ service mysqld start
~ service php-fpm start
设置自启动
~ chkconfig nginx --level 2345 on
~ chkconfig mysqld --level 2345 on
~ chkconfig php-fpm --level 2345 on