Проект

Общее

Профиль

Установка на чистую систему » История » Версия 6

Версия 5 (Владимир Ипатов, 07.03.2021 20:31) → Версия 6/7 (Владимир Ипатов, 29.06.2024 04:53)

h1. Установка на чистую систему

[[установка на чистый Debian Stretch (Skycover 3)]] <pre>
apt install qemu vim htop zsh puppet xen-linux-system-amd64 lsb-release sudo aptitude smartmontools
</pre>

в /etc/default/grub добавить:
<pre>
GRUB_CMDLINE_XEN="dom0_mem=3072M"
</pre>

<pre>
dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen
update-grub
</pre>

/var/lib/ganeti/rapi/users:

<pre>
scweb СЛУЧАЙНЫЙ_ПАРОЛЬ write
</pre>

удалить systemd:

<pre>
apt-get install -y --force-yes sysvinit-core sysvinit-utils
cp /usr/share/sysvinit/inittab /etc/inittab
перезагрузка
apt-get remove -y --force-yes --purge --auto-remove systemd
echo -e 'Package: systemd\nPin: release *\nPin-Priority: -1' > /etc/apt/preferences.d/systemd
echo -e '\n\nPackage: *systemd*\nPin: release *\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
echo -e '\nPackage: systemd:i386\nPin: release *\nPin-Priority: -1' >> /etc/apt/preferences.d/systemd
</pre>

<pre>
echo "deb http://sci-dev.skycover.ru/apt stretch main" > /etc/apt/sources.list.d/sci-dev.list
</pre>

<pre>
wget -O- http://sci-dev.skycover.ru/apt/stretch.pub|apt-key add -
</pre>

<pre>
aptitude update
aptitude install ganeti ganeti-instance-debootstrap sci-config sci-scripts
</pre>

настройки:

ссш:

<pre>
## Enable ssh-dss keys support
echo " PubkeyAcceptedKeyTypes=+ssh-dss" >> $TARGET/etc/ssh/ssh_config
echo "PubkeyAcceptedKeyTypes=+ssh-dss" >> $TARGET/etc/ssh/sshd_config
</pre>

модули ядра:

<pre>
echo options drbd minor_count=128 usermode_helper=/bin/true disable_sendpage=1 >>$target/etc/modprobe.d/drbd.conf
echo options loop max_loop=64 >>$target/etc/modprobe.d/local-loop.conf
echo drbd >>$target/etc/modules
echo 8021q >>$target/etc/modules
mkdir /stuff/cdimages
</pre>

/etc/default/smartmontools - включить smartd

/etc/rc.local
<pre>
# If you use hardware raid or external FC/Infiniband storage, you prorably would rather use noop scheduler instead of deadline

# rise priority for dom0, alowing drbd to work fine
xl sched-credit -d0 -w512

modprobe sg
disks=`sg_map -i|awk '{print substr($2, length($2))}'`
for i in $disks; do
# Set value if you want to use read-ahead
ra=""
if [ -n "$ra" ]; then
blockdev --setra $ra /dev/sd$i
fi
if grep -q sd$i /etc/sysfs.conf; then
echo sd$i already configured in /etc/sysfs.conf
else
cat <<EOF >>/etc/sysfs.conf
block/sd$i/queue/scheduler = deadline
block/sd$i/queue/iosched/front_merges = 0
block/sd$i/queue/iosched/read_expire = 150
block/sd$i/queue/iosched/write_expire = 1500
EOF
fi
done
/etc/init.d/sysfsutils restart

</pre>

/etc/sysctl.conf:

<pre>
net.ipv4.ip_forward=1
</pre>

sysctl -p

<pre>
ln -s /usr/lib/xen-4.8 /usr/lib/xen
ln -s /vmlinuz /boot/vmlinuz-xenU
ln -s /initrd.img /boot/initrd.img-xenU
</pre>

<pre>
aptitude install sci-web
</pre>