воскресенье, 8 декабря 2019 г.

Установка lxd на vps

Как установить и настроить GitLab в Ubuntu 18.04
Set Up a Reverse Proxy in an LXD Container to Host Multiple Websites
Secure HTTP Traffic with Certbot

# apt update
# apt upgrade
# apt install mc
# adduser user
# usermod -aG sudo user
# su user
$ cd ~
$ mkdir ~/.ssh
$ cd ~/.ssh
$ ip a
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):user@X.X.X.X
$ ls
Скачать и использовать для входа /home/user/.ssh/user@X.X.X.X
$ cp ~/.ssh/user@X.X.X.X.pub ~/.ssh/authorized_keys
$ rm ~/.ssh/user@X.X.X.X.pub
$ rm ~/.ssh/user@X.X.X.X
$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/authorized_keys
$ exit
# nano /etc/ssh/sshd_config

Проверить:

PasswordAuthentication no
.....

PubkeyAuthentication yes
ChallengeResponseAuthentication no

PermitRootLogin no
 
Сохранить.

$ sudo systemctl reload sshd

Зайти от user



$ sudo apt install lxd
$ sudo lxd init
Would you like to use LXD clustering? (yes/no) [default=no]:
Do you want to configure a new storage pool? (yes/no) [default=yes]:
Name of the new storage pool [default=default]:
Name of the storage backend to use (dir, lvm) [default=dir]:
Would you like to connect to a MAAS server? (yes/no) [default=no]:
Would you like to create a new local network bridge? (yes/no) [default=yes]:
What should the new bridge be called? [default=lxdbr0]:
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: none
Would you like LXD to be available over the network? (yes/no) [default=no]:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:

$ sudo reboot

Комментариев нет:

Отправить комментарий