@ Карта сайта News Автора!

Bog BOS: Установка Scientific Linux 6.1 для вычислительного узла (kickstart)

Последние изменения:
2024.03.28: sysadmin: Файловая система zfs под Linux для архива (обновление от 0.6 до 2.2)

Последнее изменение файла: 2011.08.18
Скопировано с www.bog.pp.ru: 2024.04.27

Bog BOS: Установка Scientific Linux 6.1 для вычислительного узла (kickstart)

Предварительно прочитайте несколько слов о RHEL 6 и Scientific Linux 6.

Устанавливал с загрузкой по PXE, консоль через KVM-over-IP, для полностью автоматического выбора параметров используется kickstart.

Сервер HP ProLiant DL365 Generation 5, AMD Opteron 2356 (2.3 GHz), 16 GB памяти (8x2GB, DDR2 667), RAID контроллер HP Smart Array P400i, НЖМД SAS SFF HP DG146BAAJB (146 GB, 10000 RPM, Seagate, 2.5", 1 порт), CD-RW/DVD-ROM (ide1, /dev/hda, TSSTcorp CDW/DVD TS-L462D, udma2 (33)), USB 2.0, встроенный HP NC373i (Broadcom NetXtremeII BCM5708, bnx2, eth0 для управления , eth1 - не используется). Дополнительная двухпортовая сетевая карта NC360T (eth2 - port 1 основного сервера хранения HP MSA 2012i (iSCSI) , eth3 - port 0 запасного сервера хранения ). И ещё одна двухпортовая сетевая карта NC360T (eth4 - port 1 запасного сервера хранения , eth5 - port 0 основного сервера хранения ). Настройки BIOS на оптимизацию.

А также серверы Intel SR2625URLX.

А также серверы Intel SR1530SH.

А также серверы HP ProLiant DL360 Generation 6.

А также серверы HP ProLiant DL585 Generation 6.

А также множество мелких железок.

Назначение - вычислительный узел.

Установка и настройка системы загрузки по протоколу PXE (FTP сервер и дерево файлов для SL-61 x86_64, сервер tftp и образы для загрузки с помощью pxeos, сервер dhcp и pxelinux). Специальная конфигурация для загрузки данного сервера /tftpboot/linux-install/pxelinux.cfg/01-MACадрес, обеспечивающая установку нужной версии ОС с использованием kickstart-файла

default local
timeout 100
prompt 1
label local
  localboot 1

label 0
  localboot 1

label 1
  kernel CentOS5.3-x86_64-install/vmlinuz
  append initrd=CentOS5.3-x86_64-install/initrd.img ramdisk_size=8262 \
       method=ftp://ftp-сервер/pub/CentOS5.3/base/x86_64 ip=dhcp noipv6 \
       syslog=адрес-сервера lang=en_US text serial console=ttyS0,9600n8 utf8 nofb \
       ksdevice=eth0 ks=ftp://ftp-сервер/pub/kickstarts/имя-сервера.cfg

label 2
  kernel CentOS5.4-x86_64-install/vmlinuz
  append initrd=CentOS5.4-x86_64-install/initrd.img [nodmraid] ramdisk_size=8262 \
       method=ftp://ftp-сервер/pub/CentOS5.4/base/x86_64 ip=dhcp noipv6 \
       syslog=адрес-сервера lang=en_US text serial console=ttyS0,9600n8 utf8 nofb \
       ksdevice=eth0 ks=ftp://ftp-сервер/pub/kickstarts/имя-сервера.cfg

label 3
  kernel CentOS5.5-x86_64-install/vmlinuz
  append initrd=CentOS5.5-x86_64-install/initrd.img [nodmraid] ramdisk_size=8262 \
       method=ftp://ftp-сервер/pub/CentOS5.5/base/x86_64 ip=dhcp noipv6 \
       syslog=адрес-сервера lang=en_US text serial console=ttyS0,9600n8 utf8 nofb \
       ksdevice=eth0 ks=ftp://ftp-сервер/pub/kickstarts/имя-сервера.cfg

label 4
  kernel SL-61-x86_64-install/vmlinuz
  append initrd=SL-61-x86_64-install/initrd.img [nodmraid] ramdisk_size=64063 \
       method=ftp://ftp-сервер/pub/SL-61/os ip=dhcp noipv6 \
       syslog=адрес-сервера lang=en_US text serial console=ttyS0,9600n8 utf8 nofb \
       ksdevice=eth0 ks=ftp://ftp-сервер/pub/kickstarts/имя-сервера.cfg
# ksdevice=ifboot не работает

Подготовка файла с настройками kickstart (положить его на ftp://ftp-сервер/pub/kickstarts/имя-сервера.cfg)

install
url --url ftp://ftp-сервер/pub/SL-61/os
lang en_US.UTF-8
keyboard us

#text
#interactive - не подставляются значения по умолчанию
autostep
#cmdline - работает в текстовой режиме и срабатывает не всё
reboot
logging --host=syslog-сервер

firstboot --disabled

network --activate --device eth0 --onboot yes --bootproto dhcp --noipv6
network --device eth1 --onboot no --bootproto dhcp --noipv6 --hostname имя
network --device eth2 --onboot no --bootproto dhcp --noipv6 --hostname имя
network --device eth3 --onboot no --bootproto dhcp --noipv6 --hostname имя
network --device eth4 --onboot no --bootproto dhcp --noipv6 --hostname имя
network --device eth5 --onboot no --bootproto dhcp --noipv6 --hostname имя

rootpw --iscrypted пароль
selinux --disabled
#firewall --service=ssh 
# без iptables не будет сети у виртуальных машин
firewall --disabled
authconfig --enableshadow --passalgo=sha512 --enableldapauth --ldapserver=ldap-сервер --ldapbasedn=dc=... --enableldaptls

timezone --utc Europe/Moscow

# raid1 на 2 SATA дисках
#bootloader --location=mbr --driveorder=sda,sdb
#clearpart --drives=sda,sdb --all --initlabel
#part raid.008001 --size=500 --ondisk=sda
#part raid.008002 --size=100000 --ondisk=sda
#part raid.008017 --size=500 --ondisk=sdb
#part raid.008018 --size=100000 --ondisk=sdb
#raid /boot --fstype=ext4 --level=1 --device=md0 raid.008001 raid.008017
#raid pv.009001 --level=1 --device=md1 raid.008002 raid.008018
#volgroup system --pesize=4096 pv.009001
#logvol / --fstype=ext4 --name=root --vgname=system --size=30000
#logvol swap --name=swap --vgname=system --size=30000

# на аппаратном массиве, не трогая ранее существующие массивы
#ignoredisk --only-use=disk/by-path/pci-0000:0d:00.0-scsi-0:1:1:0
#bootloader --location=mbr --driveorder=disk/by-path/pci-0000:0d:00.0-scsi-0:1:1:0
#clearpart --drives=disk/by-path/pci-0000:0d:00.0-scsi-0:1:1:0 --all --initlabel
#part /boot --fstype ext3 --size=500 --ondisk=disk/by-path/pci-0000:0d:00.0-scsi-0:1:1:0
#part pv.11 --size=100 --grow --asprimary --ondisk=disk/by-path/pci-0000:0d:00.0-scsi-0:1:1:0
#volgroup system --pesize=8192 pv.11
#logvol / --fstype ext4 --name=root --vgname=system --size=15000
#logvol swap --fstype swap --name=swap --vgname=system --size=40000

repo --name="Scientific Linux"  --baseurl=ftp://ftp/pub/SL-61/os --cost=100

%packages
@additional-devel
@backup-client
@base
@cifs-file-server
@client-mgmt-tools
@compat-libraries
@console-internet
@core
@debugging
@basic-desktop
@desktop-debugging
@desktop-platform
@desktop-platform-devel
@development
@dial-up
@directory-client
@directory-server
@mail-server
@eclipse
@emacs
@ftp-server
@fonts
@general-desktop
@graphical-admin-tools
@graphics
@hardware-monitoring
@ice-desktop
@infiniband
@internet-applications
@internet-browser
@java-platform
@kde-desktop
@large-systems
@legacy-unix
@legacy-x
@mysql-client
@mysql
@nfs-file-server
@storage-server
@network-file-system-client
@network-tools
@office-suite
@php
@performance
@perl-runtime
@print-server
@print-client
@remote-desktop-clients
@russian-support
@system-management-snmp
@scalable-file-systems
@scientific
@security-tools
@server-platform
@server-platform-devel
@storage-client-multipath
@system-management
@system-admin-tools
@tex
@technical-writing
@virtualization
@virtualization-client
@virtualization-tools
@web-server
@x11
@repos
@storage-client-iscsi
libgcrypt-devel
libXinerama-devel
xorg-x11-proto-devel
startup-notification-devel
libgnomeui-devel
libbonobo-devel
junit
libXau-devel
libXrandr-devel
popt-devel
libdrm-devel
libxslt-devel
libglade2-devel
gnutls-devel
nss_db
udftools
mtools
yum-plugin-versionlock
cpufrequtils
gpm
yum-plugin-tmprepo
pax
yum-plugin-security
oddjob
squashfs-tools
star
kernel-doc
yum-plugin-downloadonly
sgpio
yum-plugin-changelog
genisoimage
x86info
edac-utils
ncurses-term
logwatch
ecryptfs-utils
wodim
ftp
systemtap-client
lslk
systemtap-initscript
tigervnc-server
oprofile-gui
xrestop
qt-mysql
desktop-file-utils
mod_dav_svn
ant
libstdc++-docs
expect
dejagnu
cmake
imake
babel
kdewebdev
rpmdevtools
compat-gcc-34
jpackage-utils
mercurial
rpmlint
compat-gcc-34-c++
python-docs
nasm
samba-winbind
openldap-clients
nscd
pam_ldap
nss-pam-ldapd
openldap-servers
samba
sendmail
sendmail-cf
eclipse-mylyn-cdt
eclipse-pde
eclipse-mylyn-pde
eclipse-mylyn-wikitext
eclipse-mylyn-trac
eclipse-subclipse-graph
eclipse-mylyn-webtasks
bitmap-fixed-fonts
gconf-editor
alacarte
gedit-plugins
gnome-pilot
vim-X11
firstaidkit-gui
netpbm-progs
ImageMagick
inkscape
dcraw
edac-utils
lm_sensors
icewm-l10n
qperf
perftest
libibcommon
compat-dapl
infiniband-diags
srptools
opensm
evolution-exchange
thunderbird
xchat
icedtea-web
cups-lpd
rsh
telnet
tcp_wrappers
ncompress
tftp
openmotif
xorg-x11-fonts-ISO8859-1-75dpi
xterm
xorg-x11-xdm
xorg-x11-fonts-cyrillic
xorg-x11-fonts-75dpi
libXmu
libXp
openmotif22
xorg-x11-twm
perl-DBD-MySQL
cachefilesd
arpwatch
nmap
NetworkManager-openswan
iptraf
dropwatch
wireshark
arptables_jf
planner
openoffice.org-base
openoffice.org-report-builder
openoffice.org-headless
taskjuggler
openoffice.org-wiki-publisher
openoffice.org-presentation-minimizer
openoffice.org-emailmerge
openoffice.org-javafilter
php-xmlrpc
php-ldap
php-mysql
sdparm
sg3_utils
tuned-utils
tuned
perl-LDAP
perl-Date-Manip
perl-DBD-SQLite
tsclient
rdesktop
vinagre
tigervnc
spice-client
mpitests-openmpi
openmpi
atlas
numpy
trousers
hmaccalc
ipmitool
freeipmi
OpenIPMI
openhpi
mc
screen
crypto-utils
scrub
lsscsi
xmltoman
texinfo
docbook-utils-pdf
xmlto-tex
qemu-kvm-tools
virt-v2v
libguestfs-tools
libguestfs-mount
mod_nss
mod_authz_ldap
perl-CGI
epel-release
elrepo-release
e2fsprogs-devel
ksh
libX11.i686
libSM.i686
libXi.i686
libXrender.i686
libXrandr.i686
-pcmciautils
-gdm-plugin-fingerprint
-gcc-gfortran
-ypbind
-ipa-client
-dovecot
-spamassassin
-lohit-assamese-fonts
-lohit-bengali-fonts
-thai-scalable-waree-fonts
-lohit-kannada-fonts
-paktype-tehreer-fonts
-tibetan-machine-uni-fonts
-lohit-devanagari-fonts
-smc-meera-fonts
-lohit-gujarati-fonts
-paktype-naqsh-fonts
-sil-padauk-fonts
-lohit-punjabi-fonts
-lohit-tamil-fonts
-lohit-telugu-fonts
-madan-fonts
-lohit-oriya-fonts
-gnome-bluetooth
-wacomexpresskeys
%end

%post
# добавление групп пользователей
/usr/sbin/groupadd -g ид имя
# добавление пользователей
/usr/sbin/useradd -c "описание" -g sys -m -r -u идентификатор -p кодированный-пароль имя
# уменьшение зарезервированного места, отказаться от регулярных fsck
/sbin/tune2fs -r 25000 -c -1 -i 0 /dev/system/root
# убрать лишние сервисы
/sbin/chkconfig --level 12345 avahi-daemon off
/sbin/chkconfig --level 12345 cpuspeed off
/sbin/chkconfig --level 12345 firstboot off
/sbin/chkconfig --level 12345 lm_sensors off
/sbin/chkconfig --level 12345 pcscd off
# динамический загрузчик
echo "/usr/local/lib" >> /etc/ld.so.conf
echo "/usr/local/lib64" >> /etc/ld.so.conf
/sbin/ldconfig
# настройка rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-sl6
rpm --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson
rpm -iv ftp://ftp/pub/EPEL6/x86_64/epel-release-6-5.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
# настройка yum
cat << 'EOF' > /etc/yum.repos.d/sl.repo
[sl]
name=Scientific Linux $releasever - $basearch
#baseurl=http://ftp.scientificlinux.org/linux/scientific/$releasever/$basearch/os/
#		http://ftp1.scientificlinux.org/linux/scientific/$releasever/$basearch/os/
#		http://ftp2.scientificlinux.org/linux/scientific/$releasever/$basearch/os/
#		ftp://ftp.scientificlinux.org/linux/scientific/$releasever/$basearch/os/
#mirrorlist=http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-base-6.txt
baseurl=ftp://ftp/pub/SL-61/os
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson

[sl-security]
name=Scientific Linux $releasever - $basearch - security updates
#baseurl=http://ftp.scientificlinux.org/linux/scientific/$releasever/$basearch/updates/security/
#		http://ftp1.scientificlinux.org/linux/scientific/$releasever/$basearch/updates/security/
#		http://ftp2.scientificlinux.org/linux/scientific/$releasever/$basearch/updates/security/
#		ftp://ftp.scientificlinux.org/linux/scientific/$releasever/$basearch/updates/security/
#mirrorlist=http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-security-6.txt
baseurl=ftp://ftp/pub/SL-61/updates/$basearch/security
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson

[sl-source]
name=Scientific Linux $releasever - Source
baseurl=http://ftp.scientificlinux.org/linux/scientific/$releasever/SRPMS/
		http://ftp1.scientificlinux.org/linux/scientific/$releasever/SRPMS/
		http://ftp2.scientificlinux.org/linux/scientific/$releasever/SRPMS/
		ftp://ftp.scientificlinux.org/linux/scientific/$releasever/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson
EOF

cat << 'EOF' > /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
baseurl=ftp://ftp/pub/EPEL6/$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
EOF

cat << 'EOF' > /etc/yum.repos.d/elrepo.repo
[elrepo]
name=ELRepo.org Community Enterprise Linux Repository - el6
#baseurl=http://elrepo.org/linux/elrepo/el6/$basearch/
#mirrorlist=http://elrepo.org/mirrors-elrepo.el6
baseurl=ftp://ftp/pub/elrepo6/elrepo/$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
protect=0

[elrepo-testing]
name=ELRepo.org Community Enterprise Linux Testing Repository - el6
baseurl=http://elrepo.org/linux/testing/el6/$basearch/
mirrorlist=http://elrepo.org/mirrors-elrepo-testing.el6
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
protect=0

[elrepo-kernel]
name=ELRepo.org Community Enterprise Linux Kernel Repository - el6
#baseurl=http://elrepo.org/linux/kernel/el6/$basearch/
#mirrorlist=http://elrepo.org/mirrors-elrepo-kernel.el6
baseurl=ftp://ftp/pub/elrepo6/kernel/$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
protect=0

[elrepo-extras]
name=ELRepo.org Community Enterprise Linux Repository - el6
#baseurl=http://elrepo.org/linux/extras/el6/$basearch/
#mirrorlist=http://elrepo.org/mirrors-elrepo-extras.el6
baseurl=ftp://ftp/pub/elrepo/extras/$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
protect=0
EOF

# multipath
cat << EOF > /var/lib/multipath/bindings
# Format:
# alias wwid
#
mpathИМЯ ВВИД-стр83
EOF

# need update warning
mkdir /root/bin
cat << EOF >> /root/bin/check-update.sh
#!/bin/bash

result=`yum -d 0 check-update`

if [ $? ]
then
  echo $result | mail -s "`hostname`: `cat /etc/redhat-release`: need updates" root
fi
EOF
chmod u+x /root/bin/check-update.sh
echo -e "23 5 * * 1 /root/bin/check-update.sh\n53 * * * * /usr/sbin/ntpdate -s -B ntp1 ntp2" | /usr/bin/crontab -

%end

Журнал на сервер syslog выдаётся в самом конце установки, когда это уже неинтересно (и ошибки выводятся только на экран).

Ручная настройка:

@ Карта сайта News Автора!

Bog BOS: Установка Scientific Linux 6.1 для вычислительного узла (kickstart)

Последние изменения:
2024.03.28: sysadmin: Файловая система zfs под Linux для архива (обновление от 0.6 до 2.2)



Copyright © 1996-2024 Sergey E. Bogomolov; www.bog.pp.ru