Centos 7 - 安裝Apche、PHP、Mysql(Mariadb)

來源:互聯網
上載者:User

標籤:star   安裝完成   enable   color   top   host   php-mysql   httpd php   emctl   

Centos 7下安裝這三個東西,通常還有一個套件(LAMP),這裡不講套件的安裝方法,只說三件套的分開安裝。

1.Apache和PHP的安裝

  (1).安裝Apache, PHP

#yum -y install httpd php

 (2).安裝Apache擴充

1 #yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql

 (3).安裝PHP的擴充

#yum -y install php-gd php-xml php-mysql php-mbstring php-ldap php-pear php-xmlrpc

 (4).配置開機啟動apache服務

#systemctl enable httpd #開機運行httpd服務#systemctl start httpd #啟動httpd服務

 安裝完成過後可以使用curl localhost命令來測試一下

2.安裝mariadb

  (1).安裝mariadb

#yum -y install mariadb mariadb-server

  (2).啟動/停止/重啟/開機啟動 MariaDB 服務

#systemctl start/stop/restart/enable mariadb

 

Centos 7 - 安裝Apche、PHP、Mysql(Mariadb)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.