Owncloud安裝與配置(Debian)
這是一個簡單的配置ownCloud的教程。
安裝準備
先安裝好伺服器環境,我使用的是LAMP。
文件下載
ownCloud
配置ownCloud
解壓縮,安裝數據庫略。
在 .htaccess 內
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####
下添加我們熟悉的代碼
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
RewriteEngine on
RewriteCond %{HTTPS} !^on$
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=302]
</IfModule>
APC and memcache
sudo apt-get install php5-apc
sudo apt-get install memcached php5-memcached php5-memcache
sudo service apache2 restart
查看并添加memcache支援
ps ax | grep memcached
出現如下文字即安裝成功
19563 ? Sl 0:02 /usr/bin/memcached -m 64 -p 11211 -u memcache -l
127.0.0.1
在config.php最後添加
'memcache.local' => '\OC\Memcache\APC',
'memcache.distributed' => '\OC\Memcache\Memcached',
'memcached_servers' => array(
array('localhost', 11211),
),
即可
如果需要ocDownloader(注意只能在ownCloud 8.0-8.1運行)
https://github.com/DjazzLab/ocdownloader
依賴安裝
ARIA2
我是用的是Debian 8。ARIA2是Debian的官方repo,所以比較容易。
sudo apt-get install aria2 curl php5-curl
sudo aria2c --enable-rpc --rpc-allow-origin-all -c -D --log=/var/log/aria2.log --check-certificate=false
YouTube-DL Provider
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl
Reference:
https://wiki.sgc-univ.net/index.php/OCDownloader:Requirements_%28Linux_Debian_-_JESSIE%29
https://wiki.sgc-univ.net/index.php/OCDownloader:Install_The_YouTube-DL_Provider
https://wiki.sgc-univ.net/index.php/OCDownloader:Aria2_fallback_using_CURL_directly_%28Requirements%29
https://doc.owncloud.org/server/9.1/admin_manual/configuration_server/harden_server.html
https://doc.owncloud.org/server/9.1/admin_manual/configuration_server/caching_configuration.html
- 上一篇: 快速轉移MySQL數據庫存儲位置
- 下一篇: Debian / Ubuntu快速更换内核