Monday, November 30, 2015

RHN Satellite - Server Configuration (RHEL 6)


Server side configuration:

1. Introduction
1.1. Red Hat Network
1.2. RHN Satellite
1.3. Terms to Understand
1.4. How it Works
1.5. Summary of Steps
1.6. Upgrades
1.6.1. Satellite Certificate
1.6.2. Satellite Upgrade Documentation Package (rhn-upgrade)
1.6.3. New Installation ISO
2. Requirements
2.1. Software Requirements
2.2. Hardware Requirements
2.2.1. x86 and x86_64 Hardware Requirements
2.2.2. s/390 Hardware Requirements
2.2.3. Additional Requirements
2.3. Database Requirements
2.4. Additional Requirements
3. Example Topologies
3.1. Single Satellite Topology
3.2. Multiple Satellite Horizontally Tiered Topology
3.3. Satellite-Proxy Vertically Tiered Topology
4. Installation
4.1. Base Install
4.2. RHN Satellite Installation Program
4.2.1. Options to the Satellite Installation Program
4.3. Automated RHN Satellite Server Installation
4.4. Installing Satellite behind an HTTP Proxy
4.5. Sendmail Configuration
4.6. MySQL Installation
5. Entitlements
5.1. Receiving the Certificate
5.2. Uploading the RHN Entitlement Certificate
5.3. Managing the RHN Certificate with RHN Satellite Activate
5.3.1. Command Line Entitlement Options
5.3.2. Activating the Satellite
5.4. Satellite Entitlement Certificate Expiration
6. Importing and Synchronizing
6.1. Exporting with RHN Satellite Exporter
6.1.1. rhn-satellite-exporter
6.1.2. Exporting
6.2. Importing with RHN Satellite Synchronization Tool
6.2.1. satellite-sync
6.2.2. Preparing for Import from Local Media
6.2.3. Running the Import
6.3. Synchronizing
6.3.1. Synchronizing Errata and Packages Directly via RHN
6.3.2. Synchronizing Errata and Packages via Local Media
6.4. Inter-Satellite Sync
6.4.1. Recommended Models for Inter-Satellite Sync
6.4.2. Configuring the Master RHN Satellite Server
6.4.3. Configuring the Slave RHN Satellite Servers
6.5. Using Inter-Satellite Sync
6.5.1. Syncing between a Development Staging Server and a Production Satellite
6.5.2. Bi-directional sync
6.6. Synchronizing by Organization
7. Troubleshooting
7.1. Gathering information with spacewalk-report
7.2. Log Files
7.3. General Problems
7.4. Host Not Found/Could Not Determine FQDN
7.5. Connection Errors
7.6. SELinux Issues
7.7. Updated Software Components
7.8. Satellite Debugging by Red Hat
8. Maintenance
8.1. Managing the Satellite with rhn-satellite
8.2. Updating the Satellite
8.3. Backing Up the Satellite
8.4. Using RHN DB Control
8.4.1. DB Control Options
8.4.2. Backing up the Database
8.4.3. Verifying the Backup
8.4.4. Restoring the Database
8.5. Cloning the Satellite with Embedded DB
8.6. Establishing Redundant Satellites with Stand-Alone DB
8.7. Changing the Satellite Hostname
8.8. Conducting Satellite-Specific Tasks
8.8.1. Using the Tools menu
8.8.2. Deleting Users
8.8.3. Configuring Satellite Search
8.9. Automating Synchronization
8.10. Implementing PAM Authentication
8.11. Enabling Push to Clients
A. Sample RHN Satellite Configuration File
B. Revision History


Chapter 4. Installation
4.1. Base Install
RHN Satellite is designed to run on the Red Hat Enterprise Linux operating system. Therefore, the first phase is to install the base operating system, either from disc, ISO image, or kickstart. During and after operating system installation, make sure you:
  • Allocate plenty of space to the partitions storing data. The default location for channel packages is /var/satellite/. For RHN Satellite with Embedded Database, remember the database RPMs go in the /opt/ partition, while the database itself is built in /rhnsat/.
  • Enable Network Time Protocol (NTP) on the Satellite and separate database, if it exists, and select the appropriate time zone. All client systems should already be running the ntpd daemon and be set to the correct time zone.
  • Due to potential complications, it is strongly advised that the /home/ partition is locally mounted.
