oVirt engine 3.4 installed on CentOS 6.x x64

oVirt是RHEV的上游开源产品, 管理也和RHEV非常相似, 主打KVM的虚拟机管理平台. 相比OpenStack更加轻量化.

本文先介绍一下oVirt engine在CentOS 6.x x64平台下的安装.

除了数据库我们使用自己编译的PostgreSQL 9.3.5, 因为从依赖安装的版本实在太老了. 其他都使用依赖安装.

导入yum源

# wget http://resources.ovirt.org/pub/yum-repo/ovirt-release34.rpm
# rpm -ivh ovirt-release34.rpm

或者

yum localinstall -y http://resources.ovirt.org/pub/yum-repo/ovirt-release34.rpm

导入的源, gpgcheck建议改成0, 省得安装gpgkey, 没安装的话, 后面安装一些包的时候还可能报错.

最好不要改成0, 导入KEY可参考

http://blog.163.com/digoal@126/blog/static/1638770402014740018561/

安装ovirt-engine, yum自动解决依赖关系.

# yum install -y ovirt-engine
 ovirt-engine                                        noarch       3.4.3-1.el6                          ovirt-3.4-stable       1.3 M
 otopi                                               noarch       1.2.2-1.el6                          ovirt-3.4-stable       133 k
 otopi-java                                          noarch       1.2.2-1.el6                          ovirt-3.4-stable        23 k
 ovirt-engine-backend                                noarch       3.4.3-1.el6                          ovirt-3.4-stable        10 M
 ovirt-engine-cli                                    noarch       3.4.0.5-1.el6                        epel                   196 k
 ovirt-engine-dbscripts                              noarch       3.4.3-1.el6                          ovirt-3.4-stable       189 k
 ovirt-engine-lib                                    noarch       3.4.3-1.el6                          ovirt-3.4-stable        20 k
 ovirt-engine-restapi                                noarch       3.4.3-1.el6                          ovirt-3.4-stable       2.2 M
 ovirt-engine-sdk-python                             noarch       3.4.3.0-1.el6                        ovirt-3.4-stable       685 k
 ovirt-engine-setup                                  noarch       3.4.3-1.el6                          ovirt-3.4-stable       4.2 k
 ovirt-engine-setup-base                             noarch       3.4.3-1.el6                          ovirt-3.4-stable        94 k
 ovirt-engine-setup-plugin-ovirt-engine              noarch       3.4.3-1.el6                          ovirt-3.4-stable       134 k
 ovirt-engine-setup-plugin-ovirt-engine-common       noarch       3.4.3-1.el6                          ovirt-3.4-stable        22 k
 ovirt-engine-setup-plugin-websocket-proxy           noarch       3.4.3-1.el6                          ovirt-3.4-stable        13 k
 ovirt-engine-tools                                  noarch       3.4.3-1.el6                          ovirt-3.4-stable       178 k
 ovirt-engine-userportal                             noarch       3.4.3-1.el6                          ovirt-3.4-stable        82 M
 ovirt-engine-webadmin-portal                        noarch       3.4.3-1.el6                          ovirt-3.4-stable       105 M
 ovirt-engine-websocket-proxy                        noarch       3.4.3-1.el6                          ovirt-3.4-stable        13 k
 ovirt-host-deploy                                   noarch       1.2.2-1.el6                          ovirt-3.4-stable        72 k
 ovirt-host-deploy-java                              noarch       1.2.2-1.el6                          ovirt-3.4-stable       7.3 k
 ovirt-image-uploader                                noarch       3.4.2-1.el6                          ovirt-3.4-stable       104 k
 ovirt-iso-uploader                                  noarch       3.4.3-1.el6                          ovirt-3.4-stable        36 k

准备nfs目录, 用于存放ISO文件. 数据库的表空间目录.

# mkdir -p /ssd4/ovirt/iso
# mkdir -p /ssd4/pg93/tbs_ovirt

配置/etc/hosts, 主机名. 

