安裝Drupal6
Drupal是個人最喜歡使用的CMS,在這裡作個簡單的安裝介紹
安裝iceweasel
我們在之前有裝過vncserver來啟用遠端控制x-window,現在幫它裝上瀏覽器吧
鍵入 aptitude install iceweasel iceweasel-l10n-zh-tw
安裝iceweasel時列出的套件列表
用vnc連入啟用程式 點擊左下角選單=>Applications=>WWW Browsers=>Mozilla Firefox
用phpmyadmin建立資料庫 在瀏覽列鍵入 http://localhost/phpmyadmin
語系選 中文 - Chinese traditional(utf-8)
輸入mysqlserver帳號 預設帳號:root 密碼:(空白)
※mysql預設沒有密碼,定一下較好
建立資料庫
校對選擇 utf8_unicode_ci
建立資料庫 鍵入drupal6,按建立,資料庫即建立完成
資料庫建立完成
下載drupal6 資料庫建立完成後,我們開始安裝drupal6
鍵入 cd /var/www/
(切換到目錄 /var/www/ 中)
抓取drupal-6.4 鍵入 wget http://ftp.drupal.org/files/projects/drupal-6.4.tar.gz
(請自行更改連結以下載新版本)
解開drupal-6.4 鍵入 tar zxvf drupal-6.4.tar.gz
打開瀏覽器進行安裝 在瀏覽列鍵入 http://localhost/drupal-6.4
點擊Install Drupal in Engilsh

安裝時出現緊告視窗

照著剛才的緊告視窗動作
鍵入 drupal-6.4/sites/default/default.settings.php drupal-6.4/sites/default/settints.php

修改settings.php的權限
鍵入 chmod 777 drupal-6.4/sites/default/settints.php

複製了之後,按try again,重試安裝
照著剛才的緊告視窗動作
鍵入 mkdir drupal-6.4/sites/files;chmod -R 777 drupal-6.4/sites/default/files

設定資料庫內容 Database name鍵入debian6
Database username鍵入root
Database passwordn鍵入(空白-不用鍵入資料)
安裝時出現緊告視窗
修改settings.php權限
chmod 755 drupal-6.4/sites/default/settings.php

鍵入網站資訊(請依照個人情況輸入)

完成安裝
檢查網站狀態 點擊 Administer=>status report
發現Cron maintenance tasks無作用 Drupal需要搭配cron job跑一些script去處理網站的程序

鍵入crontab -e
鍵入crontab內容 路徑請依照個人的情況修改

網站狀態全顯示正常囉
接下來進行網站的語系調整(中文化) 點擊 Modules

勾選Locale

模組設定存檔

下載中文化檔案

解壓縮中文化檔案 由於中文化檔案是以zip壓縮,安裝unzip來解開它
鍵入 cd /root/

鍵入aptitude install unzip

鍵入unzip drupal-6.2-zh-hant-allinone.zip

drupal-6.2-zh-hant.po解出

加入中文語系環境 點擊 Translate interface => Languages page => Add languages

加入Chinese, Traditional(繁體中文)

點擊import page
上傳中文語系檔 點擊 Browse... 點選drupal-6.2-zh-hant.po

點擊Import完成上傳

將中文語系設為預設環境 點擊 Administer=>Languages

將Chinese, Traditional點選為Default

中文化完成
設定簡潔網址(clean urls) drupal預設的連結是 ?q=pagename
舉例 http://www.debian8.org/?q=node1
假設有設定簡潔網址的話,則連結會變成
http://www.debian8.org/node1
開啟rewrite模組 鍵入 a2enmod rewrite

修改apache設定檔 nano /etc/apache2/sites-enabled/000-default
比對一下底下這兩張圖有什麼不同吧....
重新啟動apache
鍵入 /etc/init.d/apache2 restart
點擊簡潔網址設定 點選啟用,並儲存設定

完成Clean URLs設定 有設定Clean URLs的連結 http://localhost/admin
沒設定Clean URLs的連結 http://localhost/?q=admin
簡潔網址(Clean URLs)一定要設定嗎?不一定,它只是讓網址變簡潔而已罷了
以上設定是以還未設定虛擬目錄(沒實際domain)的作法,有domain的設定可以更靈活,而且不用動到apache預設的設定檔
安裝iceweasel
我們在之前有裝過vncserver來啟用遠端控制x-window,現在幫它裝上瀏覽器吧
鍵入 aptitude install iceweasel iceweasel-l10n-zh-tw

