快速搭建 Discuz 論壇

來源:互聯網
上載者:User

標籤:mysql   lamp   discuz   

1、準備 LAMP 環境

LAMP 是 Linux、Apache、MySQL 和 PHP 的縮寫,是 Discuz 論壇系統依賴的基礎運行環境。我們先來準備 LAMP 環境,系統為centos 6.8 x86_64

1.1、安裝 MySQL

使用 yum 安裝 MySQL:

yum install mysql-server -y


安裝完成後,啟動 MySQL 服務:

service mysqld restart


此實驗使用 mysql 預設賬戶名和密碼,您也可以設定自己的 MySQL 賬戶名和密碼:

,參考下面的內容:


/usr/bin/mysqladmin -u root password ‘99ogOE_o‘/usr/bin/mysqladmin -u root password ‘new-password‘                                                                                                                        /usr/bin/mysqladmin -u root -h VM_45_133_centos password ‘new-password‘


將 MySQL 設定為開機自動啟動:

chkconfig mysqld on


1.2、安裝 Apache 組件

使用 yum 安裝 Apache 組件:


yum install httpd -y

安裝之後,啟動 httpd 進程:

service httpd start


把 httpd 也設定成開機自動啟動:

chkconfig httpd on


1.3、安裝 PHP

使用 yum 安裝 PHP:

yum install php php-fpm php-mysql -y


安裝之後,啟動 PHP-FPM 進程:

service php-fpm start


啟動之後,可以使用下面的命令查看 PHP-FPM 進程監聽哪個連接埠 

netstat -nlpt | grep php-fpm


把 PHP-FPM 也設定成開機自動啟動:


chkconfig php-fpm on

2、安裝並配置 Discuz

安裝 Discuz

CentOS 6 沒有Discuz 的 yum 源,所以我們需要下載一個Discuz 壓縮包:

wget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_UTF8.zip

 

下載完成後,解壓這個壓縮包


unzip Discuz_X3.2_SC_UTF8.zip

解壓完後,就能在 upload 檔案夾裡看到discuz的源碼了

配置 Discuz


由於PHP預設訪問 /var/www/html/ 檔案夾,所以我們需要把upload檔案夾裡的檔案都複製到 /var/www/html/ 檔案夾

cp -r upload/* /var/www/html/


給 /var/www/html 目錄及其子目錄賦予許可權


chmod -R 777 /var/www/html

重啟 Apache

service httpd restart


3、準備網域名稱和認證

網域名稱註冊


4、安裝 Discuz!

開啟web,根據嚮導安裝,我同意,下一步,下一步,填寫實際資訊,完成配置。



650) this.width=650;" src="https://s5.51cto.com/wyfs02/M00/02/18/wKiom1mfFJWRZn6SAACWg7rNr4w072.png-wh_500x0-wm_3-wmp_4-s_2570187579.png" title="discuz1.png" width="740" height="303" border="0" hspace="0" vspace="0" style="width:740px;height:303px;" alt="wKiom1mfFJWRZn6SAACWg7rNr4w072.png-wh_50" />650) this.width=650;" src="https://s5.51cto.com/wyfs02/M02/A0/C8/wKioL1mfFQnBtP45AABhMjfXOkc442.png-wh_500x0-wm_3-wmp_4-s_2354710103.png" title="snipaste20170825_020328.png" width="740" height="258" border="0" hspace="0" vspace="0" style="width:740px;height:258px;" alt="wKioL1mfFQnBtP45AABhMjfXOkc442.png-wh_50" />650) this.width=650;" src="https://s1.51cto.com/wyfs02/M01/02/18/wKiom1mfFXWDjFgDAABmvFsFzQo520.png-wh_500x0-wm_3-wmp_4-s_3246558116.png" title="snipaste20170825_020503.png" width="740" height="771" border="0" hspace="0" vspace="0" style="width:740px;height:771px;" alt="wKiom1mfFXWDjFgDAABmvFsFzQo520.png-wh_50" />

訪問discuz,登入剛才設定的管理員帳號密碼,調整版塊650) this.width=650;" src="https://s5.51cto.com/wyfs02/M02/02/18/wKiom1mfF5uzyYk2AACYu1mAgWQ368.png-wh_500x0-wm_3-wmp_4-s_2306085405.png" title="snipaste20170825_021411.png" width="740" height="311" border="0" hspace="0" vspace="0" style="width:740px;height:311px;" alt="wKiom1mfF5uzyYk2AACYu1mAgWQ368.png-wh_50" />

本文出自 “實踐出真知” 部落格,請務必保留此出處http://m51cto.blog.51cto.com/53087/1959188

快速搭建 Discuz 論壇

相關文章

聯繫我們

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