[root@db-172-16-3-150 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
172.16.3.150 db-172-16-3-150.sky-mobi.com

[root@db-172-16-3-150 ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=db-172-16-3-150.sky-mobi.com
GATEWAY=172.16.3.1

配置数据库, 因为使用engine-setup设置engine时, Local数据库配置不能指定端口, 所以先使用默认的5432端口. 

(有误, 选择Remote数据库配置, 可以配置端口, 所以数据库端口随意即可.)

后期要改可以改配置文件. 

/etc/ovirt-engine/engine.conf.d

配置数据库

[root@db-172-16-3-150 ~]# su - pg93
pg93@db-172-16-3-150-> psql
psql (9.3.3)
Type "help" for help.
digoal=# show port;
 port
------
 5432
(1 row)

create role ovirt superuser login encrypted password 'ovirt';  -- 建议给超级用户, 完全配置好之后, 再改成普通用户. 配置report时貌似需要超级用户权限
create tablespace tbs_ovirt location '/ssd4/pg93/tbs_ovirt';
create database ovirt with template template0 encoding 'UTF8' tablespace tbs_ovirt owner ovirt;  -- 数据库登录用户必须是owner, 因为需要新建language.
grant all on tablespace tbs_ovirt to ovirt;
 \c ovirt ovirt

#  ovirt=> create schema ovirt;  -- 目前oVirt不可使用自定义schema, 建议用public, 因为使用ovirt schema 后, web 管理界面会进不去.
# 错误参考 http://blog.163.com/digoal@126/blog/static/1638770402014714521962/
#  CREATE SCHEMA
#  ovirt=> \q

另外使用engine-setup前, 建议安装和后端数据库版本相同的数据库, jdbc等. 建议使用的目录结构和yum安装的postgresql , jdbc等目录结构一至. --exec-prefix=/usr

配置ovirt engine. 按提示输入即可.

[root@db-172-16-3-150 ~]# engine-setup
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging.conf']
          Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140728115413-jfj1wp.log
          Version: otopi-1.2.2 (otopi-1.2.2-1.el6)
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Yum Downloading: epel-debuginfo/metalink 2.4 k(43%)
[ INFO  ] Yum Downloading: repomdRx7eXltmp.xml (0%)
[ INFO  ] Yum Downloading: repomdSxJzf2tmp.xml (0%)
[ INFO  ] Yum Status: Downloading Packages
[ INFO  ] Yum Download/Verify: iproute-2.6.32-32.el6_5.x86_64
[ INFO  ] Yum Status: Check Package Signatures
[ INFO  ] Yum Status: Running Test Transaction
[ INFO  ] Yum Status: Running Transaction
[ INFO  ] Yum update: 1/2: iproute-2.6.32-32.el6_5.x86_64
[ INFO  ] Yum updated: 2/2: iproute
[ INFO  ] Yum Verify: 1/2: iproute.x86_64 0:2.6.32-32.el6_5 - u
[ INFO  ] Yum Verify: 2/2: iproute.x86_64 0:2.6.32-23.el6 - ud
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup
[ INFO  ] Stage: Environment customization

          --== PRODUCT OPTIONS ==--

          --== PACKAGES ==--

[ INFO  ] Checking for product updates...
[ INFO  ] No product updates found

          --== NETWORK CONFIGURATION ==--

          Host fully qualified DNS name of this server [db-172-16-3-150.sky-mobi.com]:
          Setup can automatically configure the firewall on this system.
          Note: automatic configuration of the firewall may overwrite current settings.
          Do you want Setup to configure the firewall? (Yes, No) [Yes]: No

          --== DATABASE CONFIGURATION ==--

          Where is the Engine database located? (Local, Remote) [Local]: 数据库选择Remote的话, 可以配置端口, Local不能选择配置端口.
          Setup can configure the local postgresql server automatically for the engine to run. This may conflict with existing applications.
          Would you like Setup to automatically configure postgresql and create Engine database, or prefer to perform that manually? (Automatic, Manual) [Automatic]: Manual

          ATTENTION

          Manual action required.
          Please create database for ovirt-engine use. Use the following commands as an example:

          create role engine with login encrypted password 'engine';
          create database engine owner engine
           template template0
           encoding 'UTF8' lc_collate 'en_US.UTF-8'
           lc_ctype 'en_US.UTF-8';

          Make sure that database can be accessed remotely.

          Engine database secured connection (Yes, No) [No]:
          Engine database name [engine]: ovirt
          Engine database user [engine]: ovirt
          Engine database password:   输入ovirt

          --== OVIRT ENGINE CONFIGURATION ==--

          Application mode (Both, Virt, Gluster) [Both]:
          Default storage type: (NFS, FC, ISCSI, POSIXFS, GLUSTERFS) [NFS]:
          Engine admin password:  输入engine
          Confirm engine admin password:   输入engine
[WARNING] Password is weak: it does not contain enough DIFFERENT characters
          Use weak password? (Yes, No) [No]: Yes

          --== PKI CONFIGURATION ==--

          Organization name for certificate [sky-mobi.com]: 

          --== APACHE CONFIGURATION ==--

          Setup can configure apache to use SSL using a certificate issued from the internal CA.
          Do you wish Setup to configure that, or prefer to perform that manually? (Automatic, Manual) [Automatic]:
          Setup can configure the default page of the web server to present the application home page. This may conflict with existing applications.
          Do you wish to set the application as the default page of the web server? (Yes, No) [Yes]: No

          --== SYSTEM CONFIGURATION ==--

          Configure WebSocket Proxy on this machine? (Yes, No) [Yes]: No
          Configure an NFS share on this server to be used as an ISO Domain? (Yes, No) [Yes]: 这里看情况, 可以不配置, 未来在ovirt engine WEB里配.
          Local ISO domain path [/var/lib/exports/iso]: /ssd4/ovirt/iso
          Local ISO domain ACL [0.0.0.0/0.0.0.0(rw)]:
          Local ISO domain name [ISO_DOMAIN]: 

          --== MISC CONFIGURATION ==--

          --== END OF CONFIGURATION ==--

[ INFO  ] Stage: Setup validation

          --== CONFIGURATION PREVIEW ==--

          Engine database name                    : ovirt
          Engine database secured connection      : False
          Engine database host                    : localhost
          Engine database user name               : ovirt
          Engine database host name validation    : False
          Engine database port                    : 5432
          NFS setup                               : True
          PKI organization                        : sky-mobi.com
          Application mode                        : both
          Update Firewall                         : False
          Configure WebSocket Proxy               : True
          Host FQDN                               : db-172-16-3-150.sky-mobi.com
          NFS export ACL                          : 0.0.0.0/0.0.0.0(rw)
          NFS mount point                         : /ssd4/ovirt/iso
          Datacenter storage type                 : nfs
          Configure local Engine database         : False
          Set application as default page         : False
          Configure Apache SSL                    : True

          Please confirm installation settings (OK, Cancel) [OK]:
[ INFO  ] Stage: Transaction setup
[ INFO  ] Stopping engine service
[ INFO  ] Stopping websocket-proxy service
[ INFO  ] Stage: Misc configuration
[ INFO  ] Stage: Package installation
[ INFO  ] Stage: Misc configuration
[ INFO  ] Creating Engine database schema
[ INFO  ] Creating CA
[ INFO  ] Configuring WebSocket Proxy
[ INFO  ] Generating post install configuration file '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf'
[ INFO  ] Stage: Transaction commit
[ INFO  ] Stage: Closing up

          --== SUMMARY ==--

          SSH fingerprint: EB:B1:B2:56:74:74:C7:FE:59:D2:B5:FE:65:85:D2:44
          Internal CA 80:04:4C:3F:3D:C5:98:10:D1:20:8B:32:8D:A0:98:A7:FF:2A:00:9B
          Web access is enabled at:
              http://db-172-16-3-150.sky-mobi.com:80/ovirt-engine
              https://db-172-16-3-150.sky-mobi.com:443/ovirt-engine
          Please use the user "admin" and password specified in order to login
          In order to configure firewalld, copy the files from
              /etc/ovirt-engine/firewalld to /etc/firewalld/services
              and execute the following commands:
              firewall-cmd -service ovirt-postgres
              firewall-cmd -service ovirt-https
              firewall-cmd -service ovirt-websocket-proxy
              firewall-cmd -service ovirt-nfs
              firewall-cmd -service ovirt-http
          The following network ports should be opened:
              tcp:111
              tcp:2049
              tcp:32803
              tcp:443
              tcp:5432
              tcp:6100
              tcp:662
              tcp:80
              tcp:875
              tcp:892
              udp:111
              udp:32769
              udp:662
              udp:875
              udp:892
          An example of the required configuration for iptables can be found at:
              /etc/ovirt-engine/iptables.example

          --== END OF SUMMARY ==--

[ INFO  ] Starting engine service
[ INFO  ] Restarting httpd
[ INFO  ] Restarting nfs services
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20140728115413-jfj1wp.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20140728124134-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ INFO  ] Execution of setup completed successfully

如果配置有问题, 可以使用engine-cleanup命令清除配置, 并手工清除数据库schema, 重新执行engine-setup配置.

# engine-cleanup

ovirt=# drop schema public cascade;
DROP SCHEMA
ovirt=# create schema public; grant all on schema public to PUBLIC;
CREATE SCHEMA

正常配置完后, 会自动启动ovirt-engine服务.

[root@db-172-16-3-150 ~]# ps -ewf|grep engin
ovirt    24538     1  0 12:41 ?        00:00:00 /usr/bin/python /usr/share/ovirt-engine/services/ovirt-engine/ovirt-engine.py --pidfile=/var/run/ovirt-engine.pid --background --redirect-output start
ovirt    24540 24538 21 12:41 ?        00:00:26 ovirt-engine -server -XX:+TieredCompilation -Xms1g -Xmx1g -XX:PermSize=256m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.awt.headless=true -Djsse.enableSNIExtension=false -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/ovirt-engine/dump -Djava.util.logging.manager=org.jboss.logmanager -Dlogging.configuration=file:///var/tmp/ovirt-engine/config/ovirt-engine-logging.properties -Dorg.jboss.resolver.warning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.modules.write-indexes=false -Djboss.server.default.config=ovirt-engine -Djboss.home.dir=/usr/share/jboss-as -Djboss.server.base.dir=/usr/share/ovirt-engine -Djboss.server.data.dir=/var/lib/ovirt-engine -Djboss.server.log.dir=/var/log/ovirt-engine -Djboss.server.config.dir=/var/tmp/ovirt-engine/config -Djboss.server.temp.dir=/var/tmp/ovirt-engine/tmp -Djboss.controller.temp.dir=/var/tmp/ovirt-engine/tmp -jar /usr/share/jboss-as/jboss-modules.jar -mp /var/tmp/ovirt-engine/modules/00-ovirt-engine-modules:/var/tmp/ovirt-engine/modules/01-jboss-as-modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -c ovirt-engine.xml
ovirt    24895     1  0 12:41 ?        00:00:00 /usr/bin/python /usr/share/ovirt-engine/services/ovirt-websocket-proxy/ovirt-websocket-proxy.py --pidfile=/var/run/ovirt-websocket-proxy.pid --background --redirect-output start

[root@db-172-16-3-150 ~]# cat /etc/exports
/ssd4/ovirt/iso 0.0.0.0/0.0.0.0(rw)

[root@db-172-16-3-150 ~]# showmount -e 127.0.0.1
Export list for 127.0.0.1:
/ssd4/ovirt/iso 0.0.0.0/0.0.0.0
时间: 2024-07-31 09:05:11

oVirt engine 3.4 installed on CentOS 6.x x64的相关文章

Joomla, PHP, Nginx, PostgreSQL, fpm on CentOS 6.4 x64

本文介绍一下Joomla的安装和配置. 环境 :  CentOS  6.x x64 PHP # rpm -qa|grep php php-pdo-5.4.30-1.el6.remi.x86_64 php-gd-5.4.30-1.el6.remi.x86_64 php-fpm-5.4.30-1.el6.remi.x86_64 php-common-5.4.30-1.el6.remi.x86_64 php-5.4.30-1.el6.remi.x86_64 php-extras-debuginfo-5

mediawiki, nginx, PHP, PostgreSQL, zhparser on CentOS 6.4 x64

本文介绍一下如何部署wiki网站. 目前wikimedia网站的架构 :    本文测试环境 :  CentOS 6.x x64 mediawiki 1.23.1 php 5.5.14 nginx 1.6.0 PostgreSQL 9.3.x zhparser 中文分词 选择mediawiki 的 lts版本.  # wget http://releases.wikimedia.org/mediawiki/1.23/mediawiki-1.23.1.tar.gz # tar -zxvf medi

use process's network device namespace on CentOS 6.5+ x64 by openstack modified iproute package

在阅读docker 高级网络时, 发现原来还可以设置进程级别的网络设备namespace. 我这里的环境是CentOS 6.5 x64, 这个版本的iproute包还比较老, 不支持ip netns指令, 所以需要更新一下, 参考本文末尾, 如果你使用的也是CentOS 6.5, 请务必更新iproute后再来做这个实验. 使用ip netns自定义docker container的网络配置例子. 1. 启动2个container, 并且使用--net=none, 即不分配网络设备. # Sta

CentOS 6.5 x64 RHCS GFS配置

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://koumm.blog.51cto.com/703525/1598367 本文实验环境:    CentOS 6.5 x64 RHCS GFS 配置说明: 本文出自: http://koumm.blog.51cto.com 1. 通过Openfiler实现iscsi共享存储    2. 通过VMware ESXi5 虚拟fence实现fence功能.     3. 结合Centos

compile httpd 2.4.9, perl, php in CentOS 6.x x64

httpd 2.4.9 在CentOS 6.x x64上的安装过程. 一. apr安装 http://apr.apache.org/download.cgi # wget http://mirror.bit.edu.cn/apache//apr/apr-1.5.1.tar.bz2 # tar -jxvf apr-1.5.1.tar.bz2 # cd apr-1.5.1 # ./configure --prefix=/opt/apr1.5.1 # make && make test # ma

compile nginx 1.6.0 with all modules in CentOS 6.x x64 (when with openssl encount bug)

本文讲一下nginx 1.6.0的源码安装, 遇到一个bug, 开启openssl支持时, 因为make文件的问题, 导致make错误, 后面会有如何避免这个错误的方法, 需要修改nginx代码中openssl的conf文件. 编译环境 :  CentOS 6.x x64 依赖包大部分通过yum安装(除了google performance a tools,pcre和zlib, zlib通过nginx配置的makefile来安装). 安装依赖包. 安装google performance ana

如何在CentOS 6.x x64系统中创建超过16TB的ext4文件系统

如何在CentOS 6.x x64系统中创建超过16TB的ext4文件系统 作者 digoal 日期 2016-09-18 标签 ext4 , 16TB 背景 在使用Ext4文件系统时,发现无法创建超过16TB的文件系统. 例如我的服务器中有多块8T的盘,使用逻辑卷或者软RAID做成较大的块设备,然后使用mkfs.ext4格式化,当LVM或软RAID设备大于16TB时,出现这样的报错 # mkfs.ext4 -b 4096 /dev/md0 mke2fs 1.41.12 (17-May-2010

CentOS 6.7 x64上编译安装ffmpeg的教程

系统信息 [root@LookBack ~]# getconf LONG_BIT 64 [root@LookBack ~]# cat /etc/redhat-release CentOS release 6.7 (Final) yum源信息,这里就不再说epel和rpmforge源的安装了 [root@LookBack ~]# yum repolist 已加载插件:fastestmirror Loading mirror speeds from cached hostfile  * base:

CentOS 6.5 x64系统中安装MongoDB 2.6.0二进制发行版教程_MongoDB

MongoDB的国外镜像访问非常慢,以至于选择MongoDB官网的在线安装很不靠谱.那么,我们可以选择安装MongoDB 2.6的二进制发布包. 下面我们在CentOS 6.5 x64系统上安装最新的MongoDB 2.6.0二进制发行版. 1.下载MongoDB 2.6.0二进制发行版 复制代码 代码如下: $ curl -O http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.0.tgz 2.解压MongoDB的压缩包 复制