4.2. RHN Proxy 服务器安装过程
以下的内容介绍了 RHN Proxy 服务器的安装过程:
- 作为 root 用户登录到要安装 RHN Proxy 服务器的系统。
- 使用包含 RHN Proxy 服务器授权的机构帐户和命令
rhn_register在红帽网络中注册新安装的红帽企业版 Linux 系统(可以通过中央 RHN 服务器或者您的 RHN Satellite 服务器)。 - 在 RHN 工具频道订阅该客户端。
- 安装代理服务器安装程序:
yum install spacewalk-proxy-installer - 执行安装:
configure-proxy.sh注意
要成功完成这个步骤,需要作为 root 用户访问该 Satellite 服务器。另外需要在该命令在添加--force-own-ca选项。命令行安装程序引导用户完成关于 RHN Proxy 服务器安装和初始配置详情提示,比如安装选项和生成 SSL 证书。以下说明描述了安装的过程:注意
如果您在提示符后按 Enter 而不是输入一个条目,RHN Proxy 服务器命令行安装程序会使用括号中的默认响应。另外,如果您要使用没有任何用户互动的默认回答,请使用--non-interactive选项,它将为您提供所有默认回应。 - 第一组提示是关于安装的定位详情。
Proxy version to activate [5.4]:「Proxy 版本」提示您确定您要安装的 RHN Proxy 服务器版本。RHN Parent [satserver.example.com]:「RHN Parent」是服务 Proxy 的系统的域名或者地址,可能是 RHN 主机托管服务器(xmlrpc.rhn.redhat.com)或者 Satellite 服务器。Traceback email []:「Traceback 电子邮件」是要将与错误相关的 traceback 信息发送到的电子邮件地址,通常是 Proxy 管理员的电子邮件。在这个提示中使用逗号分开一个以上的电子邮件地址。 - 下一组提示是关于配置生成 SSL 证书的详情,建议您保证进入和来自 RHN Proxy 服务器的安全流量。
Use SSL [Y/n]: y在「使用 SSL」提示后,输入y将 RHN Proxy 服务器配置为支持 SSL。CA Chain [/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT]:在「CA 链」提示符后按 Enter 使用证书授权(CA)链的默认路径,如果 RHN 是与 RHN Satellite 沟通,则该值通常为/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT。如果与 RHN 主机托管沟通,则它通常为/usr/share/rhn/RHNS-CA-CERT文件。自定义 SSL 证书必须位于/usr/share/rhn/目录中。HTTP Proxy []:如果 RHN Proxy 服务器是通过 HTTP 代理服务器连接,请输入代理服务器的主机名和端口号,比如corporate.proxy.example.com:3128。请输入生成适当 SSL 服务器证书所需详情,其中包括「机构名称」、「机构单位」(比如Engineering)、「通用名」(域名)以及城市、省和国家详情。最后,请输入负责 SSL 证书的管理员或者技术联络主管的电子邮件地址。Regardless of whether you enabled SSL for the connection to the Proxy Parent Server, you will be prompted to generate an SSL certificate. This SSL certificate will allow client systems to connect to this Spacewalk Proxy securely. Refer to the Spacewalk Proxy Installation Guide for more information. Organization: Example Company Organization Unit [proxy1.example.com]: Common Name: proxy1.example.com City: New York State: New York Country code: US Email [admin@example.com]: - 运行 RHN Proxy 服务器安装程序的结果是使用命令行安装程序:
- 提示监控安装支持 RHN Proxy 服务器。
- 允许该机构为将来的 RHN Proxy 服务器安装创建并推广一个配置频道。
- 完成 SSL 配置。
- 重启所有已修改配置的服务守护进程。
You do not have monitoring installed. Do you want to install it? Will run 'yum install spacewalk-proxy-monitoring'. [Y/n]:n确定是否要在 Proxy 服务器中安装 Monitoring。Generating CA key and public certificate: CA password: CA password confirmation: Copying CA public certificate to /var/www/html/pub for distribution to clients: Generating SSL key and public certificate: CA password: Backup made: 'rhn-ca-openssl.cnf' --> 'rhn-ca-openssl.cnf.1' Rotated: rhn-ca-openssl.cnf --> rhn-ca-openssl.cnf.1 Installing SSL certificate for Apache and Jabberd: Preparing packages for installation... rhn-org-httpd-ssl-key-pair-proxy1.example-1.0-1然后configure-proxy.sh程序会配置 SSL,提示您生成证书授权密码并在生成 SSL 密钥和公共证书前确认它。Create and populate configuration channel rhn_proxy_config_1000010000? [Y]: Using server name satserver.example.com Red Hat Network username: admin Password: Creating config channel rhn_proxy_config_1000010000 Config channel rhn_proxy_config_1000010000 created using server name satserver.example.com Pushing to channel rhn_proxy_config_1000010000: Local file /etc/httpd/conf.d/ssl.conf -> remote file /etc/httpd/conf.d/ssl.conf Local file /etc/rhn/rhn.conf -> remote file /etc/rhn/rhn.conf Local file /etc/rhn/cluster.ini -> remote file /etc/rhn/cluster.ini Local file /etc/squid/squid.conf -> remote file /etc/squid/squid.conf Local file /etc/httpd/conf.d/cobbler-proxy.conf -> remote file /etc/httpd/conf.d/cobbler-proxy.conf Local file /etc/httpd/conf.d/rhn_proxy.conf -> remote file /etc/httpd/conf.d/rhn_proxy.conf Local file /etc/httpd/conf.d/rhn_broker.conf -> remote file /etc/httpd/conf.d/rhn_broker.conf Local file /etc/httpd/conf.d/rhn_redirect.conf -> remote file /etc/httpd/conf.d/rhn_redirect.conf Local file /etc/jabberd/c2s.xml -> remote file /etc/jabberd/c2s.xml Local file /etc/jabberd/sm.xml -> remote file /etc/jabberd/sm.xml然后安装程序会询问您是否要生成基于在运行configure-proxy.sh是所创建配置文件的配置频道。安装程序接着会根据安装了 RHN Proxy 服务器的客户端系统名称创建一个 RHN Satellite 服务器配置频道(在上面的示例中 sysID 为 1000010000),并收集责成 Proxy 服务器配置频道的各种httpd、SSL、squid和jabberd服务器文件。 - 最后,安装程序启动并重启所有 RHN Proxy 服务器相关的服务并在完成后退出。
Enabling Satellite Proxy Shutting down rhn-proxy... Shutting down Jabber router: [ OK ] Stopping httpd: [ OK ] Stopping squid: [ OK ] Done. Starting rhn-proxy... init_cache_dir /var/spool/squid... Starting squid: . [ OK ] Starting httpd: [ OK ] Starting Jabber services [ OK ] Done.
4.2.1. 回答文件 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
如果您想要自动进行一些在您的系统中安装 RHN Proxy 服务器的过程,
configure-proxy.sh 程序可让管理员生成回答文件,里面包含预先填写的对安装程序中提示的回应。
以下是含有预先填写的关于版本号的回答文件示例,RHN Satellite 服务器是父服务器、SSL 和另一个配置参数。有关生成和使用回答文件的详情请参考
configure-proxy.sh 手册页面,即在 shell 提示符后输入 man configure-proxy.sh。
# example of answer file for configure-proxy.sh
# for full list of possible option see
# man configure-proxy.sh
VERSION=5.4
RHN_PARENT=rhn-satellite.example.com
TRACEBACK_EMAIL=jsmith@example.com
USE_SSL=1
SSL_ORG="Red Hat"
SSL_ORGUNIT="Spacewalk"
SSL_CITY=Raleigh
SSL_STATE=NC
SSL_COUNTRY=US
INSTALL_MONITORING=N
ENABLE_SCOUT=N
CA_CHAIN=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
POPULATE_CONFIG_CHANNEL=Y
要和
configure-proxy.sh 一同使用回答文件(例如 answers.txt),请输入以下命令:
configure-proxy.sh --answer-file=answers.txt