Note: Two types of Red Hat Network Satellite are available:
Stand-Alone Database- One with a stand-alone database on a separate machine; and
Embedded Database- One with an embedded database installed on the same machine as the Satellite. We are using Embedded database.

4.2. RHN Satellite Installation Program

The following instructions describe how to run the RHN Satellite Installation Program:
  1. Log into the machine as root.
  2. Insert the RHN Satellite Server CD containing the installation files or download the ISO image from the RHN website.
  3. If you are installing from CD, manually mount it to the /media/cdrom/ directory with the following command:
# mount /dev/cdrom /media/cdrom

If you are installing from an ISO, mount the file from within the directory containing it.  the command:
# mount -o loop iso_filename /media/cdrom

The remaining instructions assume it is mounted in /media/cdrom/.
  1. From the /media/cdrom/ directory, enter the following command to start the RHN Satellite Installation Program:
# ./install.pl
 
If you don’t have internet connectivity at the time of installation, you can also install it in the “disconnected” mode. i.e.
# ./install.pl --disconnected
 
Note: This script has several options to assist with your installation process. To view these options, enter the following command:
# ./install.pl --help
  1. The script first runs through a pre-requisite check. These checks make certain that all prerequisites are met before proceeding with the installation.
* Starting the Red Hat Network Satellite installer.
* Performing pre-install checks. 
* Pre-install checks complete.  Beginning installation.
  1. At the prompt, enter the email address to which you would like notifications from the Satellite to be sent. It may be a good idea to choose a general email address rather than the address of an individual, as there can be a large volume of emails.
 “Admin email address” sat-admin@example.com
  1. The Satellite is then registered with your RHN Hosted account, and all required packages are installed and updated.
* RHN Registration 
* Installing updates. 
* Installing RHN packages.
 
Note: 
> If you are installing in disconnected mode, it will not ask the RHN account registration details.
> If you have already registered your system from the RHN account before running the 
installation script, it will not ask the registration details.
> If you haven’t registered your system before, it will ask you the login details of the 
RHN account and you will need to provide the username and the password for that.
  1. Next, the RHN Satellite Installation Program downloads and installs the RHN GPG key, including setting up the /root/.gnupg/ directory, if required.
* Setting up environment and users 
** GPG: Initializing GPG and importing RHN key. 
** GPG: Creating /root/.gnupg directory
 
Note: In disconnected mode you may face the problem in receiving the key. 
For that, mount the RHEL-6 ISO and created the repo of it i.e. dvd.repo
Now run the command:
# rpm –import /media/RPM-GPG-KEY-redhat-release
  1. The next step creates and populates the initial database, if you have opted for the RHN Satellite with Embedded Database. If you are installing RHN Satellite with Stand-Alone Database, the installer connects with the database. This step can take quite a while. If you would like to monitor the progress of the installation, use tail in a separate window to monitor the /var/log/rhn/install_db.log file.
* Setting up database. 
** Database: Installing the embedded database (not the schema). 
** Database: Shutting down the database first. 
** Database: Installing the database:
** Database: This is a long process that is logged in:
** Database:   /var/log/rhn/install_db.log
*** Progress: ####
  1. Once database installation is complete, or once the connection to the database is established, the Satellite is configured.
* Setting up environment and users.
  1. In order to activate the Satellite, you must provide it with the location of your Satellite certificate.
* Activating Satellite. 
Where is your satellite certificate file? /root/example.cert
  1. The next step is to create a CA cert for the Satellite. To do so, you must answer a few questions.
CA cert
Enter a password for the certificate.
Organization
Enter the name of your organization
Email Address
Enter an email address to be associated with this certificate, such as the admin email entered in the steps above.
City
Enter the city where the Satellite resides.
Country
  1. Once the CA Cert certificate is generated, the RHN Satellite Installation Program performs final configuration and restarts the associated services.
* Final configuration. 
* Restarting services.
 
14.  Installation complete. 
Visit https://your-satellite.example.com to create the satellite administrator account.
 
 
 
  1. Follow the on-screen instructions and visit the FQDN of your Satellite via a web browser. Create the satellite administrator account.
