安装 DAVfs

apt install davfs2

挂载分区到目录

mkdir /mnt/dav
mount.davfs http://localhost:8080/ /mnt/dav
或
mount -t davfs http://localhost:8080/ /mnt/dav

仅适用于 KVM 虚拟,OpenVZ 需要主机商支持 FUSE 模块。

Debian 8 64 步骤:

下载rintd二进制文件:

wget --no-check-certificate  "https://github.com/linhua55/lkl_study/releases/download/v1.2/rinetd_bbr_powered" -O /root/rinetd

修改权限:

chmod +x rinetd

修改rinetd的配置文件rinetd.conf,添加监听地址:

vi rinetd.conf

内容

# bindadress bindport connectaddress connectport
0.0.0.0 443 0.0.0.0 443
0.0.0.0 80 0.0.0.0 80

设置开机启动

vi /etc/systemd/system/rinetd.service

内容


[Unit]
Description=rinetd

[Service]
ExecStart=/root/rinetd -f -c /root/rinetd.conf raw venet0:0
Restart=always
  
[Install]
WantedBy=multi-user.target

最后执行:

systemctl enable rinetd.service && systemctl start rinetd.service

需要的库

apt install gcc g++ libssl-dev libgcrypt-dev libexpat1-dev libssh2-1-dev libc-ares-dev zlib1g-dev libsqlite3-dev pkg-config

下载最新版 Aria2解压

wget https://github.com/aria2/aria2/releases/download/release-1.32.0/aria2-1.32.0.tar.gz
tar xzvf aria2-1.32.0.tar.gz
cd aria2-1.32.0

编译

./configure
make
make install

文件瘦身

strip -s /usr/local/bin/aria2c

配置文件

mkdir /etc/aria2/
vi /etc/aria2/aria2.conf
touch /路径/aria2.session

配置内容

dir=/home/www/
max-concurrent-downloads=3
input-file=/路径/aria2.session
save-session=/路径/aria2.session
save-session-interval=60
enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true
rpc-secret=设定访问rpc密码
#https设置
#rpc-secure=true
#rpc-certificate=crt文件位置
#rpc-private-key=key文件位置

启动脚本

vi /etc/init.d/aria2c
chmod +x /etc/init.d/aria2c
/etc/init.d/aria2c start

脚本内容

#!/bin/sh

PREFIX="/usr/local/bin"
NAME="aria2c"
FRIENDLY="Aria2"
CONFFILE="/etc/aria2/aria2.conf"

start() {
  if [ -f "$PIDFILE" ]; then
    echo "$FRIENDLY is already running."
    exit 1
  fi
  echo -n "Starting $FRIENDLY Services: "
  $PREFIX/$NAME --conf-path=$CONFFILE --daemon >/dev/null 2>&1
  if [ "$?" = "0" ]; then
    echo "succeeded."
  else
    echo "failed."
    exit 1
  fi
}

stop() {
  if [ ! -n "pidof $NAME" ]; then
    echo "$FRIENDLY is not running."
    exit 1
  fi
  echo -n "Shutting down $FRIENDLY Services: "
  killall "$NAME"
  if [ "$?" = "0" ]; then
    echo "succeeded."
  else
    echo "failed."
    exit 1
  fi
}

case "$1" in
  start)
    start
  ;;
  stop)
    stop
  ;;
  restart)
    "$0" stop
    sleep 1
    "$0" start
  ;;
  *)
    echo "Usage: $0 (start|stop|restart|usage)"
  ;;
esac
exit 0

第一步

进后台备份数据库,备份的时候,选择低版本数据库的方式备份

第二步

备份完数据库后,把所有文件包括备份出来的数据库转移到新空间

第三步

修改数据库配置文件/data/mysql_config.php为新空间的数据库帐号密码(根据配置文件新建一个一样的也行)

第四步

修改/admin/global.php查找“$ForceEnter=0;”改为“$ForceEnter=1;”即可强制登录后台,进行数据库还原

第五步

左侧菜单有数据库还原,之后,再把“$ForceEnter=1;”改回“$ForceEnter=0;”再输入密码进入后台,设置正确的访问网址即可