yum -y install httpd mysql-server php #安装apache、mysql和PHP

yum -y install php-mysql php-gd php-mbstring #根据需要安装php的mysql扩展、php的GD扩展、php的MB扩展

vi /etc/php.ini #修改php配置

short_open_tag = On #开启php短标签否则对于短标签的解析不正常

chown -R apache.apache /var/www/html/* #将目录所有者交给apache

iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT #防火墙开启80端口

/etc/init.d/iptables save #拷贝防火墙规则保存

service mysqld start #启动mysql

service httpd start #启动Apache

chkconfig mysqld on #将mysql设置为开机启动

chkconfig httpd on #将Apache设置为开机启动

 

相关文章:

  • 2021-07-10
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-12-10
  • 2022-12-23
  • 2021-11-20
猜你喜欢
  • 2022-12-23
  • 2021-06-17
  • 2021-09-27
  • 2021-06-30
  • 2021-09-09
  • 2021-12-31
相关资源
相似解决方案