alpine一键安装xui
apk add curl&&apk add bash && bash <(curl -Ls https://raw.githubusercontent.com/Lynn-Becky/Alpine-x-ui/main/alpine-xui.sh)
重启面板命令:
/etc/init.d/x-ui restart
apk add curl&&apk add bash && bash <(curl -Ls https://raw.githubusercontent.com/Lynn-Becky/Alpine-x-ui/main/alpine-xui.sh)
重启面板命令:
/etc/init.d/x-ui restart
去除Shell脚本的r字符:
方法1
sed -i 's/\r//' your.sh
方法2
dos2unix your.sh
your.sh改成你的真实脚本名称,方法2需要先安装dos2unix
由于debian9 停止维护,目前可用的软件源如下:
deb http://archive.debian.org/debian/ stretch main contrib non-free
deb-src http://archive.debian.org/debian/ stretch main contrib non-free
deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
1.设置软件源
cat >/etc/apt/sources.list<<EOF
deb http://archive.debian.org/debian/ stretch main contrib non-free
deb-src http://archive.debian.org/debian/ stretch main contrib non-free
deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://archive.debian.org/debian-security/ stretch/updates main contrib non-free
deb http://archive.debian.org/debian/ stretch-backports main contrib non-free
EOF
2.更新软件源: apt update -y
3.提示gpg证书错误处理
报错信息:
W: GPG error: http://archive.debian.org/debian stretch-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
安装需要的依赖和软件:
apt-get install software-properties-common dirmngr -y
添加gpg证书验证:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 0E98404D386FA1D9
解决方法:
1、修改配置文件
vi /etc/ssh/sshd_config
将Subsystem sftp /usr/libexec/openssh/sftp-server
修改为Subsystem sftp internal-sftp
2、重启sshd服务
service sshd restart
find /var/log -type f -exec truncate -s 0 {} \;
find /var/log:在/var/log目录下查找。
-type f:只查找文件。
-exec truncate -s 0 {} ;:对找到的每个文件执行truncate命令,将其大小设置为0。