To create Administrator account, go to:
Admin tab -> RHN satellite configuration -> general -> update button.
 





















Note: If you are not using any proxy, you may leave the proxy related text boxes blank.
  1. The RHN Satellite Configuration - Monitoring page allows you to configure the monitoring aspects of this Satellite. The local mail exchanger and local main domain are used to mail monitoring notification messages to administration. This is required only if you intend to receive alert notifications from probes. Also configure the send mail for that.
















  1. The RHN Satellite Configuration - Certificate page allows you to upload a new Satellite certificate. To identify the certificate's path, click Browse, navigate to the file, and select it. To input its contents, open your certificate in a text editor, copy all lines, and paste them directly into the large text field at the bottom. Click Validate Certificate to continue.

 
  1. The RHN Satellite Configuration - Bootstrap page allows you to generate a bootstrap script for redirecting client systems from the central RHN Servers to the Satellite. This script, to be placed in the /var/www/html/pub/bootstrap/ directory of the Satellite, significantly reduces the effort involved in reconfiguring all systems, which by default obtain packages from the central RHN Servers.
When finished, click Generate Bootstrap Script. The Installation Complete page appears.
  1. The RHN Satellite Configuration - Restart page contains the final step in configuring the Satellite. Click the Restart button to restart the Satellite in order to incorporate all of the configuration options added on the previous screens. Note that it will take between four and five minutes for the restart to finish.

  1. Once the Satellite has restarted, the countdown notice disappears. The page will refresh and now you are now free to begin using your Satellite.

4.2.1. Options to the Satellite Installation Program

The various options available for the Satellite Installation Program are included below for easy reference.
  1. Once the installation is completed, you will need to add or modify your settings in the /etc/rhn/rhn.conf file:
server.satellite.http_proxy = <http-proxy-fqdn>
server.satellite.http_proxy_username = <proxy-username>
server.satellite.http_proxy_password = <proxy-password>
disconnected=0

If you are not using any proxy then leave the fields blank.
  1. Restart the Satellite service:
#/usr/sbin/rhn-satellite restart
Or
You can also restart it from GUI by going:
Admin -> RHN satellite configuration -> restart -> restart button.

4.5. Sendmail Configuration:

If your RHN Satellite will serve Monitoring-entitled systems and you wish to acknowledge via email the alert notifications you receive, you must configure sendmail to properly handle incoming mail. This is required by the email redirect feature, which allows you to stop notifying users about a Monitoring-related event with a single reply.

To configure sendmail correctly, run the following commands as root.
First, create a symbolic link allowing sendmail to run the notification enqueuer with the following command:
# ln -s /usr/bin/ack_enqueuer.pl /etc/smrsh/.

Next, edit the /etc/aliases file on the mail server and add the following line:
rogerthat01: | /etc/smrsh/ack_enqueuer.pl

Next, edit the /etc/mail/sendmail.mc file and change:
"DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl"
to:
"DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl"
Then, have the alias processed like so:
# newaliases

Finally, update the sendmail-cf package:
# yum update sendmail-cf

Note, disconnected installs must obtain this package from the ISO.
Restart sendmail:
# service sendmail restart

Chapter 6. Importing and Synchronizing:

6.2. Importing with RHN Satellite Synchronization Tool

Before distributing packages via RHN Satellite, the packages must first be uploaded to the Satellite. This section describes the process for importing packages and other channel data.

Important:

To populate custom channels correctly, you must first populate at least one Red Hat base channel. The RHN Satellite Synchronization Tool creates the necessary directory structures and permissions; without these, the custom channel tools will not work properly.

6.2.1. satellite-sync

The RHN Satellite Synchronization Tool (satellite-sync) enables an RHN Satellite to update its database metadata and RPM packages with those of RHN's central servers, another Satellite within your organization, or local media.

To launch the RHN Satellite Synchronization Tool, execute the following command as root:
# satellite-sync

