安装CentOS7后,首先修改/etc/selinux/config以关闭SELinux,然后执行以下步骤:
1、安装每日构建快照:
yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release-master.rpm
或3.5:
yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release35.rpm yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release35-snapshot.rpm
2、准备环境:
yum install git java-devel maven openssl postgresql-server m2crypto python-psycopg2 python-cheetah python-daemon libxml2-python jboss-as unzip patternfly1 pyflakes python-pep8 python-docker-py
如果源中没有JBoss则需手动安装:
wget jboss-as-7.1.1.Final.tar.gz tar -xvf jboss-as-7.1.1.Final.tar.gz ln -s jboss-as-7.1.1.Final /usr/share/jboss-as
安装oVirt包:
yum install ovirt-host-deploy
检查JAVA环境,运行【alternatives --display javac】,检查是否为【javac - status is auto.】,否则需运行以下命令:
alternatives --config java alternatives --config javac update-alternatives --config java
初始化数据库:
service postgresql initdb service postgresql start chkconfig postgresql on
修改数据库配置文件,允许密码登录:
vi /var/lib/pgsql/data/pg_hba.confLocate: 127.0.0.1/32 and ::1/128 and allow "password" authentication for IPv4 and IPv6 connections.
创建数据库用户和表:
su - postgres -c "psql -d template1 -c \"create user engine password ‘engine‘;\"" su - postgres -c "psql -d template1 -c \"create database engine owner engine template template0 encoding ‘UTF8‘ lc_collate ‘en_US.UTF-8‘ lc_ctype ‘en_US.UTF-8‘;\""
3、切换至普通用户模式
下载oVirt代码:
mkdir -p "$HOME/git" cd "$HOME/git" git clone git://gerrit.ovirt.org/ovirt-engine
编译:
cd ovirt-engine make install-dev PREFIX="$HOME/ovirt-engine"
安装:
$HOME/ovirt-engine/bin/engine-setup
运行:
$HOME/ovirt-engine/share/ovirt-engine/services/ovirt-engine/ovirt-engine.py start
4、修改代码后
重新安装:
make install-dev PREFIX="$HOME/ovirt-engine"
重新编译:
make clean install-dev PREFIX="$HOME/ovirt-engine"
重新编译指定模块:
make clean install-dev PREFIX=$HOME/ovirt-engine EXTRA_BUILD_FLAGS="-pl org.ovirt.engine.core:bll,org.ovirt.engine:engine-server-ear"
GWT调试模式:
make install-dev PREFIX="$HOME/ovirt-engine" make gwt-debug DEBUG_MODULE=<module>
While <module> is webadmin or userportal-gwtp.
时间: 2024-11-01 11:04:45