安裝iceweasel時列出的套件列表

用vnc連入啟用程式 點擊左下角選單=>Applications=>WWW Browsers=>Mozilla Firefox

用phpmyadmin建立資料庫 在瀏覽列鍵入 http://localhost/phpmyadmin
語系選 中文 - Chinese traditional(utf-8)

輸入mysqlserver帳號 預設帳號:root 密碼:(空白)
※mysql預設沒有密碼,定一下較好

建立資料庫
校對選擇 utf8_unicode_ci

建立資料庫 鍵入drupal6,按建立,資料庫即建立完成

資料庫建立完成

下載drupal6 資料庫建立完成後,我們開始安裝drupal6
鍵入 cd /var/www/
(切換到目錄 /var/www/ 中)

抓取drupal-6.4 鍵入 wget http://ftp.drupal.org/files/projects/drupal-6.4.tar.gz
(請自行更改連結以下載新版本)

解開drupal-6.4 鍵入 tar zxvf drupal-6.4.tar.gz


打開瀏覽器進行安裝 在瀏覽列鍵入 http://localhost/drupal-6.4
點擊Install Drupal in Engilsh

安裝時出現緊告視窗

照著剛才的緊告視窗動作
鍵入 drupal-6.4/sites/default/default.settings.php drupal-6.4/sites/default/settints.php

修改settings.php的權限
鍵入 chmod 777 drupal-6.4/sites/default/settints.php

複製了之後,按try again,重試安裝

照著剛才的緊告視窗動作
鍵入 mkdir drupal-6.4/sites/files;chmod -R 777 drupal-6.4/sites/default/files

設定資料庫內容 Database name鍵入debian6
Database username鍵入root
Database passwordn鍵入(空白-不用鍵入資料)

安裝時出現緊告視窗

修改settings.php權限
chmod 755 drupal-6.4/sites/default/settings.php

鍵入網站資訊(請依照個人情況輸入)




完成安裝

檢查網站狀態 點擊 Administer=>status report


發現Cron maintenance tasks無作用 Drupal需要搭配cron job跑一些script去處理網站的程序

鍵入crontab -e

鍵入crontab內容 路徑請依照個人的情況修改

網站狀態全顯示正常囉

接下來進行網站的語系調整(中文化) 點擊 Modules

勾選Locale

模組設定存檔

下載中文化檔案


解壓縮中文化檔案 由於中文化檔案是以zip壓縮,安裝unzip來解開它
鍵入 cd /root/

鍵入aptitude install unzip

鍵入unzip drupal-6.2-zh-hant-allinone.zip

drupal-6.2-zh-hant.po解出

加入中文語系環境 點擊 Translate interface => Languages page => Add languages



加入Chinese, Traditional(繁體中文)

點擊import page

上傳中文語系檔 點擊 Browse... 點選drupal-6.2-zh-hant.po


點擊Import完成上傳


將中文語系設為預設環境 點擊 Administer=>Languages


將Chinese, Traditional點選為Default

中文化完成

設定簡潔網址(clean urls) drupal預設的連結是 ?q=pagename
舉例 http://www.debian8.org/?q=node1
假設有設定簡潔網址的話,則連結會變成
http://www.debian8.org/node1
開啟rewrite模組 鍵入 a2enmod rewrite

修改apache設定檔 nano /etc/apache2/sites-enabled/000-default
比對一下底下這兩張圖有什麼不同吧....


重新啟動apache
鍵入 /etc/init.d/apache2 restart

點擊簡潔網址設定 點選啟用,並儲存設定

完成Clean URLs設定 有設定Clean URLs的連結 http://localhost/admin
沒設定Clean URLs的連結 http://localhost/?q=admin
簡潔網址(Clean URLs)一定要設定嗎?不一定,它只是讓網址變簡潔而已罷了

以上設定是以還未設定虛擬目錄(沒實際domain)的作法,有domain的設定可以更靈活,而且不用動到apache預設的設定檔
留言