Raspberry Pi Ubuntu 安装Docker
使用 APT 安装 由于 apt 源使用 HTTPS 以确保软件下载过程中不被篡改。因此,我们首先需要添加使用 HTTPS 传输的软件包以及 CA 证书。 $ sudo apt-get update $ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg2 \ lsb-release…
Read more使用 APT 安装 由于 apt 源使用 HTTPS 以确保软件下载过程中不被篡改。因此,我们首先需要添加使用 HTTPS 传输的软件包以及 CA 证书。 $ sudo apt-get update $ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg2 \ lsb-release…
Read more方法 系统要求:支持Debian、Ubuntu、CentOS系统。 运行以下命令:
1 2 |
<span class="hljs-attribute">wget</span> https://www.moerats.com/usr/down/sshport.sh bash sshport.sh |
输入端口确认。再打开防火墙端口:
1 2 3 4 5 6 7 |
<span class="hljs-comment">#如果防火墙使用的iptables(Centos 6),修改端口为8080</span> <span class="hljs-attribute">iptables</span> -I INPUT -p tcp --dport <span class="hljs-number">8080</span> -j ACCEPT service iptables save service iptables restart <span class="hljs-comment">#如果使用的是firewall(CentOS 7)</span> firewall-cmd --zone=public --add-port=<span class="hljs-number">8080</span>/tcp --<span class="hljs-literal">permanent</span> firewall-cmd --reload |
最后重启ssh生效:
1 2 3 4 5 |
<span class="hljs-meta">#</span><span class="bash">CentOS系统</span> service sshd restart <span class="hljs-meta">#</span><span class="bash">Debian/Ubuntu系统</span> service ssh restart 原文链接: <a href="https://www.moerats.com/archives/394/">https://www.moerats.com/archives/394/</a> |
备份:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<span class="token function">sudo</span> <span class="token function">cp</span> /etc/apt/sources.list /etc/apt/sources.list.bak 改文件: ———————————————— deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy main restricted deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-updates main restricted deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy universe deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-updates universe deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy multiverse deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-updates multiverse deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-backports main restricted universe multiverse deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-security main restricted deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-security universe deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-security multiverse ———————————————— |
换DNS(很重要) sudo vim /etc/resolv.conf ———————————————— This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8). Do not edit. # This file might be symlinked as /etc/resolv.conf. If you’re looking at /etc/resolv.conf and…
Read more