https://mirror.openshift.com/pub/origin-server/release/2/documentation/oo_deployment_guide_comprehensive.html有详细介绍,具体可以参考,下面的主要是一些注意事项。本文档基于V2版,目前最新版本是V3(2013-12-13发布),个别问题新版本文档已修正
一. 安装tomcat6, tomcat7,由于包有冲突,先安装这两个软件(如果不需要tomcat,可以跳过)
1. java for linux 包库
yum -y install jpackage-utils
cat <<EOF> /etc/yum.repos.d/jpackage.repo[jpackage-generic] name=JPackage (free), generic mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=6.0 priority=3 gpgcheck=0 enabled=1EOF
2. 包优先权管理,安装次软件后,上面的priority=3才起作用,1为最优先:
yum -y install yum-priorities
把系统fedora和fedora-update的优先权设置为2
3. 安装tomcat6和tomcat7
yum -y install tomcat6 tomcat7
注意:xml-commons包提示有冲突,可以把jpackage的优先权priority设置低于系统,先安装xml-commons,然后在把优先权调整高,否则安装tomcat还会提示包冲突,装好tomcat后,把包enabled=0禁用
二. 更新系统和增加openshift相关包
cat <<EOF> /etc/yum.repos.d/openshift-origin-deps.repo [openshift-origin-deps] name=openshift-origin-deps baseurl=https://mirror.openshift.com/pub/openshift-origin/release/2/fedora-19/dependencies/x86_64/ gpgcheck=0 enabled=1 EOF cat <<EOF> /etc/yum.repos.d/openshift-origin.repo [openshift-origin] name=openshift-origin baseurl=https://mirror.openshift.com/pub/openshift-origin/release/2/fedora-19/packages/x86_64/ gpgcheck=0 enabled=1 EOF yum install -y ntpdate ntp ntpdate clock.redhat.com systemctl enable ntpd.service systemctl start ntpd.service
三. 其它参考手册https://mirror.openshift.com/pub/origin-server/release/2/documentation/oo_deployment_guide_comprehensive.html
四. 注意事项
openshift-console 安装后需要编译bundle exec rake assets:precompileaugeas安装后,如果augtool执行失败,需要修改
vi /usr/share/augeas/lenses/virtlockd.aug
中第三行为 module Virtlockd =
node 和 broker分开部署时,需要把 node 上 /etc/openshift/env/ 环境变量
OPENSHIFT_BROKER_HOST=
OPENSHIFT_CLOUD_DOMAIN=
设置为对应地址
oo-accept-broker FAIL: SESSION_SECRET must be set in /etc/openshift/console.conf (Hint: use 'openssl rand -hex 64' to generate a unique secret.
需要设置属性,不知道是检查工具问题,还是这个项必须设置
firewall-cmd --add-service=8443/tcpe
有问题,应该是 firewall-cmd --add-port=8443/tcp
另外默认node上新建app后是8000端口,用默认的url 80 是不能访问
需要把node上的httpd服务启动
五. 参考资料
https://mirror.openshift.com/pub/origin-server/release/2/documentation/oo_deployment_guide_comprehensive.html
https://mirror.openshift.com/pub/origin-server/release/2/documentation/oo_cartridge_developers_guide.html
http://www.jpackage.org/