RHN卫星服务器安装

RHN卫星服务器安装RHN 卫星服务器安装 2011 08 0623 27 12 分类 RHCA 401http doorgods blog 163 com blog static 7 RHN 卫星服务器安装 RHN 卫星服务器是大型数据中心管理难得的好工具 但是确实存在这样那样的难题 一来是因为它太贵 涉及到的人比较少 satelliteser 安装

RHN卫星服务器安装  

2011-08-06 23:27:12|  分类: RHCA_401

http://doorgods.blog.163.com/blog/static/78547857201176112712217/

RHN卫星服务器安装

RHN卫星服务器是大型数据中心管理难得的好工具,但是确实存在这样那样的难题,一来是因为它太贵,涉及到的人比较少;而来时它本身集成了数据库,并且现在也还在完善之中,涉及到的内容又多。因而很少有人能完全将RHN应用的炉火纯青。

RHN涉及到以下内容:

数据传输的加密

oracle数据库

Perl语言(RHN API)

RPM包制作

RPM包签名

安装过程如下:

首先需要获取如下软件包:


redhat-gls-maximum-5.3.cert //红帽培训提供的一个证书,仅供学习使用
redhat-rhn-satellite-5.3-server-i386-5-embedded-oracle.iso  //rhn软件包,其中包括一个嵌入式的oracle数据库
redhat-gls-minimal-5.3.cert

//红帽培训提供的一个证书,仅供学习使用


