通過安裝WordPress來配置lamp開發環境,wordpresslamp

來源:互聯網
上載者:User

通過安裝WordPress來配置lamp開發環境,wordpresslamp

WordPress的安裝與串連到MySQL
一,安裝php7.0:

1.往apt中匯入源,用指令sudo apt-get install php7.0 下載並安裝php,登入http://wordpress/readme.html驗證php的安裝。

二,安裝wordpress

2.在官網上下載,用命令 sudo tar -xvf wordpress-4.7.4-zn_CH.tar.gz -C /var/www/html 將其解壓到/var/www/html/中。

3.用sudo apt-get install libapache2-mod-php(+tab鍵),安裝php的伺服器對apache2的>支援。若在其中找到php7.0-mysql則可用指令sudo apt-get install php-mysql來安裝php的資料庫支援

4.用命令sudo apache2ctl restart 重啟伺服器,用sudo vim /etc/apache2/sites-enabled/000-default.conf命令開啟此設定檔,在最上方寫入ServerName  127.0.1.1即可。

三,串連mysql和php

5.串連到伺服器端並建立一個資料庫wordpress,把它作為該部落格的資料庫。

6.點擊登入wp-admin/install.php,進入/var/www/html/用命令sudo vim wp-config.php創
建該檔案,並把資料庫連接資訊寫入到wp-config.php檔案中,用sudo chmod 777 wp-config.php將其許可權修改為完全公開。

7.註冊部落格,完成。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.