<r>為了避免安裝套件版本相依性失敗<br/>
直接在Debian裝mediawiki<br/>
先安裝
<CODE><s>[code]</s>apt install composer<e>[/code]</e></CODE>
再來
<CODE><s>[code]</s>apt install mediawiki<e>[/code]</e></CODE>
其他mediawiki所需套件會自動一併安裝完成<br/>
請參考<br/>
<URL url="https://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Debian_or_Ubuntu"><LINK_TEXT text="https://www.mediawiki.org/wiki/Manual:R ... _or_Ubuntu">https://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Debian_or_Ubuntu</LINK_TEXT></URL><br/>
如此也把資料庫程式也一併裝好<br/>
Log in to MariaDB.<br/>
<br/>
    If you can log in as root (e.g., using sudo mysql -u root if unix_socket authentication is configured on MariaDB 10.4+), do so.<br/>
    If you have a current password:
<CODE><s>[code]</s>mysql -u root -p<e>[/code]</e></CODE>

Once logged into the MariaDB [(none)]&gt; prompt, execute the following command, replacing 'MyN3wP4ssw0rd' with your strong password:
<CODE><s>[code]</s>ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyN3wP4ssw0rd';
<e>[/code]</e></CODE>
接下來安裝phpmyadmin<br/>
apt install phpmyadmin<br/>
建立資料錄使用者phpmyadmin帳號及密碼<br/>
將 phpmyadmin 設為只能本地存取(還不是ssl加密連線)<br/>
nano /etc/phpmyadmin/apache.conf
<CODE><s>[code]</s># line 8 : set access permission
Require ip 127.0.0.1 123.240.180.243<e>[/code]</e></CODE>
接下來安裝webmin<br/>
apt install curl
<CODE><s>[code]</s>curl -o webmin-setup-repo.sh https://raw.githubusercontent.com/webmin/webmin/master/webmin-setup-repo.sh
sudo sh webmin-setup-repo.sh
<e>[/code]</e></CODE>
sudo apt-get install webmin --install-recommends<br/>
nano /etc/webmin/miniserv.conf
<CODE><s>[code]</s><i>
</i># add to last line : add access permission
allow=127.0.0.1 123.240.180.243<e>[/code]</e></CODE>
設定開機打開webmin<br/>
sudo systemctl enable webmin<br/>
sudo systemctl restart webmin<br/>
打開firefox browser<br/>
<URL url="https://127.0.0.1:10000">https://127.0.0.1:10000</URL><br/>
接下來要設定awstats<br/>
<URL url="https://zine-tw.com/viewtopic.php?t=3812&amp;sid=22639dc0a9e8f8dcf02ecd9df2c0e876"><s>[url]</s><LINK_TEXT text="viewtopic.php?t=3812&amp;sid=22639dc0a9e8f8 ... 9df2c0e876">https://zine-tw.com/viewtopic.php?t=3812&amp;sid=22639dc0a9e8f8dcf02ecd9df2c0e876</LINK_TEXT><e>[/url]</e></URL><br/>
如果awstats中/var/log/apache2的chown 跟chmod設定正確<br/>
那麼webmin日誌旋轉 log rotate應該如下圖
<ATTACHMENT filename="webmin_files_rotate.png" index="1"><s>[attachment=1]</s>webmin_files_rotate.png<e>[/attachment]</e></ATTACHMENT>
Debian 安全性更新<br/>
請參考<br/>
<URL url="https://www.debian.org/security/">https://www.debian.org/security/</URL><br/>
sudo apt install unattended-upgrades<br/>
<URL url="https://wiki.debian.org/PeriodicUpdates?action=show&amp;redirect=UnattendedUpgrades"><LINK_TEXT text="https://wiki.debian.org/PeriodicUpdates ... edUpgrades">https://wiki.debian.org/PeriodicUpdates?action=show&amp;redirect=UnattendedUpgrades</LINK_TEXT></URL>
<CODE><s>[code]</s>sudo dpkg-reconfigure unattended-upgrades
<e>[/code]</e></CODE>
這時登入webmin更新<br/>
<br/>
<URL url="https://127.0.0.1:10000">https://127.0.0.1:10000</URL>
<ATTACHMENT filename="security.png" index="0"><s>[attachment=0]</s>security.png<e>[/attachment]</e></ATTACHMENT></r>