sat-rhel5-dump //RHN 各个频道软件包
首先挂载RHN软件包
mount  -o loop redhat-rhn-satellite-5.3-server-i386-5-embedded-oracle.iso satellite/
cd satellite/
30  ls
31  cd install
32  ls
33  cp answers.txt ~/
34  cd
35  vim answers.txt
answer.txt文件负责集中管理安装rhn的选项,类似证书位置和证书使用者信息等等。
# Administrator’s email address.  Required.
# Multiple email addresses can be used, seperated with commas.
#
# Example:
# admin-email = user@example.com, otheruser@example.com
admin-email =
## RHN connection information.
#
# Passed to rhn-register to register the system if it is not already
# registered.
#
# Only required if the system is not already registered, or if the
# ‘–re-register’ commandline option is used.  Not used at all if the
# ‘–disconnected’ commandline option is used.
rhn-username =
rhn-password =
# HTTP proxy.  Not Required.
#
# Example:
# rhn-http-proxy = proxy.example.com:8080
rhn-http-proxy =
rhn-http-proxy-username =
rhn-http-proxy-password =
# RHN Profile name.  Not required.  Defaults to the system’s hostname
# or whatever ‘hostname’ is set to.
# rhn-profile-name =
## SSL certificate information.
# The name of your organization.  Required.
#
# Example:
# ssl-set-org = Riboflavin, Inc.
ssl-set-org = Red Hat, Inc.
# The unit within the organization that the satellite is assigned to.
# Not required.
#
# Example:
# ssl-set-org-unit = Information Systems Department
ssl-set-org-unit = GLS
# Location information for the SSL certificates.  Required.
#
# Example:
# ssl-set-city = New York
# ssl-set-state = NY
# ssl-set-country = US
ssl-set-city = GZ
ssl-set-state = GD
ssl-set-country = CN
# Password for CA certificate.  Required.  Do not lose or forget this
# password!
#
# Example:
# ssl-password = c5esWL7s
ssl-password = redhat
## Database connection information.
#
# Required if the database is an external (not embedded) database.
# db-user =
# db-password =
# db-host =
# db-sid =
# db-port = 1521
# db-protocol = TCP
## The location (absolute path) of the satellite certificate file.
#  Required.
#
# Example:
# satellite-cert-file = /tmp/satcert.cert
satellite-cert-file = /root/redhat-gls-maximum-5.3.cert
## Apache conf.d/ssl.conf virtual host definition reconfiguration
#
# A value of “Y” or “y” here will cause the installer to make a numbered
# backup of the system’s existing httpd/conf.d/ssl.conf file and replace
# the original with one that’s set up properly to work with Spacewalk.
# The recommended answer is Y
#
ssl-config-sslvhost = Y
enable-tftp = yes
# *** Options below this line usually don’t need to be set. ***
# The Satellite server’s hostname.  This must be the working FQDN of
# the satellite server.
#
# hostname =
# The mount point for the RHN package repository.  Defaults to
# /var/rhn/satellite
#
# mount-point =
# Mail configuration.
#
# mail-mx =
# mdom =
# ‘Common name’ for the SSL certificates.  Defaults to the system’s
# hostname, or whatever ‘hostname’ is set to.
#
# ssl-set-common-name =
# The email address for the SSL certificates.  Defaults to ‘admin-email’.
#
# ssl-set-email =
# The expiration (in years) for the satellite certificates.  Defaults
# to the number of years until 2037.
#
# ssl-ca-cert-expiration =
# ssl-server-cert-expiration =
# Set to ‘yes’ to automatically install needed packages from RHN, provided the
# system is registered. Set to ‘no’ to terminate the installer if any needed
# packages are missing. Default is to prompt.
#
run-updater = yes
# *** For troubleshooting/testing only. ***
#
# rhn-parent =
# ssl-dir =
# ssl-server-rpm =
上述的一个admin-email选项我没有填写,他就会在安装生成CA中心证书的时候提示我输入我的email地址。如果不填一些必要的信息他会提醒我们输入。
38  cd satellite/
39  ls
40  ./install.pl –disconnected –answer-file=/root/answers.txt
以上命令是为了执行安装过程,–disconnected选项是为了阻止与红帽官方的RHN服务器连接获取安装软件,这是很必要的,在现行网络环境下这样安装时不现实的。–answer-file=/root/answers.txt 是制定上面说的安装配置文件。
按照以上的步骤还是不行的,因为你的yum源并没有制定红帽RHN所需要的软件包
需要在/etc/yum.repo.d/下面创建一个repo文件
内容如下:
[DB]
name=oracle
baseurl=file:///root/rhn/satellite/EmbeddedDB
gpgcheck=0
[rhn]
name=rhn server
baseurl=file:///root/rhn/satellite/Satellite
gpgcheck=0
以上的步骤还不够,你需要将红帽颁发的全部rpm证书导入服务器,执行以下操作
rpm –import /etc/pki/rpm-gpg/*
这个命令的作用参看 http://www.qitianwu.com/2011/02/rpm%E5%8C%85%E7%AD%BE%E5%90%8D%E8%BF%87%E7%A8%8B/
接下来在RHN软件包内执行
./install.pl –disconnected –answer-file=/root/answers.txt
基本上就可以实现安装了。
查看全部日志更新状况:
tail -f /var/log/rhn/*
此处不要使用tailf自作聪明,tailf同tail -f还是有区别的。
安装后会提供给你一个地址进去初始化你的卫星服务器。
安装成功之后,即可进行频道的导入操作了
satelite-sync -m sat-rhel-dump -l
查看有哪些频道可用
satellite-sync -m sat-rhel5-dump -c one-rpm-channel
导入测试,导入那个只有一个rpm的频道测试
之后再按照可用频道列表逐一导入即可。
16:34:13    base-channels:
16:34:13       . one-rpm-channel                             1
16:34:13       p rhel-i386-server-5                       3239
16:34:13    rhel-i386-server-5:
16:34:13       p rhn-tools-rhel-i386-server-5              419
16:34:13       . rhel-i386-server-vt-5                      67
以上是导入了 rhel-i386-server-5 、rhn-tools-rhel-i386-server-5两个频道之后的效果,因而可以通过这个命令确认哪个导入了,哪个没导入,频道前面为p的就是已经导入的。以.开头的就是暂未导入的。
 
编程小号
上一篇 2025-09-23 07:11
下一篇 2025-04-02 20:40

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/bian-cheng-ji-chu/91001.html