Child pages
  • cobbler 설치

Contents


설치

  1. EPEL 설치
  2. yum install cobbler -y
  3. chkconfig cobblerd on
  4. service cobblerd restart
    1. 구동시 다음 에러가 발생할 경우 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

    2. setsebool -P httpd_can_network_connect_cobbler 1 -> 마찬가지
    3. semanage permissive -a cobblerd_t
  5. 22

Cobbler web

 

  1. yum install cobbler_web -y
  2. Fix Authentication For The Web Interface.
    1. sed -i 's/authn_denyall/authn_configfile/g' /etc/cobbler/modules.conf
  3. Change the password for the ‘Cobbler’ administative user.

    1. htdigest /etc/cobbler/users.digest "Cobbler" cobbler
  4. Set the Server Name
    1. sed -i 's/server: 127.0.0.1/server: cobbler.example.com/g' /etc/cobbler/settings
  5. boot loader 다운로드
    1. cobbler get-loaders
  6. Sync the cobbler config
    1. cobbler sync
  7. cobbler check 로 설정 확인

 

Cobbler 설정

  1. dhcpd 설치
    1. yum install dhcp tftpd xinetd -y
  2. createrepo 설치
    1. yum install createrepo
    2. mkdir -p /var/www/html/centos/iso
    3. mount -o loop /root/CentOS-6.4-x86_64-bin-DVD1.iso /var/www/html/centos/iso/
    4. createrepo /var/www/html/centos/
  3. 33s
  4. 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~                                                                
  5. repo 생성

    cobbler repo add \
      --arch=x86_64 \
      --breed=yum \
      --keep-updated=N \
      --mirror=http://cobbler.lesstif.pe.kr/centos/ \
      --name=CentOS6-Base                                                                                                                                                                                        
  6. profile 추가

    cobbler profile add \
      --kickstart=/var/lib/cobbler/kickstarts/centos6.ks \
      --repos="CentOS6-Base" \
      --distro=CentOS6 \
      --name=CentOS6-x86_64
  7. 22
  8. 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
  • No labels

This page has no comments.