CentOS 7.0 如何安装LAMP服务器方法
Apache HTTPServer(简称Apache)是Apache软件基金会的一个开放源码的网页服务器,可以在大多数计算机操作系统中运行。我们现在就要学习怎样去安装Apache+PHP+MariaDB!
工具/原料
CentOS 7.0
安装Apache
1、通过yum源安装以httpd开头的命名的软件包,在命令行下输入:yum install httpd

3、以下逐条操作下systemctl start httpd.service #启动apachesystemctl stop httpd.service #停止apachesystemctl restart httpd.service #重启apachesystemctl enable httpd.service #设置apache开机启动

安装MariaDB
1、命令行下输入:yum install mariadb mariadb-server


4、拷贝配置文件:cp /usr/share/mysql/my-huge.cnf /etc/my.cnf


2、根据提示输入Y直到安装完成

4、根据提示输入Y,回车

5、systemctl restart mariadb.service #重启MariaDBsystemctl restart httpd.service #重启apache至此,软件安装完成。