在Fedora 23 Server和Workstation上安装LAMP(Linux, Apache, MariaDB和PHP)
在安装LAMP之前,建议先更新系统包 $ sudo dnf update 第一步:安装Apache Web服务器 1.在Fedora 23安装Apache,你可以运行下面的命令: $ sudo dnf install httpd 2.安装完成后,我们设置在系统启动时自动启动Apache,然后我们将开始验证Apache的状态。运行以下一系列的命令: $ sudo systemctl enable httpd.service $ sudo systemctl start httpd $ sudo systemctl status httpd 3.运行通过HTTP和HTTPS访问Web服务器,在Fedora的防火墙添加以下规则: $ sudo firewall-cmd --permanent --add-service=http $ sudo firewall-cmd --permanent --add-service=https 4.现在来验证一下 $ ip a | grep inet //得到系统IP地址 打开浏览器在地址输入: http://你的IP地址 。 注:默认的Apache目录 /var/www/html/ 第二步:安装MariaDB服务器 5.在Fedora 23安装MariaDB,运行以下命令: $ sudo dnf install mariadb-server 6