For RHEL -6 channels:
# /usr/bin/satellite-sync -c rhel-x86_64-server-6 -c rhel-x86_64-server-supplementary-6 -c rhel-x86_64-server-ha-6 -c rhel-x86_64-server-optional-6 -c rhn-tools-rhel-x86_64-server-6 -c rhel-x86_64-server-optional-6  -c rhel-i386-server-6 -c rhel-i386-server-6-debuginfo -c rhel-i386-server-fastrack-6 -c rhel-i386-server-fastrack-6-debuginfo -c rhel-i386-server-ha-6 -c rhel-i386-server-ha-6-debuginfo -c rhel-i386-server-ha-fastrack-6 -c rhel-i386-server-ha-fastrack-6-debuginfo -c rhel-i386-server-optional-6 -c rhel-i386-server-optional-6-debuginfo -c rhel-i386-server-optional-fastrack-6 -c rhel-i386-server-optional-fastrack-6-debuginfo -c rhel-i386-server-supplementary-6 -c rhel-i386-server-supplementary-6-debuginfo -c rhn-tools-rhel-i386-server-6 -c rhn-tools-rhel-i386-server-6-debuginfo

For minimum required RHEL-6 channels:
Sync only base channel, supplementary and RHN-tools channel.
# /usr/bin/satellite-sync -c rhel-x86_64-server-6 -c rhel-x86_64-server-supplementary-6 -c rhn-tools-rhel-x86_64-server-6

For RHEL-5 channels:
# /usr/bin/satellite-sync -c rhel-x86_64-server-5 -c rhel-x86_64-server-vt-5 -c rhel-x86_64-server-cluster-5 -c rhel-x86_64-server-cluster-storage-5 -c rhn-tools-rhel-x86_64-server-5 -c rhel-x86_64-server-fastrack-5 -c rhel-i386-server-5 -c rhel-i386-server-cluster-5 -c rhel-i386-server-cluster-storage-5
-c rhel-i386-server-fastrack-5 -c rhel-i386-server-supplementary-5 -c rhel-i386-server-vt-5 -c rhn-tools-rhel-i386-server-5

Note: If no options are included, satellite-sync synchronizes all channels that already exist in the Satellite's database.
Keep in mind that the --channel option requires the channel label, not its name. For instance, use "rhel-i386-as-3" not "Red Hat Enterprise Linux 3 i386." Use the --list-channels option to obtain a list of all channels by label. All displayed channels are available for importing and synchronizing.

6.2.2. Preparing for Import from Local Media

To perform the RHN Satellite import, the following prerequisites must be met:
  • The RHN Satellite installation must have been performed successfully.
  • The Red Hat Network Channel Content ISOs or RHN Satellite Exporter data must be available, or the Satellite must have access to the Internet and the RHN website.
Note: There are 13 Channel Content ISOs available each of 4GB in size (means 13*4=52GB content).

Note: Although it is possible to conduct the import directly from the RHN website, this should be done only if Channel Content ISOs are not available. It takes a long time to populate a channel from scratch over the Internet. For this reason, Red Hat urges you to use ISOs, if they are available, for initial import.

6.2.2.1. Preparing Channel Content ISOs

Channel Content ISOs are special collections that contain both packages and XML dumps of metadata. The ISO images can be downloaded from the RHN website on a machine connected to the Internet and then transferred to the Satellite.

To download, follow the process:
1. Login to RHN > Downloads > Channels.
On the Full Software Channel page, Under Filter Product Channel choose Red Hat Network Products then click Filter.
When results are returned, expand RHEL 6 and you should see Satellite. 
Click on the RHN Satellite channel, making sure to select the Satellite channel that corresponds to your version of Satellite.
Look to the right and you should see x86_64 and any other architecture. Click on the x86_64.
Then, Click the Downloads tab and use the instructions on the page to obtain the Channel Content ISOs, available by version of Red Hat Enterprise Linux.
Scroll down to View Base Channel Content ISOs for Satellite and expand.
Locate the Base channel you want and expand, then download all the ISO images. 
For example, locate  RHEL 6 (x86_64) + EUS + AUS + RHN Proxy/Tools + Supplementary (Base 2011-12-11) and download all ISOs listed underneath it.

Once finished, the administrator should delete the temporary directory and all of its contents. Follow these steps:
  1. Log into the machine as root.
  2. Insert the first Channel Content ISO that has been burned to disc.
  3. Create a directory in /mnt/ to store the file(s) with the command:
