v2-1a0929a062633f2b6e222506b7397e37.jpg
https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr

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

cd /opt
git clone git://github.com/retspen/webvirtmgr.git
cd webvirtmgr
pip install -r requirements.txt -i https://pypi.douban.com/simple/
./manage.py syncdb
./manage.py collectstatic
./manage.py createsuperuser
./manage.py runserver


#nginx

server {
listen 8001;
server_name 127.0.0.1 10.0.0.1;

    location /static/ {
            root /opt/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-forproxy_add_x_forwarded_for;
            proxy_set_header Host host:server_port;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_connect_timeout 6000;
            proxy_read_timeout 6000;
            proxy_send_timeout 6000;
            client_max_body_size 1024M; # Set higher depending on your needs
    }

}

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code