搭建LAMP
步骤1:
安装mariadb
systemctl start mariadb.service #启动MariaDB
systemctl stop mariadb.service #停止MariaDB
systemctl restart mariadb.service #重启MariaDB
systemctl enable mariadb.service #设置开机启动
为root账户设置密码
mysql_secure_installation
回车,根据提示输入Y
输入2次密码,回车
根据提示一路输入Y
最后出现:Thanks for using MySQL!
MySql密码设置完成,重新启动 MySQL:
systemctl restart mariadb.service #重启MariaDB
创建数据库
步骤2:
安装Apache
systemctl start httpd.service #启动apache
systemctl stop httpd.service #停止apache
systemctl restart httpd.service #重启apache
systemctl enable httpd.service #设置apache开机启动
步骤3:
安装PHP
安装PHP组件,使PHP支持 MariaDB
systemctl restart mariadb.service #重启MariaDB
systemctl restart httpd.service #重启apache
测试
传入安装包并解压
修改文件权限
成功
原文地址:http://blog.51cto.com/12765384/2174911
时间: 2024-10-28 20:35:12