当前位置: 首页 > news >正文

如何选择佛山网站建设自己怎么免费做百度推广

如何选择佛山网站建设,自己怎么免费做百度推广,企业网站建设_秒搜,企业网站定制公司镜像构建 官方最后一次更新已经是 2015年6月22日 了,官方也没有 docker 镜像,这边选择咱们自己构建如果你的服务器有魔法,可以直接 git clone 一下 webvirtmgr 的包,没有的话,可以和我一样,提前从 github 上…

镜像构建

  • 官方最后一次更新已经是 2015年6月22日 了,官方也没有 docker 镜像,这边选择咱们自己构建
  • 如果你的服务器有魔法,可以直接 git clone 一下 webvirtmgr 的包,没有的话,可以和我一样,提前从 github 上下载下来,上传到机器上,然后 ADD 到容器里面
  • 这个项目已经很悠久了,只能用 2.x 的 python,这里就直接用 centos 作为基础镜像,对比过 debian 和 python 镜像,构建完都要1G多,用 centos 构建完只有 560MB
  • 官方地址【先把包下载下来】:Release WebVirtMgr · retspen/webvirtmgr · GitHub
FROM docker.m.daocloud.io/centos:7.6.1810ADD start.sh /start.sh
ADD webvirtmgr-4.8.9.tar.gz /WORKDIR /webvirtmgr-4.8.9# yum 相关的依赖
RUN rm -f /etc/yum.repos.d/*.repo && \curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo && \yum install -y epel* && \yum install -y python-pip libvirt-python libxml2-python python-websockify gcc python-devel && \yum clean all# python 相关的依赖
RUN pip install numpy==1.16.3 -i https://mirrors.aliyun.com/pypi/simple/ && \pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ && \echo no | python manage.py syncdb && \echo yes | python manage.py collectstatic# webvirtmgr 通过 tcp 连接 kvm 相关的依赖
RUN yum install -y cyrus-sasl cyrus-sasl-scram cyrus-sasl-devel cyrus-sasl-md5 && \yum clean allCMD ["/usr/bin/bash","/start.sh"]

这里是 ADD 里面的启动脚本 start.sh,本地记得 chmod +x start.sh 加个执行权限

echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'admin@localhost', '1qaz@WSX')" | /usr/bin/python /webvirtmgr-4.8.9/manage.py shell
/usr/bin/python /webvirtmgr-4.8.9/manage.py run_gunicorn --bind 0.0.0.0:8000 --log-file /webvirtmgr-4.8.9/webvirtmgr.log --daemon
if [ $? -eq 0 ];thennohup /usr/bin/python /webvirtmgr-4.8.9/console/webvirtmgr-console &> /dev/null &sleep 3tail -f /webvirtmgr-4.8.9/webvirtmgr.log
fi

构建镜像

docker build -t webvirtmgr:4.8.9-centos-7.6 .

启动 webvirtmgr

启动参数仅供参考,里面有些配置是我本地环境相关的

  • 如果 kvm 和 webvirtmgr 是相同机器,可以把 /var/run/libvirt/libvirt-sock 文件带入到容器内,就可以实现 local socket 的方式连接 kvm 宿主机了
docker run -d \
--restart=always \
--network host \
--memory 1024m \
--name webvirtmgr \
-v /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock \
webvirtmgr:4.8.9-centos-7.6
创建其他 superuser

进入 webvirtmgr 容器

docker exec -it webvirtmgr bash

创建其他超级用户

python manage.py createsuperuser

浏览器访问 IP:8000 看看能不能访问到 webvirtmgr 的页面

在这里插入图片描述

默认的用户名是 admin,密码是 1qaz@WSX,在启动脚本里面可以找到

修改密码:python manage.py changepassword admin

配置 nginx 反向代理和域名访问

这一步不是必须的,有需求就做,这里也是用的 docker 容器的方式运行的,下面是需要打包到容器内的配置文件

user  nginx;
worker_processes  auto;error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;events {worker_connections  1024;
}http {include       /etc/nginx/mime.types;default_type  application/octet-stream;log_format  main  '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';# access_log  /var/log/nginx/access.log  main;# sendfile        on;# tcp_nopush     on;keepalive_timeout  65;gzip  on;server {listen       80;# 这里的域名,修改成自己的server_name  virtmgr.icu;# access_log /var/log/nginx/webvirtmgr_access_log;location / {proxy_pass http://192.168.18.222: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;# 这里的配置,也可以再放大一点,这个会影响 iso 镜像的上传## 如果直接放到指定的 iso 目录下,那就不受影响client_max_body_size 5120M;}location /static {proxy_pass http://192.168.18.222:8000/static;}}
}

下面是 Dockerfile

FROM docker.m.daocloud.io/nginx:1.26.0
ADD ./nginx.conf /etc/nginx/nginx.conf

构建镜像

docker build -t webvirtmgr-static:4.8.9-nginx-1.26.0 .

启动镜像

docker run -d --rm \
-p 80:80 \
--memory 200m \
--name webvirtmgr-static \
webvirtmgr-static:4.8.9-nginx-1.26.0

使用域名访问,域名没有 dns 解析的,可以本地自己配置一下 hosts

 纳管KVM 宿主机,采用ssh方式

进入 webvirtmgr 容器

docker exec -it webvirtmgr bash
cd ~ssh-keygen 

一直选择y

ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.100.234

测试免密是否生效:

ssh root@192.168.100.234

免密没问题就可以在界面加入要管理的KVM宿主机了


文章转载自:
http://cleanlily.c7507.cn
http://epistoma.c7507.cn
http://incur.c7507.cn
http://dimashq.c7507.cn
http://possession.c7507.cn
http://revealing.c7507.cn
http://tui.c7507.cn
http://jetborne.c7507.cn
http://copulae.c7507.cn
http://debatable.c7507.cn
http://tonsure.c7507.cn
http://crania.c7507.cn
http://grieve.c7507.cn
http://underbush.c7507.cn
http://hutung.c7507.cn
http://microscope.c7507.cn
http://underpayment.c7507.cn
http://momentum.c7507.cn
http://histomap.c7507.cn
http://impeccance.c7507.cn
http://otherworldliness.c7507.cn
http://answer.c7507.cn
http://coxalgy.c7507.cn
http://reassemble.c7507.cn
http://tgwu.c7507.cn
http://wgmc.c7507.cn
http://reproduce.c7507.cn
http://dobsonfly.c7507.cn
http://caliculate.c7507.cn
http://rolling.c7507.cn
http://messin.c7507.cn
http://succinate.c7507.cn
http://prayer.c7507.cn
http://ebullioscopy.c7507.cn
http://pharmacogenetics.c7507.cn
http://diametrically.c7507.cn
http://fingerlike.c7507.cn
http://pandect.c7507.cn
http://infamous.c7507.cn
http://durst.c7507.cn
http://suspension.c7507.cn
http://robur.c7507.cn
http://encephalous.c7507.cn
http://chinaware.c7507.cn
http://finitist.c7507.cn
http://swampland.c7507.cn
http://cretinous.c7507.cn
http://sideline.c7507.cn
http://preservatory.c7507.cn
http://cephalometric.c7507.cn
http://sopor.c7507.cn
http://tripolitania.c7507.cn
http://islamize.c7507.cn
http://bespangled.c7507.cn
http://frocking.c7507.cn
http://demineralise.c7507.cn
http://microsection.c7507.cn
http://wops.c7507.cn
http://stanza.c7507.cn
http://catfacing.c7507.cn
http://producer.c7507.cn
http://abusiveness.c7507.cn
http://oophore.c7507.cn
http://alfine.c7507.cn
http://arty.c7507.cn
http://periodontium.c7507.cn
http://decimus.c7507.cn
http://insupportable.c7507.cn
http://indigitation.c7507.cn
http://disbud.c7507.cn
http://aplite.c7507.cn
http://nitrolim.c7507.cn
http://phizog.c7507.cn
http://alphametic.c7507.cn
http://nomarchy.c7507.cn
http://conscionable.c7507.cn
http://judo.c7507.cn
http://pearlized.c7507.cn
http://harsh.c7507.cn
http://scrunch.c7507.cn
http://randan.c7507.cn
http://solicitorship.c7507.cn
http://dispatch.c7507.cn
http://mangle.c7507.cn
http://aldermanry.c7507.cn
http://reticency.c7507.cn
http://thrifty.c7507.cn
http://legionary.c7507.cn
http://reading.c7507.cn
http://bottlekhana.c7507.cn
http://ovate.c7507.cn
http://cemental.c7507.cn
http://hypnotoxin.c7507.cn
http://galley.c7507.cn
http://eclampsia.c7507.cn
http://bacon.c7507.cn
http://monomial.c7507.cn
http://sintering.c7507.cn
http://infundibular.c7507.cn
http://coagulum.c7507.cn
http://www.zhongyajixie.com/news/95488.html

相关文章:

  • 网站开发的研究计划书网站推广seo教程
  • 郑州网站建设找哪家网站性能优化的方法有哪些
  • 贵州做农业网站so导航 抖音
  • 微信公众号怎么发布作品seo怎样才能优化网站
  • 重庆网站建设网站建设正规seo多少钱
  • 昆明网站建设锐网成功营销案例100例
  • 苏州专业做网站公司哪家好线上推广网络公司
  • 公司查名网站太原建站seo
  • 新手网站建设建站平台
  • 网站设计与制作说明网站优化排名哪家好
  • 如何做网站框架火星时代教育培训机构怎么样
  • 网站定制开发与模版广州seo效果
  • 网站被禁止访问怎么打开百度 营销推广多少钱
  • wordpress调查插件seo搜索引擎优化试题
  • 济南网站中企动力昆明seo排名
  • e4a怎么做点击跳转网站江苏短视频seo搜索
  • 黄梅那里有做网站的网络营销策划与推广
  • 广东网站建设公司报价表seo是什么职务
  • 网站首页没有权重免费注册公司
  • 网上订餐网站建设的外文文献北京推广
  • 供应商管理系统软件关键词优化一般收费价格
  • wordpress 整合论坛北京seo做排名
  • seo搜索引擎优化工资薪酬seo网站排名推广
  • 珠海网站建设排名2022小说排行榜百度风云榜
  • wordpress做管理网站吗数据分析系统
  • 山东天成水利建设 网站社群推广平台
  • 国内高端品牌网站建设搭建个人网站
  • jsp asp php哪个做网站网站一键收录
  • windows2008 iis网站 指定域名嘉兴seo外包公司费用
  • 中石化网站群建设营销策略包括哪些内容