# mkdir /mnt/import/
  1. Mount the ISO file from within the directory containing it using the command:
# mount iso_filename /mnt/import -o loop
  1. Create a target directory for the files, such as:
# mkdir /var/rhn-sat-import/
  1. This sample command assumes the administrator wants to copy the contents of the ISO (mounted in /mnt/import/) into /var/rhn-sat-import/:
# cp -ruv /mnt/import/* /var/rhn-sat-import/
  1. Then unmount /mnt/import in preparation for the next CD or ISO:
# umount /mnt/import
  1. Repeat these steps for each Channel Content ISO of every channel to be imported.

 

6.3.2. Synchronizing Errata and Packages via Local Media

For customers who cannot connect their Satellite directly to RHN, Red Hat recommends downloading Channel Content ISOs to a separate, Internet-connected system and then transferring them to the Satellite. For ease of import, we recommend that the data be copied from media directly into a common repository.
# cp -rv /mnt/cdrom/* /var/rhn-sat-sync/

Then, the following command:
# /usr/bin/satellite-sync -c rhel-x86_64-server-6 -c rhel-x86_64-server-supplementary-6 
-c rhn-tools-rhel-x86_64-server-6 --mount-point=/var/rhn-sat-sync

Perform this for every channel you require to import. This can be used to perform the sync process described above, using the dump files in /var/rhn-sat-sync to perform the necessary comparisons and imports.
  
You need to take care of some things while creating the admin user for the first time.
Set properly running email id in Email section and the send mail server should be configured correctly.
Also select the options for the required notifications.
Also set the correct time zone for the server as time synchronization is must for both the server and client systems in order to perform actions.
If you have forgotten to change the time zone while creating the admin user, go to:
Users -> User list -> Active -> admin.



Go to:
Preferences -> User


Go to Preferences -> Locals
And select the correct time zone.


Now restart the satellite server.

To perform some actions on the client system, go to:
System -> Overview.
Under System column, click on your client system.

 

It will show details and other informations about client system.
Here you will see the “Packages”. Click on it.

 
You will be presented with list of the packages presented in the channel.
Now, you can select a particular package or all the packages available you want to be installed on the client system.

 
In the end of the page, click on “Upgrade Packages”.
In the next page you will be asked about the action schedule time. You can select both options according to your needs and click on “confirm”.

 
Now, to check the scheduled action, go to:
Schedule tab -> Pending actions.
To get more information about it, click on the link available under the Action link.

You will find more information in the “In Progress Systems” link.


Now, the selected process will be applied on the system.
You can also schedule a client system reboot. For that

Create directory on the client system and make directory and a file.
go to:


Checkout 2nd part of the topic also:

RHN Satellite - Client configuration (RHEL 6):
http://rohitchauhanit.blogspot.in/2015/11/rhn-satellite-client-configuration-rhel.html

