Ubuntu安装SSH并启用root用户远程登录
1.安装ssh,默认不会安装ssh,所以需要手动安装
sudo apt-get install openssh-server openssh-client
2.安装完成后需要重启ssh
sudo /etc/init.d/ssh restart
3.配置root用户远程登录,完成后发现使用ssh连接工具并不能连接上,需要我们更改配置文件
vim /etc/ssh/sshd_config
在文件最后加上下面三行
RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication no
安装docker和docker-compose
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add -
添加docker源
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
更新软件包
apt -y update
安装docker
sudo apt install docker-ce
sudo apt install docker-compose
配置镜像源
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://j7sada02s.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
重启docker
service docker restart
配置github
第一步:
git config --global user.name 's'
第二步:
git config --global user.email 's@gamil.com'