Centos7服務器環境搭建


1.Apache安裝

yum install httpd

systemctl start httpd.service #啟動

systemctl stop httpd.service#停止

systemctl restart httpd.service #重啟

設置開機啟動/關閉

systemctl enable httpd.service #開機啟動

systemctl disable httpd.service #開機不啟動

檢查httpd狀態

systemctl status httpd.service 

關閉防火牆關閉:systemctl stop firewalld.service

查看狀態:systemctl status firewalld.service 

2.PHP安裝

yum -y install php

php各項服務安裝

yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel php-mysql 

3.安裝MariaDB數據庫

CentOS 7.0中,已經使用MariaDB替代了MySQL數據庫

安裝:yum -y install mariadb-server mariadb-client

啟動:systemctl start mariadb.service

停止:systemctl stop mariadb.service

查看狀態:systemctl status mariadb.service

開機啟動:systemctl enable mariadb.service

重啟:systemctl restart mariadb.service 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM