Spacewalk installing the update removal package

Source: Internet
Author: User

This article link: http://blog.csdn.net/kongxx/article/details/44003721

We can already use the spacewalk to install the system after the previous two blogs, but in real-world scenarios we often need to manage packages through spacewalk, such as installing, upgrading, and deleting packages, let's look at how these functions are implemented through spacewalk.


Install packages
Visit Install, Packages, software, systems-----Selected machines
* Enter Telnet in the Filter (we assume that we need to install the Telnet tool on the client) and select the Telnet package (e.g. telnet-0.17-48.el6)
* Click "Install Selected Packages" button
* Click the Confirm button directly on the "Confirm Package Install" page
* Then a Pending event will appear on the Pending page of the Events-
* Log in to the client and run the Rhn_check command, which executes the pending event of the previous step
* Then the client can use the Rpm-qa | grep telnet to view the results. You can also observe the Pending event on the spacewalk, but there is one more record of the completion of the history event.

Upgrade Packages
For software that has already been installed, if there is a new version of the software included in the spacewalk Channel, the software that needs to be upgraded is displayed in the list of the Packages columns of the machine when you access systems and systems. Number. Visit Upgrade, Packages, software, systems-----Selected machines
* Select the package you want to upgrade, click the "Upgrade Packages" button
* Click the Confirm button on the "Confirm Package Upgrade" page
* Then a Pending event will appear on the Pending page of the Events-
* Log in to the client and run the Rhn_check command.

Remove Package
Visit List/remove, Packages, software, systems-----Selected machines
* Enter the package to delete in the Filter and select
* Select the package you want to upgrade, click the "Remove Packages" button
* Click the Confirm button on the "Confirm Package Removal" page
* Then a Pending event will appear on the Pending page of the Events-
* Log in to the client and run the Rhn_check command.

Finally, because the installation, upgrade, and deletion of the package requires the execution of the Rhn_check command on the client, we can implement the automatic execution by writing a cron job.
For example, we write a script file to execute the rhn_check command.

# Cat My_rhn_check.sh
#!/bin/bashret= ' Ps-ef | grep python | grep Rhn_check | Wc-l ' if [$ret = 0]; Then    /USR/SBIN/RHN_CHECKFI

Then set a cron job to run a check every minute
# CRONTAB-E
* * * * * */root/my_rhn_check.sh

Finally restart the Crond service
# Sudo/etc/init.d/crond Restart



Spacewalk installing the update removal package

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.