LXD Dashboard

$ sudo lxc launch images:ubuntu/22.04 lxd-dashboard
$ sudo lxc exec lxd-dashboard /bin/bash
# apt update && apt install wget nginx php-fpm php-curl sqlite3 php-sqlite3 -y
# wget https://github.com/lxdware/lxd-dashboard/archive/v3.7.0.tar.gz
# tar -xzf v3.7.0.tar.gz
# cp -a lxd-dashboard-3.7.0/default /etc/nginx/sites-available/
# cp -a lxd-dashboard-3.7.0/lxd-dashboard /var/www/html/
# apt install nano
# nano /etc/nginx/sites-enabled/default
	#fastcgi_pass unix:/run/php/php7.4-fpm.sock;
	fastcgi_pass unix:/run/php/php8.1-fpm.sock;
# mkdir -p /var/lxdware/data/sqlite
# mkdir -p /var/lxdware/data/lxd
# mkdir -p /var/lxdware/backups
# chown -R www-data:www-data /var/lxdware/
# chown -R www-data:www-data /var/www/html
# systemctl restart nginx

# systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
    Drop-In: /run/systemd/system/service.d
             └─zzz-lxc-service.conf
     Active: active (running) since Tue 2023-08-22 23:14:06 UTC; 14s ago

# exit
$ reboot
$ sudo lxc list
+---------------+---------+---------------------+
|     NAME        |  STATE |        IPV4              | 
+---------------+---------+---------------------+
| lxd-dashboard | RUNNING | 10.251.51.41 (eth0) | 
+---------------+---------+---------------------+

タイトルとURLをコピーしました