Centos7下一键安装Aria2
注意:CentOS6 因为源没有 Aria2包,所以不支持安装Aria2,请更换 CentOS7 或其他系统
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/aria2.sh && chmod +x aria2.sh && bash aria2.sh
注意:CentOS6 因为源没有 Aria2包,所以不支持安装Aria2,请更换 CentOS7 或其他系统
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/aria2.sh && chmod +x aria2.sh && bash aria2.sh
wget http://down.freenn.com/gz/cloudreve/cloudreve_3.5.3_linux_amd64.tar.gz
tar -zxvf cloudreve_3.5.3_linux_amd64.tar.gz
chmod +x ./cloudreve
./cloudreve
Cloudreve 默认会监听5212端口。你可以在浏览器中访问http://IP:5212进入 Cloudreve。
二、设置开机自启
vim /usr/lib/systemd/system/cloudreve.service
将下文 PATH_TO_CLOUDREVE 更换为程序所在目录:
[Unit]
Description=Cloudreve
Documentation=https://docs.cloudreve.org
After=network.target
Wants=network.target
[Service]
WorkingDirectory=/PATH_TO_CLOUDREVE
ExecStart=/PATH_TO_CLOUDREVE/cloudreve
Restart=on-abnormal
RestartSec=5s
KillMode=mixed
StandardOutput=null
StandardError=syslog
[Install]
WantedBy=multi-user.target
然后:
systemctl daemon-reload
systemctl start cloudreve
systemctl enable cloudreve
做完以上步骤,即可舒适使用!
管理命令:
systemctl start cloudreve
systemctl stop cloudreve
systemctl restart cloudreve
systemctl status cloudreve
这里讲下Docker和NPM两种安装教程,任选一种即可
一、NPM安装
Github地址:https://github.com/denghongcai/forsaken-mail
1、安装NPM
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs git screen
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
yum install nodejs git screen -y
2、安装Forsaken Mail
git clone https://github.com/denghongcai/forsaken-mail.git
cd forsaken-mail
npm install
screen -S forsakenmail
npm start
最后按Ctrl+A,再按D键返回主界面,然后打开http//ip:3000就可以查看Forsaken Mail邮箱界面了,如果你打不开界面,可能还需要开启防火墙端口。注意:一定要开启25和3000端口。检测端口是否打开请参考这篇文 http://blog.freenn.com/jsfx/7.html
二、Docker安装
1、安装Docker
rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum update -y
yum -y install docker-io
service docker start
chkconfig docker on
curl -sSL https://get.docker.com/ | sh
systemctl start docker
systemctl enable docker
2、安装Forsaken Mail
docker run --name forsaken-mail -d -p 25:25 -p 3000:3000 denghongcai/forsaken-mail
安装成功后打开http//ip:3000就可以了,如果打不开界面请参考NPM安装步骤。