CentOS7
?
配置環(huán)境
?
安裝寶塔
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh
?
極速安裝LAMP
Apache 2.4
MySQL 5.5
Pure-Ftpd 1.0.47
PHP 7.1
phpMyAdmin 4.7
?
2G及以上RAM可選擇更高版本的MySQL
?
軟件設置添加PHP插件
fileinfo
opcache
redis
?
?
安裝Nextcloud
?
網站設置添加域名domain,設置ssl證書
開啟強制HTTPS
?
文件管理進入網站根目錄,刪除所有文件,然后使用離線下載下載Nextcloud包
https://download.nextcloud.com/server/releases/nextcloud-13.0.2.zip
?
解壓并將所有文件移動到網站根目錄
?
訪問域名,設置賬戶密碼
?
數(shù)據(jù)庫選擇MySQL,賬戶root,密碼來自寶塔面板“數(shù)據(jù)庫”“root密碼”
?
數(shù)據(jù)庫名隨意輸入,localhost不變
?
?
配置aria2與管理面板
?
安裝aria2
yum -y install aria2
?
創(chuàng)建配置文件與日志
cd ~
mkdir .aria2
cd .aria2
touch aria2.conf
touch aria2.session
?
編輯配置文件
vi aria2.conf
?
點擊Insert然后粘貼
##### RPC Options #####
enable-rpc=true
rpc-listen-port=6800
rpc-allow-origin-all=true
rpc-listen-all=true
##### Advance Options #####
daemon=true
disk-cache=16M
file-allocation=falloc
save-session=/root/.aria2/aria2.session
input-file=/root/.aria2/aria2.session
save-session-interval=60
##### Basic Options #####
dir=/www/wwwroot/domain/data/downloads
max-concurrent-downloads=20
max-connection-per-server=10
min-split-size=20M
split=10
?
esc然后:wq保存并退出
?
啟動aria2
aria2c
?
寶塔面板“安全”打開6800端口
?
創(chuàng)建網站,進入根目錄
?
清空目錄,離線下載ariang
https://github.com/mayswind/AriaNg/releases/download/0.4.0/aria-ng-0.4.0.zip
?
解壓并保證所有文件位于根目錄
?
訪問域名即可進入控制臺
?
?
配置文件權限
?
寶塔面板添加定時任務(1-5分鐘)
cd /www/wwwroot/domain/data/downloads
sudo chmod 777 *
?
點擊執(zhí)行腳本查看日志是否成功
使用Ubuntu安裝lnmp時的一些注意事項
?
安裝寶塔面板
wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && sudo bash install.sh
程序版本
nginx1.12
php7.1
mysql5.5
插件
fileinfo
opchache
redis
新建網站配置ssl
配置偽靜態(tài)
location
~ ^/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}
網站目錄下載文件解壓
打開域名配置賬戶密碼數(shù)據(jù)庫
php配置文件添加以下內容并重啟服務
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1
配置內存緩存
在nextcloud目錄config文件最后一個括號前添加代碼
'memcache.local' => '\OC\Memcache\Redis',
'redis' => array(
'host' => 'localhost',
'port' => 6379,
),
解決無法獲取環(huán)境變量
修改/www/server/php/71/etc/php-fpm.conf
添加以下代碼
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp
后臺任務使用cron