cobbler 설치
설치
- EPEL 설치
- yum install cobbler -y
- chkconfig cobblerd on
- service cobblerd restart
구동시 다음 에러가 발생할 경우 SELinux 때문이므로 조치
cobbler 데몬 시작 중: Traceback (most recent call last):
File "/usr/bin/cobblerd", line 76, in main
api = cobbler_api.BootAPI(is_cobblerd=True)
File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 127, in __init__
module_loader.load_modules()
File "/usr/lib/python2.6/site-packages/cobbler/module_loader.py", line 62, in load_modules
blip = __import__("modules.%s" % ( modname), globals(), locals(), [modname])
File "/usr/lib/python2.6/site-packages/cobbler/modules/authn_pam.py", line 121, in <module>
PAM_START = LIBPAM.pam_start
File "/usr/lib64/python2.6/ctypes/__init__.py", line 366, in __getattr__
func = self.__getitem__(name)
File "/usr/lib64/python2.6/ctypes/__init__.py", line 371, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/bin/python: undefined symbol: pam_start- setsebool -P httpd_can_network_connect_cobbler 1 -> 마찬가지
- semanage permissive -a cobblerd_t
- 22
Cobbler web
- https://github.com/cobbler/cobbler/wiki/Cobbler%20web%20interface
- http://blog.milford.io/2012/03/getting-a-basic-cobbler-server-going-on-centos/
- yum install cobbler_web -y
- Fix Authentication For The Web Interface.
- sed -i 's/authn_denyall/authn_configfile/g' /etc/cobbler/modules.conf
Change the password for the ‘Cobbler’ administative user.
- htdigest /etc/cobbler/users.digest "Cobbler" cobbler
- htdigest /etc/cobbler/users.digest "Cobbler" cobbler
- Set the Server Name
sed -i 's/server: 127.0.0.1/server: cobbler.example.com/g' /etc/cobbler/settings
- boot loader 다운로드
- cobbler get-loaders
- Sync the cobbler config
- cobbler sync
- cobbler check 로 설정 확인
Cobbler 설정
- dhcpd 설치
- yum install dhcp tftpd xinetd -y
- createrepo 설치
- yum install createrepo
- mkdir -p /var/www/html/centos/iso
- mount -o loop /root/CentOS-6.4-x86_64-bin-DVD1.iso /var/www/html/centos/iso/
- createrepo /var/www/html/centos/
- 33s
distory 생성
cobbler distro add \ --arch=x86_64 \ --breed=redhat \ --os-version=rhel6 \ --name=CentOS6 \ --initrd=/var/www/html/centos/iso/isolinux/initrd.img \ --kernel=/var/www/html/centos/iso/isolinux/vmlinuz~
BASHrepo 생성
cobbler repo add \ --arch=x86_64 \ --breed=yum \ --keep-updated=N \ --mirror=http://cobbler.lesstif.pe.kr/centos/ \ --name=CentOS6-Base
CODEprofile 추가
cobbler profile add \ --kickstart=/var/lib/cobbler/kickstarts/centos6.ks \ --repos="CentOS6-Base" \ --distro=CentOS6 \ --name=CentOS6-x86_64
CODE- 22
- ss
http://marksallee.wordpress.com/2011/01/24/cobbler-kickstart-and-pxe-boot/
SELiux
- semanage fcontext -a -t httpd_cobbler_rw_content_t 'settings.pyc'
cobbler_web 에서 로그인 에러
OSError at /do_login
[Errno 13] Permission denied: '/var/lib/cobbler/webui_sessions/sessionid9ea6c894697ddc5cd55dc11cfd172403'
Request Method: POST Request URL: https://cobbler.lesstif.pe.kr/cobbler_web/do_login Django Version: 1.3.7 Exception Type: OSError Exception Value: [Errno 13] Permission denied: '/var/lib/cobbler/webui_sessions/sessionid9ea6c894697ddc5cd55dc11cfd172403'
Exception Location: /usr/lib/python2.6/site-packages/django/contrib/sessions/backends/file.py in save, line 90 Python Executable: /usr/bin/python Python Version: 2.6.6 Python Path: ['/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/gtk-2.0', '/usr/lib/python2.6/site-packages', '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info', '/usr/share/cobbler/web', '/usr/share/cobbler/web/cobbler_web']
Server time: Sat, 11 May 2013 02:20:17 +0900 /usr/sbin/semanage fcontext -a -t httpd_sys_rw_content_t "/var/lib/cobbler/webui_sessions(/.*)?"
restorecon /var/lib/cobbler/webui_sessions/
- 2
참고 자료
- man cobblerd_selinux