Spacewalk Install update Delete package

Source: Internet
Author: User

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

With the previous two blogs, we can already use spacewalk to install the system, but in real-world scenarios we often need to manage packages through spacewalk, such as installing, upgrading, and removing packages, so let's take a look at how to implement these features through spacewalk.
Installing packages
Access Systems-> Systems-> selected machines-> Software-> Packages->
* In the Filter input telnet (here we assume that we need to install the Telnet tool on the client) and select the Telnet package (for example: TELNET-0.17-48.EL6)
* Click on the "Install Selected Packages" button
* On the "Confirm Package Install" page directly point Confirm button
* Then in Systems-> Systems-> Select machine-> Events-> Pending page will appear a Pending event
* Log on to the client and then 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 see the results. In the spacewalk can also observe Pending event is not, and in History event in a more than a record after the completion of the execution.

Upgrade Packages
For software that has already been installed, if there is a new software version in the repositories included in the spacewalk Channel, then the-> column of the machine in the list displays the software that needs to be upgraded when accessing Systems Systems Packages Number. Access Systems-> Systems-> selected machines-> Software-> Packages->
* Select the packages that need to be upgraded and click on the "Upgrade Packages" button
* On the "Confirm Package Upgrade" page directly point Confirm button
* Then in Systems-> Systems-> Select machine-> Events-> Pending page will appear a Pending event
* Log on to the client, and then run the Rhn_check command.

removing packages
Access Systems-> Systems-> selected machines-> Software-> Packages->
* Enter the package to be deleted in Filter and select
* Select the packages that need to be upgraded and click the "Remove Packages" button
* On the "Confirm Package Removal" page directly point Confirm button
* Then in Systems-> Systems-> Select machine-> Events-> Pending page will appear a Pending event
* Log on to the client, and then run the Rhn_check command.

Finally, because of the need to execute the rhn_check command on the client computer for installation, upgrade, and deletion of the package, we can automate execution by writing a cron job.
Like we write a script file to execute the rhn_check command.

# Cat My_rhn_check.sh

#!/bin/bash

ret= ' ps-ef | grep python | grep rhn_check | wc-l '
if [$ret = 0]; then
    /usr/sbin/rhn_check
Fi

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

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



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.