Created
November 12, 2012 11:14
-
-
Save bugcy013/4058750 to your computer and use it in GitHub Desktop.
Spacewalk_errata configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Logos01> dhanasekaran: https://github.com/Logos01/admin-tools/blob/master/import_errata | |
<Logos01> That's my method. | |
<Logos01> It depends on the script, "errata-import.pl" as found on http://cefs.steve-meier.de | |
<Logos01> (Basically just grab errata-import.pl into /usr/local/bin and then my script as well. Then you can (best if done weekly) run my script.) | |
<dhanasekaran> Logos01, https://github.com/Logos01/admin-tools/blob/master/import_errata 404 error please check | |
<Logos01> https://github.com/Logos01/admin-tools/bin | |
<Logos01> Try that or https://github.com/Logos01/admin-tools/tree/master/bin | |
<dhanasekaran> Logos01, it's working | |
<Logos01> :D | |
<Logos01> Script is BSD/lGPL/GPLv2. Take your pick. | |
<dhanasekaran> How to use this script please guide me Logos01 import_errata already i have "errata-import.pl | |
<Logos01> dhanasekaran: Okay, so make sure "errata-import.pl" is in your /usr/local/bin -- well, anywhere in $PATH (as defined inside import_errata) | |
<Logos01> Invocation from there is as shown in the script itself. | |
<dhanasekaran> Logos01, i moved "errata-import.pl" to /usr/local/bin next | |
<Logos01> dhanasekaran: Add import_errata somewhere to your $PATH | |
<Logos01> (I prefer /usr/local/bin for homebrew scripts. This is part of the FHS) | |
<Logos01> Make sure it's executable. | |
<dhanasekaran> [root@spacewalkserver ~]# sh import_errata | |
<dhanasekaran> sed: can't read /etc/spacewalk: No such file or directory | |
<dhanasekaran> sed: can't read /etc/spacewalk: No such file or directory | |
<dhanasekaran> cat: /etc/secure/proxy_file: No such file or directory | |
<Logos01> Oh. | |
<Logos01> 1) Do not invoke w/ sh. | |
<Logos01> This is a *bash* script. | |
<Logos01> Not an ash/"sh". | |
<Logos01> (Note the interpreter declaration. It matters.) | |
<Logos01> So you can remove the /etc/secure/proxy_file if you're not behind an HTTP proxy. | |
<Logos01> (the line for it.) | |
<Logos01> You will however need (and I should document this I s'pose) -- you will need the file, "/etc/spacewalk", which will have two lines. | |
<Logos01> line 1 is the UID of an admin user of your Spacewalk server. | |
<Logos01> line 2 is the password of that user. | |
<dhanasekaran> [root@spacewalkserver ~]# cat /etc/spacewalk | |
<dhanasekaran> systems | |
<dhanasekaran> hereweg correct | |
<Logos01> (I believe so. I'll rephrase to make it more obvious.) | |
<Logos01> Let's say your Spacewalk admin user is called "spacewalkadmin", and spacewalkadmin's password is "password" | |
<Logos01> The file /etc/spacewalk will have the lines: | |
<Logos01> spacewalkadmin | |
<Logos01> password | |
* tmclaugh[work] has quit (Read error: Connection reset by peer) | |
* gkhachik has quit (Quit: Leaving) | |
<Logos01> (I *STRONGLY* recommend executing "chmod 0400 /etc/spacewalk" by the way.) | |
<Logos01> Anyhoo. From there... | |
<Logos01> You should be able to follow the usage pattern as shown in import_errata --help | |
<dhanasekaran> [root@spacewalkserver ~]# ./import_errata | |
<dhanasekaran> cat: /etc/secure/proxy_file: No such file or directory | |
<dhanasekaran> 404 Not Found | |
<Logos01> dhanasekaran: Comment out that line. | |
<Logos01> Unless your Spacewalk server is behind an http proxy. | |
<dhanasekaran> Logos01, thanks i commented line 43, 44 | |
<Logos01> (If you *ARE* behind an http proxy then you would populate /etc/secure/proxy_file with 'http://proxyuser:proxypassword@proxyaddress:####' (where '####' is the port number your proxy listens on.) | |
<Logos01> But you are not, so we can ignore this. | |
<Logos01> Give it another go. | |
<Logos01> /usr/local/bin/import_errata --debug --publish | |
<dhanasekaran> http://paste.ubuntu.com/1260220/ please check | |
<dhanasekaran> i correctly commented | |
<Logos01> Run "/usr/local/bin/import_errata --debug --publish" | |
<Logos01> Then show me that output. | |
<dhanasekaran> please check http://paste.ubuntu.com/1260229/ | |
<Logos01> looking | |
<Logos01> Oh. | |
<Logos01> Change the string "spacewalk.virt.net" to match your actual spacewalk server DNS entry. | |
<Logos01> That's in line 66 of the script. | |
<dhanasekaran> Logos01, i changed it's running big log screen running | |
<Logos01> That's good. | |
<dhanasekaran> Logos01, still running | |
<Logos01> Should be seeing a crapton of lines a lot like "DEBUG: Package ID 1861 is openssl097a-0.9.7a-9.el5_4.2.i386.rpm" | |
<dhanasekaran> Logos01, yesh.. | |
<Logos01> Yeah, since this is your first run this could (conceivably) take as long as an hour. | |
<Logos01> The good news is it's doing it's voodoo. | |
<Logos01> (It's working.) | |
<dhanasekaran> i think it scan my hole repo | |
<dhanasekaran> Logos01, thanks | |
<dhanasekaran> Logos01, thanks | |
<Logos01> :D :D | |
<Logos01> I'm curious -- what are you using your Spacewalk server for? | |
<dhanasekaran> pushing packages from server to client , client machine installation, using cobbler, | |
<Logos01> Work environment? What size a company? | |
<Logos01> :3 | |
* mcalmer has quit (Remote host closed the connection) | |
* jsherrill_afk is now known as jsherrill | |
* Egyptian[Laptop] ([email protected]) has joined #spacewalk | |
* slukasik has quit (Quit: Leaving) | |
<dhanasekaran> Logos01, fully linux environment all the servers, What size a company? what do you mean? | |
* Egyptian[Laptop] has quit (Quit: Leaving.) | |
<Logos01> Well, to the nearest hundred how many OS instances? | |
<dhanasekaran> Logos01, more than 200. | |
* crashmag has quit (Excess Flood) | |
<Logos01> Nifty. Thanks much. | |
* jjj_ ([email protected]) has joined #spacewalk | |
* crashmag ([email protected]) has joined #spacewalk | |
<dhanasekaran> Logos01, Hi Got INFO: Errata created: 693 | |
<Logos01> There ya go! | |
<Logos01> Now you can add that script to your root crontab. | |
<Logos01> Call it a day. | |
<Logos01> Again, I recommend running it 1x weekly. | |
rpm -ivh http://spacewalk.redhat.com/yum/1.7-client/RHEL/5/x86_64/spacewalk-client-repo-1.7-5.el5.noarch.rpm | |
yum install rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin | |
import_errata --debug --publish | |
998 git https://github.com/davidnutter/Centos-Errata.git | |
999 git clone git://github.com/davidnutter/Centos-Errata.git | |
1000 cd Centos-Errata/ | |
1001 ls | |
1002 less README | |
1003 ./centos-errata.py /tmp/centos-digest-message.txt | |
1004 touch /tmp/centos-digest-message.txt | |
1005 ./centos-errata.py /tmp/centos-digest-message.txt | |
1006 ./centos-errata.py /tmp/centos-digest-message.txt | |
1007 vim centos-errata.py | |
1008 ./centos-errata.py -f archive --test /tmp/2009-May.txt | |
1009 cd .. | |
1010 cd Centos-Errata/ | |
1011 ls | |
1012 cd testdata/ | |
1013 ls | |
1014 ./centos-errata.py /tmp/centos-digest-message.txt | |
1015 cd .. | |
1016 ./centos-errata.py /tmp/centos-digest-message.txt | |
1017 cat centos-errata.py | grep 'RHN Password' | |
1018 vim centos-errata.py | |
1019 ./centos-errata.py /tmp/centos-digest-message.txt --password hereweg0 | |
1020 ./centos-errata.py /tmp/centos-digest-message.txt --password hereweg0 | |
1021 ./centos-errata.py -s 192.168.85.42 -l systems | |
1022 ./centos-errata.py --help | |
1023 cd | |
1024 wget http://cefs.steve-meier.de/errata-import.tar | |
1025 tar -xvf errata-import.tar | |
1026 ./errata-import.pl | |
1027 yum install perl-Text-Unidecode | |
1028 ./errata-import.pl | |
1029 yum install perl-XML-Simple | |
1030 ./errata-import.pl | |
1031 wget yum install perl-XML-Simple | |
1032 wget yum install perl-XML-Simple | |
1033 wget https://www.redhat.com/security/data/oval/com.redhat.rhsa-all.xml | |
1034 ./errata-import.pl | |
1035 wget http://cefs.steve-meier.de/errata.latest.xml | |
1036 ./errata-import.pl --server 192.168.85.42 --errata errata.latest.xml | |
1037 ./errata-import.pl --server 192.168.85.42 --errata errata.latest.xml --rhsa-oval com.redhat.rhsa-all.xml | |
1038 cat > import_errata | |
1039 vim import_errata | |
1040 chmod 777 import_errata | |
1041 ls -ltr | |
1042 ls -ltr | |
1043 cp -rvf errata-import.pl /usr/local/bin/ | |
1044 sh import_errata | |
1045 cd /etc/spacewalk-release | |
1046 cat /etc/spacewalk-release | |
1047 bash import_errata | |
1048 cat > /etc/spacewalk | |
1049 cat /etc/spacewalk | |
1050 ccd /tmp/ | |
1051 cd /tmp/ | |
1052 cd | |
1053 ls -ltr | |
1054 vim import_errata | |
1055 chmod 0400 /etc/spacewalk | |
1056 ./import_errata | |
1057 vim import_errata | |
1058 vim .vimrc | |
1059 vim import_errata | |
1060 ./import_errata | |
1061 vim import_errata | |
1062 cat import_errata | |
1063 ls -tlr | |
1064 cp -rvf import_errata /usr/local/bin/ | |
1065 import_errata --debug --publish | |
1066 ls -ltr | |
1067 mv import_errata import_errata_! | |
1068 vim /usr/local/bin/import_errata | |
1069 import_errata --debug --publish | |
1070 history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment