安装前先进入root 户口
$ su
1. Apache 2
# Fedora 22 开始
$ dnf install httpd -y
# Fedora 21 或以下
$ yum install httpd -y
# 启动
$ systemctl enable httpd
$ systemctl start httpd
2. MySql / MariaDB
# Fedora 22 开始
$ dnf install mariadb mariadb-server -y
# Fedora 21 或以下
$ yum install mariadb mariadb-server -y
# 启动
$ systemctl enable mariadb
$ systemctl start mariadb
# 安装 MySql
$ mysql_secure_installation
3. PHP
# Fedora 22 开始
$ dnf install php php-mysql -y
# Fedora 21 或以下
$ yum install php php-mysql -y
$ gedit /var/www/html/info.php
<?php
phpinfo();
?>
# 重启
$ systemctl restart httpd
# 查找可安装的 php modules
$ dnf search php
$ yum search php
没有评论:
发表评论