suncool 发表于 2018-10-9 07:52:11

lampapache+mysql+php-12362297

  l 就是linux ,a就是apache,m就是apache,p就是php
  apache
  安装apache
  yum insatll httpd -y
  开启apache服务
  service httpd start
  设置235运行级别开机启动
  chkconfig --levels 235 httpd on
  配置httpd文件
  vi /etc/httpd/conf/httpd.conf
  ServerName去掉#
  重启httpd服务
  service httpd restart
  mysql
  安装mysql数据库
  yum install mysql mysql-sever -y
  开启mysql数据库
  service mysqld start
  chkconfig --levels 235 mysqld on
  设置mysql数据库密码
  mysql_secure_installation
  2y其余回车
  登陆数据库
  mysql -u root -p
  Php
  安装php
  yum install php* -y
  开启php
  service httpd restart
  编写php测试页面
  vi /var/www/html/info.php
  输入
  
  重启httpd服务
  service httpd restart

页: [1]
查看完整版本: lampapache+mysql+php-12362297