Skip to content

Commit

Permalink
Update initos.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
dixtdf authored May 4, 2023
1 parent 07333fd commit c78a288
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion initos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@ cp -a /etc/apt/sources.list /etc/apt/sources.list.bak
sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
apt update
apt install -y vim curl openssh-server
apt install -y vim curl openssh-server ca-certificates gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
systemctl restart sshd
cp /etc/pam.d/gdm-password /etc/pam.d/gdm-password.bak
Expand Down

0 comments on commit c78a288

Please sign in to comment.