阿里雲centos7 搭建lamp php7
阿新 • • 發佈:2018-12-20
gcc安裝
yum install -y gcc gcc-c++
vim安裝
yum install -y vim
1、安裝apache
yum -y install httpd
可能用到的命令
systemctl start httpd.service #啟動apache
systemctl stop httpd.service #停止apache
systemctl restart httpd.service #重啟apache
systemctl enable httpd.service #設定apache開機啟動
2、安裝mysql
yum -y install mariadb-service mariadb
可能用到的命令
systemctl start mariadb.service #啟動mariadb
systemctl stop mariadb.service #停止mariadb
systemctl restart mariadb.service #重啟mariadb
systemctl enable mariadb.service #設定mariadb開機啟動
設定root帳戶的密碼
mysql_secure_installation
仔細閱讀並輸入內容。
3、安裝php7
更新yum源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安裝
yum install php70w