yum搭建LAMP环境

  1. 安装httpd
    yum install httpd
  2. 启动httpd
    service httpd start 或 /etc/init.d/httpd start
    (CentOS7.X /bin/systemctl
  3. 如果看到提示信息,请修改
    /etc/httpd/conf/httpd.conf文件目录下面配置文件中的ServerName
  4. /var/www/html中可以创建一些文件
  5. 开机自动启动
    chkconfig httpd on
  6. 安装Apache扩展
    yum install httpd-manual mod_ssl mod_perl mod_auth_mysql
  7. 安装mysql客户端、服务器、开发者库
    yum install mysql mysql-server mysql-devel
  8. 查看mysqld
    cd /etc/init.d
  9. 开机启动
    chkconfig mysqld on
    启动
    service mysqld start
  10. mysql配置,配置密码和安全引导,按照提示进行操作
    /usr/bin/mysql_secure_installation
  11. 查看需要安装的包
    yum search php*
  12. 安装PHP
    yum install php        php-gd php-devel php-xml php-common        php-mbstring php-ldap php-mysqli        php-pdo php-imap php-xmlrpc
  13. 重启
    service httpd restart 或 /etc/init.d/httpd restart
  14. 测试/var/www/html写上一个php文件测试

你可能感兴趣的:(yum搭建LAMP环境)