29 comments:

  1. I am continuously searching online for articles that can ssist me.
    Thank you!

    ReplyDelete
  2. Great beat ! I would like to apprentice while you amend your
    website, how could i subscribe for a blog website? The account aided me a acceptable
    deal. I had been a little bit acquainted of this your broadcast offered bright clear idea

    ReplyDelete
  3. Hi there! This post couldn't bee wrritten any better!
    Looking aat this post reminds me off my previous roommate!

    He constantly kept talking about this. I most certainly will
    sehd this information to him. Pretty sure he'll have a very good read.

    Thanks for sharing!

    ReplyDelete
  4. This is very interesting, You're a very skilled blogger. I have joined your fesd
    and look forwardd to seeking more of your excellent post.

    Also, I have shared your website in my social
    networks!

    ReplyDelete
  5. I’m not that much of a online rreader to be honest but your blogs really
    nice, keep it up! I'll go ahead and bookmark your website
    to come back later. Many thanks

    ReplyDelete
  6. You've got 2.5 chapters here. The 'part 2' is all about clients.

    Where's the rest of the server doc?

    ReplyDelete
  7. Hi there Dear, are you really visiting this website daily, if so then you will
    without doubt take pleasant know-how.

    ReplyDelete
  8. I am in fact glad to glance at this weblog posts which carries plenty of helpful facts, thanks for providing these statistics.

    ReplyDelete
  9. I just like the helpful info you supply in your articles.
    I'll bookmark our blog and check again here frequently.

    I'm relatively surte I'll be informed many new stuff proper here!

    Good luck for the next!

    ReplyDelete
  10. We're a group of volunteers and starting a new scheme in our community.

    Your web site provided us with valuable information to work on. You've done an impressive job and our whole community will be grateful to you.

    ReplyDelete
  11. You actually make it appear really easy along with your
    presentation however I too find this topic to be actually one
    thing which I believe I would by no means understand. It sort of feels too complicated annd very large for me.
    I'm looking ahead for yyour subsequent submit, I'll attempt to gett the
    dangle of it!

    ReplyDelete
  12. Hey there would you mind letting me know which webhost you're using?
    I've loaded your blog in 3 completely different web browsers and I must say this blog loads a lot quicker then most.
    Can you recommend a good web hosting provider at a fair price?
    Thanks, I appreciate it!

    ReplyDelete
  13. Thank you for some other excellent article. Where else may just anybody get that kind of information in such an ideal
    manner of writing? I have a presentation subsequent
    week, and I'm at the search for such information.

    ReplyDelete
  14. Hi there, You've done a fantastic job. I'll definitely digg it and personally recommend to my
    friends. I am sure they'll be benefited from this web site.

    ReplyDelete
  15. Hello There. I discovered your weblog using msn. That is a really neatly
    written article. I will make sure to bookmark it and return to
    learn more of your useful info. Thanks for the post.
    I will definitely comeback.

    ReplyDelete
  16. Incredible points. Sound arguments. Keep up the good work.

    ReplyDelete
  17. Excellent blog you have here but I was wondering if you knew of any community forums that
    cover the same topics discussed in this article? I'd really like to be a part of
    community where I can get suggestions from other knowledgeable individuals that share
    the same interest. If you have any suggestions, please let me know.
    Thank you!

    ReplyDelete
  18. These are truly fantastic ideas in concerning blogging. You have
    touched some nice things here. Any way keep up wrinting.

    ReplyDelete
  19. Its like you learn my mind! You appear to grasp so much about this, like you wrote
    the guide in it or something. I feel that
    you could do with some percent to power the message home a
    little bit, however instead of that, that is wonderful
    blog. A great read. I will certainly be back.

    ReplyDelete
  20. Link exchange is nothing else however it is simply placing the other person's web site link on your page at suitable place and other person will also
    do similar in support of you.

    ReplyDelete
  21. For most up-to-date news you have to pay a visit world wide
    web and on internet I found this site as a most excellent web site for most up-to-date updates.

    ReplyDelete
  22. Hello! I could have sworn I've been to this web skte before but after going through
    a few of the articles I realized it's new to me. Anyways,
    I'm certainly happy I stumbled upon it and I'll be book-marking it and checking back often!

    ReplyDelete
  23. Greetings! Very useful advice in this particular article!
    It's the little changes that will make the biggest changes.
    Thanks for sharing!

    ReplyDelete
  24. Hi my loved one! I wish to say that this article is amazing, great written and come with approximately all significant infos.
    I would like to peer more posts like this .

    ReplyDelete
  25. I all the time used to study paragraph in news papers but now as I am a user of internet
    thus from now I am using net for articles, thanks to web.

    ReplyDelete
  26. hi!,I like your writing so a lot! percentage we keep up a correspondence more about
    your post on AOL? I require a specialist in this area to unravel my problem.
    Maybe that's you! Looking ahead to see you.

    ReplyDelete
  27. I am extremely impressed with your writing talents and also with the layout to your weblog.

    Is this a paid subject or did you customize it yourself?
    Either way stay up the nice high quality writing, it's uncommon to
    peer a nice blog like this one today..

    ReplyDelete
  28. I think the admin of this website is in fact working hard in support of his web page, because here every data is quality based
    stuff.

    ReplyDelete
  29. I'm gone to convey my little brother, that he should also pay a visit this web site
    on regular basis to get updated from hottest information.

    ReplyDelete