This article link: http://blog.csdn.net/kongxx/article/details/43950439
In a previous blog about spacewalk installation and account creation, this blog is about how to configure the spacewalk and install Linux systems through it.
1. First find two versions of the Linux image files, where I am using Centos-5.11-x86_64-bin-dvd-1of2.iso and centos-6.6-x86_64- Bin-dvd1.iso, and then use the following command to mount the two mirrored files to the specified directory, such as:
sudo mkdir-p/var/ftp/pub/centos5
sudo mount-t auto-o loop centos-5.11-x86_64-bin-dvd-1of2.iso/var/ftp/pub/ CentOS5
sudo mkdir-p/var/ftp/pub/centos6
sudo mount-t auto-o loop centos-6.6-x86_64-bin-dvd1.iso/var/ftp/ Pub/centos6
You can also modify the Fstab to mount automatically when the system starts. Here I was to mount them to the FTP directory.
Because of the slow, so we are only for CentOS6 to operate.
2. Login into the system and access channels-> Software Channel Management-> Manage repositories Create new->,
Here we need to add two repository
First Repository
Repository label*: Centos6_repo
Repository url*: file:///var/ftp/pub/CentOS6 or ftp:// 192.168.145.102/PUB/CENTOS6
Second Repository
Repository label*: Spacewalk_2.2-client_rhel6_repo
Repository url*: http://spacewalk.redhat.com/yum/2.2-client/RHEL/6/x86_64/
Note: You can use online Repository, such as those defined in/etc/yum.repos.d/centos-base.repo and/etc/yum.repos.d/epel.repo. But if you use an online Repository, it's very slow to do repo sync later, sometimes it takes several hours to sync.
3. Visit channels–> Manage Software channels–> Create new channel and fill out the following information on the Add Channel page
Channel name*: Centos6_channel Channel label* centos6_channel: architecture:x86_64 Channel
: Centos6_channel
4. Visit the channels–> Manage Software channels, select the Channel "Centos6_channel" that you created in the previous step, and then select Repositories under its "Centos6_repo" tab and "Spacewalk_2.2-client_rhel6_repo" Repository, then "Update repositories".
Once "Update repositories" is executed, the "Sync" tab appears on this page, and then "Sync" is selected and the "Sync Now" is executed.
Attention:
* performing "Sync Now" is a time-consuming operation that takes a long time to complete. Can be viewed at the command line by Ps-ef | grep sync "See if there is a process like"/usr/bin/python-u/usr/bin/spacewalk-repo-sync--channel xxx "to determine whether the execution is complete.
* after "Sync now", the list of channels pages in the channels–> Manage Software will see the Centos6_channel column showing the number of packets.
* Alternatively, you can set up a timed synchronization operation as needed.
5. Create the activation Keys, which are used by the Client to access the spacewalk server
Access systems–> activation keys–> Create new key
Description:my_key
6. Create kickstartable Distributions
Access Systems-> Kickstart-> distributions-> Create new distribution
Distribution label*: Centos6_dist tree
path*:/var/ftp/pub/centos6
Base channel*: Centos6_channel
Instal Ler generation*: RHEL6
7. Create Kickstart Profile
Access Systems-> Kickstart-> Kickstart Profiles-> Create new Kickstart profile
label*: CentOS6
Base channel*: Centos6_channel
kickstartable tree*: centos6_dist
When you are done, modify the Kickstart profile that you just created
* Select the key created in step fifth in the activation keys
8. Because spacewalk also inherited the cobbler, so we also need to make a change to cobbler, reference my two out of two blog
http://blog.csdn.net/kongxx/article/details/43573981
http://blog.csdn.net/kongxx/article/details/43670151
There's a special place to be treated.
* In this version of the cobbler can not use the "sudo cobbler get-loaders" installation loader, but to use "Yum install cobbler-loaders" to install
* Need to manually install the DHCP package "sudo yum install DHCP"
* Modify/etc/cobbler/settings file to change Redhat_management_server to the current spacewalk machine name or IP
redhat_management_server:192.168.145.102
After modifying the configuration of cobbler, remember to perform the following period of operation
Sudo/etc/init.d/cobblerd Restart
sudo cobbler sync
9. Deploying Linux Systems
9.1 First Use "sudo cobbler list" to view profile9.2 and then use "sudo cobbler system" to add and set up the system
sudo cobbler system add--name=test--profile=centos6:1:spacewalkdefaultorganization
sudo cobbler system edit-- Name=test--interface=eth0--mac=08:00:27:2c:30:8c--ip-address=192.168.145.155--netmask=255.255.255.0--static=1
sudo cobbler system edit--name=test--gateway=192.168.145.1--hostname=test
sudo cobbler sync
9.3 Installation System. If the physical machine has IPMI, you can start the physical machine remotely. Here I used the virtual machine to do the test, so I started the virtual machine manually, and now I see the virtual machine starting to install the system automatically.
10. Registration system
10.1 Access Systems-> Systems-> selected machines-> Software-> Software Channels
See if there are any associated Channel, if there is no one to choose from, such as the "Centos6_channel" created above.
10.2 Log on to the newly installed system to run
Yum Install-y http://yum.spacewalkproject.org/2.2-client/RHEL/6/x86_64/ spacewalk-client-repo-2.2-1.el6.noarch.rpm
Yum install-y http://dl.fedoraproject.org/pub/epel/6/x86_64/ epel-release-6-8.noarch.rpm
Yum install-y rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin Spacewalk-oscap
Yum install-y http://<spacewalk_server>/pub/rhn-org-trusted-ssl-cert-1.0-1.noarch.rpm
Rhnreg_ks--serverurl=http://<spacewalk_server>/xmlrpc--sslcacert=/usr/share/rhn/ Rhn-org-trusted-ssl-cert--activationkey=<activation_key>
* Where <spacewalk_server> is the spacewalk machine,<activation_key> is the key created in the activation keys
10.3 Waiting for the system to be installed, you can view the newly installed machine in the spacewalk Systems-> Systems-> physical Systems.