ovirt是rhev的开源版,rhev全称为Red Hat Enterprise virtualization,红帽公司对企业推出的商业私有云平台的一个软件。 ovirt官方网站:https://www.ovirt.org/ 1.主机操作系统: RHEL7.4 1.1关闭SELinux echo "####Set the selinux disable####" sed -i '/^SELINUX=/c SELINUX=disabled' /etc/selinux/config setenforce 0 echo "####Set the selinux disable Done####" 1.2关闭系统防火墙 echo "####Shutdown the firwall####" systemctl stop firewalld.service systemctl disable firewalld.service echo "####Shutdown the firwall Done####" echo -e "\n" 1.3设置字符集 echo "####Set the English support#####" cat << EOF > /etc/locale.conf LANG="en_US.UTF-8" SUPPORTED="zh_CN.UTF-8:zh_CN:zh:zh_CN.gb18030:en_US.UTF-8:en_US:en" SYSFONT="lat0-sun16" EOF echo "####Set the English support Done####" 注意: 一定要注意Ovirt的安装中会创建PostgreSQL,官方脚本里并不支持中文字符集,所以务必将系统的默认字符设置为英文 ,否则后续在配置oVirt-Engine时会失败。 2.安装oVirt-Engine 2.1配置操作系统的yum源 由于安装过程中会安装和更新大量的操作系统包,所以必须包含Base, Optional and Extras的yum源 建议直接配置阿里云 Centos7的yum源 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 例如: [base] name=CentOS-$releasever - Base baseurl=https://mirrors.aliyun.com/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 改成 [base] name=CentOS-$releasever - Base baseurl=https://mirrors.aliyun.com/centos/7.5.1804/os/$basearch/ gpgcheck=1 gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 2.1配置oVirt的yum源 目前最新版本oVirt 4.2.7 Release yum install https://resources.ovirt.org/pub/yum-repo/ovirt-release42.rpm 2.2安装ovirt-engine yum install -y ovirt-engine 2.3配置ovirt-engine engine-setup [root@localhost ~]# engine-setup [ INFO ] Stage: Initializing [ INFO ] Stage: Environment setup Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf'] Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20181116124910-s3pbof.log Version: otopi-1.7.8 (otopi-1.7.8-1.el7) [ INFO ] Stage: Environment packages setup [ INFO ] Stage: Programs detection [ INFO ] Stage: Environment setup [ INFO ] Stage: Environment customization --== PRODUCT OPTIONS ==-- Configure Engine on this host (Yes, No) [Yes]: Configure ovirt-provider-ovn (Yes, No) [Yes]: Configure Image I/O Proxy on this host (Yes, No) [Yes]: Configure WebSocket Proxy on this host (Yes, No) [Yes]: * Please note * : Data Warehouse is required for the engine. If you choose to not configure it on this host, you have to configure it on a remote host, and then configure the engine on this host so that it can access the database of the remote Data Warehouse host. Configure Data Warehouse on this host (Yes, No) [Yes]: Configure VM Console Proxy on this host (Yes, No) [Yes]: --== PACKAGES ==-- [ INFO ] Checking for product updates... [ INFO ] No product updates found --== NETWORK CONFIGURATION ==-- Host fully qualified DNS name of this server [localhost.localdomain]: Setup can automatically configure the firewall on this system. Note: automatic configuration of the firewall may overwrite current settings. NOTICE: iptables is deprecated and will be removed in future releases Do you want Setup to configure the firewall? (Yes, No) [Yes]: no --== DATABASE CONFIGURATION ==-- Where is the DWH database located? (Local, Remote) [Local]: Setup can configure the local postgresql server automatically for the DWH to run. This may conflict with existing applications. Would you like Setup to automatically configure postgresql and create DWH database, or prefer to perform that manually? (Automatic, Manual) [Automatic]: Where is the Engine database located? (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]: --== OVIRT ENGINE CONFIGURATION ==-- Engine admin password: Confirm engine admin password: [WARNING] Password is weak: it is too short Use weak password? (Yes, No) [No]: yes Application mode (Virt, Gluster, Both) [Both]: Use default credentials (admin@internal) for ovirt-provider-ovn (Yes, No) [Yes]: --== STORAGE CONFIGURATION ==-- Default SAN wipe after delete (Yes, No) [No]: --== PKI CONFIGURATION ==-- Organization name for certificate [localdomain]: --== APACHE CONFIGURATION ==-- 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]: 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]: --== SYSTEM CONFIGURATION ==-- --== MISC CONFIGURATION ==-- Please choose Data Warehouse sampling scale: (1) Basic (2) Full (1, 2)[1]: --== END OF CONFIGURATION ==-- [ INFO ] Stage: Setup validation [WARNING] Cannot validate host name settings, reason: resolved host does not match any of the local addresses [WARNING] Warning: Not enough memory is available on the host. Minimum requirement is 4096MB, and 16384MB is recommended. Do you want Setup to continue, with amount of memory less than recommended? (Yes, No) [No]: yes --== CONFIGURATION PREVIEW ==-- Application mode : both Default SAN wipe after delete : False Update Firewall : False Host FQDN : localhost.localdomain Configure local Engine database : True Set application as default page : True Configure Apache SSL : True Engine database secured connection : False Engine database user name : engine Engine database name : engine Engine database host : localhost Engine database port : 5432 Engine database host name validation : False Engine installation : True PKI organization : localdomain Set up ovirt-provider-ovn : True Configure WebSocket Proxy : True DWH installation : True DWH database host : localhost DWH database port : 5432 Configure local DWH database : True Configure Image I/O Proxy : True Configure VMConsole Proxy : True Please confirm installation settings (OK, Cancel) [OK]: [ INFO ] Stage: Transaction setup [ INFO ] Stopping engine service [ INFO ] Stopping ovirt-fence-kdump-listener service [ INFO ] Stopping dwh service [ INFO ] Stopping Image I/O Proxy service [ INFO ] Stopping vmconsole-proxy service [ INFO ] Stopping websocket-proxy service [ INFO ] Stage: Misc configuration [ INFO ] Stage: Package installation [ INFO ] Stage: Misc configuration [ INFO ] Upgrading CA [ INFO ] Initializing PostgreSQL [ INFO ] Creating PostgreSQL 'engine' database [ INFO ] Configuring PostgreSQL [ INFO ] Creating PostgreSQL 'ovirt_engine_history' database [ INFO ] Configuring PostgreSQL [ INFO ] Creating CA [ INFO ] Creating/refreshing DWH database schema [ INFO ] Configuring Image I/O Proxy [ INFO ] Setting up ovirt-vmconsole proxy helper PKI artifacts [ INFO ] Setting up ovirt-vmconsole SSH PKI artifacts [ INFO ] Configuring WebSocket Proxy [ INFO ] Creating/refreshing Engine database schema [ INFO ] Creating/refreshing Engine 'internal' domain database schema [ INFO ] Creating default mac pool range [ INFO ] Adding default OVN provider to database [ INFO ] Adding OVN provider secret to database [ INFO ] Setting a password for internal user admin [ 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 [ INFO ] Starting engine service [ INFO ] Starting dwh service [ INFO ] Restarting ovirt-vmconsole proxy service --== SUMMARY ==-- [ INFO ] Restarting httpd In order to configure firewalld, copy the files from /etc/ovirt-engine/firewalld to /etc/firewalld/services and execute the following commands: firewall-cmd --permanent --add-service ovirt-postgres firewall-cmd --permanent --add-service ovirt-https firewall-cmd --permanent --add-service ovn-central-firewall-service firewall-cmd --permanent --add-service ovirt-fence-kdump-listener firewall-cmd --permanent --add-service ovirt-imageio-proxy firewall-cmd --permanent --add-service ovirt-websocket-proxy firewall-cmd --permanent --add-service ovirt-http firewall-cmd --permanent --add-service ovirt-vmconsole-proxy firewall-cmd --permanent --add-service ovirt-provider-ovn firewall-cmd --reload The following network ports should be opened: tcp:2222 tcp:35357 tcp:443 tcp:5432 tcp:54323 tcp:6100 tcp:6641 tcp:6642 tcp:80 tcp:9696 udp:7410 An example of the required configuration for iptables can be found at: /etc/ovirt-engine/iptables.example Please use the user 'admin@internal' and password specified in order to login Web access is enabled at: http://localhost.localdomain:80/ovirt-engine https://localhost.localdomain:443/ovirt-engine Internal CA 84:2E:00:2A:6E:BF:F5:12:F9:A7:BC:BA:C4:20:0A:D2:98:82:F6:46 SSH fingerprint: SHA256:c/VqpatZsO0qdjesLgopOiyHPLMOOywyGY4XYSgkb1U [WARNING] Warning: Not enough memory is available on the host. Minimum requirement is 4096MB, and 16384MB is recommended. --== END OF SUMMARY ==-- [ INFO ] Stage: Clean up Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20181116124910-s3pbof.log [ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20181116125231-setup.conf' [ INFO ] Stage: Pre-termination [ INFO ] Stage: Termination [ INFO ] Execution of setup completed successfully 注意:如果是因为PostgreSQL的问题重新配置oVirt,需要在重新安装之前删除上一次创建的PostgreSQL日志目录/var/opt/rh/rh-postgresql95/lib/pgsql/data/pg_log,不然脚本会提示目录不为空,再次安装失败 3.访问管理控制台 https://IP地址/ovirt-engine 首次登陆会出现如下报错 可以修改配置 echo "SSO_CALLBACK_PREFIX_CHECK=false " > /etc/ovirt-engine/engine.conf.d/99-sso.conf service ovirt-engine restart (责任编辑:IT) |