Skip to content

Instantly share code, notes, and snippets.

@gnanet
Last active May 16, 2018 20:39
Show Gist options
  • Select an option

  • Save gnanet/97faffcf4418f0dff48e88f729a2d877 to your computer and use it in GitHub Desktop.

Select an option

Save gnanet/97faffcf4418f0dff48e88f729a2d877 to your computer and use it in GitHub Desktop.
First steps after installed XenServer 6.5 (HUNGARIAN)
#!/bin/bash
exit 0
# Frissítésekhez partíció innen http://wiki.hetzner.de/index.php/Citrix_XenServer#Lokale_ISO_Libary_einbinden
# vgscan
# Reading all physical volumes. This may take a while...
# Found volume group "VG_XenStorage-NNNNNNNN-NNNN-NNNN-NNNN-NNNNNNNNNNNN" using metadata type lvm2
export xenvg=`vgscan | grep VG_XenStorage | awk -F'"' {' print $2 '}`
lvcreate -L 10G -n xenhostdata ${xenvg}
mkfs.ext3 -L xenhostdata /dev/${xenvg}/xenhostdata
mkdir -p /media/data
mount /dev/${xenvg}/xenhostdata /media/data
lvchange -a y /dev/${xenvg}/xenhostdata
#/etc/rc.d/rc.local végére:
# lvchange -a y /dev/VG_XenStorage-NNNNNNNN-NNNN-NNNN-NNNN-NNNNNNNNNNNN/xenhostdata
# mount /dev/VG_XenStorage-NNNNNNNN-NNNN-NNNN-NNNN-NNNNNNNNNNNN/xenhostdata /media/data
# Példa alapján további csomagok telepítése Xenserver 6.5
# https://binaryimpulse.com/2015/06/installing-munin-node-on-xenserver-6-5/
yum --enablerepo=extras install epel-release
# mc htop screen telepítése:
yum --enablerepo=epel --enablerepo=base install mc htop screen
# fail2ban telepítése, /etc/ssmtp beállítása LÉTFONTOS!!
cp /etc/ssmtp/ssmtp.conf /etc/ssmtp/ssmtp.conf.bak
echo "root=your@email.tld
mailhub=mail.server.tld:587
rewriteDomain=server.tld
hostname=your.server.tld
AuthUser=some@email.tld
AuthPass=thepassword" > /etc/ssmtp/ssmtp.conf
yum --enablerepo=epel --enablerepo=base install fail2ban
# autopatcher script innen : https://github.com/dalgibbard/citrix_xenserver_patcher
mkdir -p /media/data/patch
mkdir -p /media/data/bin
wget --no-check-certificate -O /media/data/bin/patcher.py https://raw.github.com/dalgibbard/citrix_xenserver_patcher/master/patcher.py
chmod a+x /media/data/bin/patcher.py
cd /media/data/patch
/media/data/bin/patcher.py -l
# ha van listázott patch
# /media/data/bin/patcher.py
# reboot
# Debian 8 template létrehozása
# https://gist.github.com/gnanet/7e14d834515cf07335265de9d8a794ec
wget --no-check-certificate -O /root/xenserver_create_jessie_template_64bit.sh https://gist.githubusercontent.com/gnanet/7e14d834515cf07335265de9d8a794ec/raw/e6835664b0bede601daecdc2e55160412d5998ae/xenserver_create_jessie_template_64bit.sh
chmod a+x /root/xenserver_create_jessie_template_64bit.sh
/root/xenserver_create_jessie_template_64bit.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment