Revamp, switch to english
This commit is contained in:
parent
640f171838
commit
5de9d1dad8
1 changed files with 23 additions and 37 deletions
|
@ -4,17 +4,17 @@ Some commands:
|
|||
$ lxc image alias list images:
|
||||
$ lxc info <name>
|
||||
$ lxc config edit <name>
|
||||
$ lxc config sonw <name>
|
||||
$ lxc config show <name>
|
||||
$ lxc exec <name> bash
|
||||
$ lxc config set <name> limits.memory 512MB
|
||||
$ lxc config set <name> limits.cpu 2
|
||||
$ lxc config device set <name> root size 20GB
|
||||
$ lxc launch images:debian/stretch/amd64 <name>
|
||||
$ lxc launch images:debian/11 <name>
|
||||
$ lxc config set <name> environment.LC_ALL=en_US.UTF-8
|
||||
$ lxc list
|
||||
$ lxc storage volume list <storagename>
|
||||
$ #mode privileged
|
||||
$ lxc launch ubuntu:16.04 test -c security.privileged=true -c security.nesting=true
|
||||
$ lxc launch ubuntu:20.04 test -c security.privileged=true -c security.nesting=true
|
||||
$ lxc config device add test ssh proxy listen=tcp:0.0.0.0:2222 connect=tcp:127.0.0.1:22
|
||||
$ #Create a backups volume in the local (default) pool (ZFS) and use it for backups
|
||||
$ lxc storage volume create local backups
|
||||
|
@ -25,47 +25,39 @@ $ lxc config set storage.images_volume local/images
|
|||
$ lxc config device add $containerName $deviceName disk source=/home/foo path=/home/foo
|
||||
```
|
||||
|
||||
Chemins :
|
||||
Path:
|
||||
- /var/lib/lxd/
|
||||
- /var/snap/lxd/common/lxd/
|
||||
|
||||
Normal : /var/lib/lxd/
|
||||
Snap : /var/snap/lxd/common/lxd/
|
||||
|
||||
Paquets à installer pour se sentir à l'aise sur une Debian ou Ubuntu
|
||||
|
||||
Entering LXD namespace managed by snap (to access ZFS mount points for example):
|
||||
```console
|
||||
# nsenter -t $(cat /var/snap/lxd/common/lxd.pid) -m
|
||||
```
|
||||
vim logrotate
|
||||
|
||||
Some packages I like to install on fresh containers install:
|
||||
```
|
||||
vim
|
||||
postfix
|
||||
logrotate
|
||||
etckeeper
|
||||
iputils-ping
|
||||
dnsutils
|
||||
```
|
||||
|
||||
N'est plus nécessaire sur les images récentes :
|
||||
Some initial steps:
|
||||
- Enable journald
|
||||
- Set hostname (create /etc/hostname on Archlinux!)
|
||||
- Configure postfix
|
||||
|
||||
Disable getty for old containers images:
|
||||
```console
|
||||
# sed -i 's/^tty/# tty/g' /etc/inittab
|
||||
# systemctl disable getty@tty{1..4}
|
||||
# reboot
|
||||
```
|
||||
|
||||
- Activer journald
|
||||
- Mettre le bon hostname
|
||||
- Installer postfix
|
||||
|
||||
Paquets à installer pour se sentir à l'aise sur une Alpine
|
||||
|
||||
```
|
||||
etckeeper
|
||||
vim
|
||||
```
|
||||
|
||||
```console
|
||||
# sed -i 's/^tty/# tty/g' /etc/inittab
|
||||
|
||||
# #clean messages
|
||||
rm /var/log/messages
|
||||
```
|
||||
|
||||
Nginx :
|
||||
|
||||
Nginx memo:
|
||||
```nginx
|
||||
set_real_ip_from W.X.Y.Z;
|
||||
#real_ip_recursive on;
|
||||
|
@ -75,9 +67,3 @@ log_format custom '$http_x_forwarded_for - $remote_user [$time_local] '
|
|||
'"$http_referer" "$http_user_agent"';
|
||||
access_log /var/log/nginx/access.log custom;
|
||||
```
|
||||
|
||||
Aller dans le namespace de LXD (snap0 pour faire des actions genre mount/umount :
|
||||
|
||||
```console
|
||||
# nsenter -t $(cat /var/snap/lxd/common/lxd.pid) -m
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue