Centos 7 installiert WebVirtMgr, verwaltet unabhängige Server und erstellt KVM VPS

Centos 7 installiert WebVirtMgr, verwaltet unabhängige Server und erstellt KVM VPS

Bedienterminal: 1.1.1.1
Server: 2.2.2.2

Folgendes wurde erfolgreich unter Centos 7.2 verwendet.

1. Installieren Sie WebVirtMgr auf der Steuerungsseite

1. Installieren Sie die erforderlichen Anwendungen

 sudo yum -y install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm sudo yum -y install git python-pip libvirt-python libxml2-python python-websockify supervisor nginx sudo yum -y install gcc python-devel sudo pip install numpy

2. Installieren und richten Sie Python und Django ein

 git clone git://github.com/retspen/webvirtmgr.git cd webvirtmgr sudo pip install -r requirements.txt ./manage.py syncdb ./manage.py collectstatic

Legen Sie dann Ihren Benutzernamen und Ihr Passwort fest.

Zusätzliche Benutzer können hinzugefügt werden :

 ./manage.py createsuperuser

3. Nginx einrichten

a. Verwenden Sie: Port 8000

 ssh-keygen ssh-copy-id 1.1.1.1 ssh 1.1.1.1 -L localhost:8000:localhost:8000 -L localhost:6080:localhost:6080

b. Nginx-Einstellungen

 cd .. sudo mv webvirtmgr /var/www/

Fügen Sie die Konfigurationsdatei webvirtmgr.conf hinzu

 vi /etc/nginx/conf.d/webvirtmgr.conf

Fügen Sie den folgenden Inhalt hinzu:

 server { listen 80 default_server; server_name $hostname; #access_log /var/log/nginx/webvirtmgr_access_log; location /static/ { root /var/www/webvirtmgr/webvirtmgr; expires max; } location / { proxy_pass http://127.0.0.1:8000; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-Proto $scheme; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; client_max_body_size 1024M; # Set higher depending on your needs } }

Nginx-Konfiguration hinzufügen:

 vi /etc/nginx/nginx.conf

Hinzugefügter Inhalt:

 include /etc/nginx/conf.d/*.conf;

Starten Sie nginx neu

 /bin/systemctl restart nginx.service

c. Upgrade von SELinux

 /usr/sbin/setsebool httpd_can_network_connect true sudo chkconfig supervisord on

d. Upgrade von webvirtmgr

 cd /var/www/webvirtmgr sudo git pull sudo ./manage.py collectstatic sudo service supervisord restart

4. Supervisor einrichten
a. Betrieb

 sudo chown -R nginx:nginx /var/www/webvirtmgr

b. Konfiguration hinzufügen

 vi /etc/supervisord.d/webvirtmgr.ini

Hinzufügen zu:

 [program:webvirtmgr] command=/usr/bin/python /var/www/webvirtmgr/manage.py run_gunicorn -c /var/www/webvirtmgr/conf/gunicorn.conf.py directory=/var/www/webvirtmgr autostart=true autorestart=true logfile=/var/log/supervisor/webvirtmgr.log log_stderr=true user=nginx [program:webvirtmgr-console] command=/usr/bin/python /var/www/webvirtmgr/console/webvirtmgr-console directory=/var/www/webvirtmgr autostart=true autorestart=true stdout_logfile=/var/log/supervisor/webvirtmgr-console.log redirect_stderr=true user=nginx

Supervisor neu starten

 /bin/systemctl stop supervisord.service /bin/systemctl start supervisord.service

2. KVM auf dem Server installieren

3. Verwenden Sie die Webmethode von WebVirtMgr zur Verwaltung von KVM VPS

IV. Sonstiges

1. pip existiert möglicherweise nicht, installieren Sie pip

 wget https://bootstrap.pypa.io/get-pip.py python get-pip.py

Referenz: https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr
http://www.linuxidc.com/Linux/2016-10/136589p2.htm

<<:  SpeedyKVM 12 GB RAM KVM VPS Seattle Bewertung

>>:  SpeedyKVM: 3,8 $/Monat/2,6 GB Speicher/1 TB Festplatte/5 TB Datenverkehr/KVM/Dallas

Artikel empfehlen

BOLTVM: 15 $/Jahr/512 MB RAM/25 GB SSD-Speicherplatz/500 GB Bandbreite/OpenVZ

BOLTVM ist ein vor nicht allzu langer Zeit gegrün...

Große Bandbreite Los Angeles CN2 GIA VPS Sammlung und Empfehlung

CN2 GIA in Los Angeles, mit ausgezeichneter Inlan...

Ausgezeichnete responsive WordPress-Themes 2014 (Teil 1)

1. WordPress-Theme V1 Themeneinführung: Kostenlos...