差異處
這裏顯示兩個版本的差異處。
兩邊的前次修訂版 前次修改 下次修改 | 前次修改 | ||
tech:dokuwiki [2024/02/08 02:29] – [採用 linuxserver/dokuwiki 的 image] jonathan | tech:dokuwiki [2025/05/05 06:53] (目前版本) – 加回-延伸參考資料 jonathan | ||
---|---|---|---|
行 1: | 行 1: | ||
====== DokuWiki安裝程序(Docker) ====== | ====== DokuWiki安裝程序(Docker) ====== | ||
===== Docker 安裝方式 ===== | ===== Docker 安裝方式 ===== | ||
- | * 安裝環境 - [[tech/ | + | * 安裝環境 |
+ | - [[tech/ | ||
+ | | ||
===== 採用 linuxserver/ | ===== 採用 linuxserver/ | ||
* 參考網址 - https:// | * 參考網址 - https:// | ||
行 22: | 行 24: | ||
volumes: | volumes: | ||
- ' | - ' | ||
- | </ | + | </ |
+ | * wiki data 實際存放在 ./ | ||
+ | * cert 憑證檔存放位置在 ./ | ||
- 啟動 docker compose <cli> | - 啟動 docker compose <cli> | ||
docker compose up -d | docker compose up -d | ||
</ | </ | ||
+ | <note tip> | ||
+ | **移轉原本 wiki data 簡易操作程序** | ||
+ | - 將原本資料目錄內的 data lib conf 三個目錄打包成 tar | ||
+ | - 將打包好的 data.tar lib.tar conf.tar 複製到 ./ | ||
+ | - 關閉 dokuwiki 服務 | ||
+ | - 進入 ./ | ||
+ | - 將原本 data lib conf 三個目錄更名為 data.org lib.org conf.org | ||
+ | - 解開 data.tar lib.tar conf.tar 打包檔成為 data lib conf 三個目錄 | ||
+ | - 改正 data lib conf 三個目錄權限 | ||
+ | - 重新啟動 dokuwiki 服務 | ||
+ | * ++看實際處理 linux 命令語法|< | ||
+ | docker compose down | ||
+ | cd dokuwiki_data/ | ||
+ | mv conf conf.org | ||
+ | tar -xvf conf.tar | ||
+ | mv lib lib.org | ||
+ | tar -xvf lib.tar | ||
+ | mv data data.org | ||
+ | tar -xvf data.tar | ||
+ | chown -R 1000:1000 data | ||
+ | chown -R 1000:1000 lib | ||
+ | chown -R 1000:1000 conf | ||
+ | cd | ||
+ | docker compose up -d | ||
+ | </ | ||
+ | | ||
+ | </ | ||
+ | |||
+ | * 如果有安裝 [[http:// | ||
===== 採用 bitnami/ | ===== 採用 bitnami/ | ||
* 安裝方式 <cli> | * 安裝方式 <cli> | ||
行 78: | 行 111: | ||
</ | </ | ||
- | ---- | + | ===== 延伸參考資料 ===== |
- | + | ||
- | ====== 傳統安裝方式 ====== | + | |
- | ===== - 下載安裝檔 ===== | + | |
- | - 先切換到安裝目錄 | + | |
- | - 下載 dokuwiki 最新版本((dokuwiki 最新版本下載網址 : https:// | + | |
- | - 解開壓縮檔 | + | |
- | - 將目錄名稱更改為自己所希望的目錄名稱 | + | |
- | - 將檔案目錄權限更改為 apache((Web Server Owner)) | + | |
- | ++++ 實際處理語法| | + | |
- | <code sh> | + | |
- | cd /tmp/ | + | |
- | wget https:// | + | |
- | tar -zxvf dokuwiki-stable.tgz | + | |
- | rm -f dokuwiki-*.tgz | + | |
- | mv dokuwiki-* / | + | |
- | cd / | + | |
- | rm -f / | + | |
- | mv / | + | |
- | mv dokuwiki / | + | |
- | mv dokuwiki-* dokuwiki | + | |
- | chown -R apache: | + | |
- | </ | + | |
- | ++++ | + | |
- | + | ||
- | ===== - 安裝參數設定 ===== | + | |
- | - 在 2006-11-06 版之後, 就提供網頁安裝參數設定功能 | + | |
- | - 所以在安裝路徑網址下 install.php (Exp. http:// | + | |
- | - 右上角將語系改成 zh-tw | + | |
- | - 左邊欄位就開始一一輸入 | + | |
- | - Wiki Name : MyWiki | + | |
- | - 依據將所有的欄位填好 | + | |
- | - 我是設定預設的 ACL 是屬於 Closed Wiki | + | |
- | - 點下[儲存] | + | |
- | - 將 install.php 刪除掉 | + | |
- | ..++實際命令語法| | + | |
- | <code sh> | + | |
- | cd / | + | |
- | rm install.php | + | |
- | </ | + | |
- | ++ | + | |
- | + | ||
- | + | ||
- | ==== - 第一次登入 ==== | + | |
- | - 輸入新的 wiki 網址後, 因為剛剛設定為 Closed Wiki 所以會出現 **拒絕尚未授權** 的訊息 | + | |
- | - 點[登入]輸入剛剛設定的管理者帳號密碼登入 | + | |
- | - 點[管理選單]-> | + | |
- | - [Use first heading for pagenames] <- 打勾, 讓每頁的 Header 當頁面名稱 | + | |
- | - [Send info on newly registered users to this email address] <- [email protected] 有新註冊就通知到這個 E-Mail | + | |
- | - [Allow embedded HTML] <- 打勾, 允許使用 html 語法 | + | |
- | - [Send change notifications to this email address] <- [email protected] 有改到網頁就通知到這個 E-Mail | + | |
- | - [Enable page subscription support] <- 打勾, 允許使用者訂閱網頁 | + | |
- | - [Use nice URLs] <- .htaccess ((設定 .htaccess 必須在 apache 的設定檔內也要將 AllowOverride All 開啟)) | + | |
- | - [Email address to use for automatic mails] <- [email protected] 表示寄信者的 E-Mail | + | |
- | - [Generate Google sitemap (days)] <- 1 表示每天都更新 Google Sitemap | + | |
- | - [XML feed type] <- RSS 2.0 | + | |
- | - 點[儲存] | + | |
- | - 登入主機, | + | |
- | -- 修改 .htaccess 設定檔 | + | |
- | ++++ 實際處理語法| | + | |
- | <code sh> | + | |
- | su - root | + | |
- | vi / | + | |
- | </ | + | |
- | : | + | |
- | # | + | |
- | # AllowOverride controls what directives may be placed in .htaccess files. | + | |
- | # It can be " | + | |
- | # | + | |
- | # | + | |
- | AllowOverride All | + | |
- | + | ||
- | # | + | |
- | # Controls who can get stuff from this server. | + | |
- | # | + | |
- | : | + | |
- | </ | + | |
- | vi / | + | |
- | </ | + | |
- | <Files ~ " | + | |
- | Order allow, | + | |
- | Deny from all | + | |
- | Satisfy All | + | |
- | </ | + | |
- | + | ||
- | RewriteEngine on | + | |
- | + | ||
- | RewriteRule ^_media/ | + | |
- | RewriteRule ^_detail/ | + | |
- | RewriteRule ^_export/ | + | |
- | RewriteRule ^$ doku.php | + | |
- | RewriteCond %{REQUEST_FILENAME} | + | |
- | RewriteCond %{REQUEST_FILENAME} | + | |
- | RewriteRule (.*) doku.php? | + | |
- | RewriteRule ^index.php$ | + | |
- | + | ||
- | # 如果需要強制轉 SSL 就將以下兩行前面的 # 去掉 | + | |
- | # | + | |
- | # | + | |
- | + | ||
- | </ | + | |
- | ++++ | + | |
- | + | ||
- | ===== - 原有資料帳號連結 ===== | + | |
- | 如果有需要將原本的資料頁面移轉過來, | + | |
- | ++++實際命令語法| | + | |
- | <code sh> | + | |
- | cd / | + | |
- | mv data data.org | + | |
- | cp -a / | + | |
- | </ | + | |
- | ++++ | + | |
- | + | ||
- | <note warning> | + | |
- | * 在 2006 年版本中, | + | |
- | * 在 2007 年版本中, | + | |
- | cd / | + | |
- | wget http:// | + | |
- | tar -zxvf dokuwiki-2008-05-05.tgz | + | |
- | 原本安裝的 wiki 在 / | + | |
- | mv wiki wiki.old | + | |
- | mv dokuwiki-2008-05-05 wiki | + | |
- | chown -R apache: | + | |
- | cd wiki | + | |
- | rm install.php | + | |
- | cp -a ../ | + | |
- | mv data data.org | + | |
- | cp -a ../ | + | |
- | cd data | + | |
- | mkdir tmp | + | |
- | chown -R apache: | + | |
- | rm -rf cache/* | + | |
- | cd ../lib | + | |
- | mv tpl tpl.org | + | |
- | cp -a ../ | + | |
- | cp -a tpl.org/* tpl/ | + | |
- | mv plugins plugins.org | + | |
- | cp -a ../ | + | |
- | cp -a plugins.org/ | + | |
- | cd ../conf | + | |
- | cp -a ../ | + | |
- | cp -a ../ | + | |
- | cp -a ../ | + | |
- | 再複製有更改過的設定檔 | + | |
- | cp -a ../ | + | |
- | cp -a ../ | + | |
- | 開啟 wiki 頁面確認沒問題就可移除掉剛剛所 mv 的 *.org | + | |
- | cd / | + | |
- | rm -rf data.org | + | |
- | rm -rf lib/ | + | |
- | rm -rf lib/ | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | ===== - 安裝 Plugin ===== | + | |
- | < | + | |
- | + | ||
- | ===== - 下載其他 Template ===== | + | |
- | < | + | |
- | * 參考 **[[http:// | + | |
- | * 推薦 **[[http:// | + | |
- | </ | + | |
- | ++++實際安裝 simple template 程序語法| | + | |
- | <code sh> | + | |
- | cd / | + | |
- | wget http:// | + | |
- | tar zxvf template-simple-2007-05-24.tgz | + | |
- | </ | + | |
- | 如果需要, | + | |
- | ++++ | + | |
- | ===== - 延伸參考資料 ===== | + | |
- | < | + | |
{{topic> | {{topic> | ||
- | ---- | ||
- | * http:// | ||
- | </ | ||
{{tag> | {{tag> |