« Debian/Xenserver » : différence entre les versions
(→Réseau) |
|||
| Ligne 86 : | Ligne 86 : | ||
apt-key adv --recv-keys --keyserver pool.sks-keyservers.net 1285491434D8786F | apt-key adv --recv-keys --keyserver pool.sks-keyservers.net 1285491434D8786F | ||
aptitude update | aptitude update | ||
aptitude install srvadmin-all | aptitude install srvadmin-all snmpd | ||
</syntaxhighlight> | |||
Activation d'OMSA SNMP<ref>tuto prevenant de http://blog.brachium-system.net/archives/70-Debian-Dell-OMSA-SNMP.html</ref> | |||
* Activation de SNMP dans OMSA<syntaxhighlight lang="bash">/etc/init.d/dataeng enablesnmp</syntaxhighlight> | |||
* Restart du Data Engine System d'OMSA<syntaxhighlight lang="bash">/etc/init.d/dataeng restart</syntaxhighlight> | |||
* Edition du fichier <path>/etc/default/snmpd</path> pour virer <code>-I -smux</code> | |||
* Edition du fichier /etc/snmp/snmpd.conf | |||
<pre> | |||
com2sec local localhost public | |||
com2sec local 127.0.0.1 public | |||
com2sec local 192.168.0.0/24 public | |||
group MyRWGroup v1 local | |||
group MyRWGroup v2c local | |||
group MyRWGroup usm local | |||
view all included .1 80 | |||
access MyRWGroup "" any noauth exact all all none | |||
syslocation B2PWeb | |||
syscontact srs@b2pweb.com | |||
sysName virt2.b2pweb.com | |||
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat | |||
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro | |||
# Allow Systems Management Data Engine SNMP to connect to snmpd using SMUX | |||
smuxpeer .1.3.6.1.4.1.674.10892.1 | |||
</pre> | |||
test | |||
<syntaxhighlight lang="bash"> | |||
snmpwalk -v2c -c public localhost 1.3.6.1.4.1.674.10893 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Version du 12 décembre 2013 à 15:08
Installation minimale
Télécharger le driver BNX2 Debian pour les cartes réseaux et le stocker sur une clé USB qui sera insérée au démarrage de l'installation.
Depuis un DVD d'installation:
- installation minimale
- paquet openssh-server
Modification du fichier <path>/etc/apt/sources.list</path> (ou copie depuis virt2 ou virt3)
deb http://ftp.fr.debian.org/debian/ wheezy main contrib non-free deb-src http://ftp.fr.debian.org/debian/ wheezy main contrib non-free deb http://security.debian.org/ wheezy/updates main contrib non-free deb-src http://security.debian.org/ wheezy/updates main contrib non-free # wheezy-updates, previously known as 'volatile' # A network mirror was not selected during install. The following entries # are provided as examples, but you should amend them as appropriate # for your mirror of choice. # deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free deb-src http://ftp.debian.org/debian/ wheezy-updates main contrib non-free
- On met le système à jour
aptitude update && aptitude upgrade - On installe les logiciels indispensables
aptitude install vim ntp
Installation du serveur de virtualisation
Xen
On installe Xen
aptitude install xen-hypervisor-amd64 xen-linux-system-amd64 xen-utils xen-tools bridge-utils xfsprogs
On modifie le fichier de configuration de Xen: <path>/etc/xen/xend-config.sxp</path>
(logfile /var/log/xen/xend.log) (loglevel DEBUG) (xend-http-server yes) (xend-unix-server yes) (xend-tcp-xmlrpc-server yes) (xend-unix-xmlrpc-server yes) (xend-relocation-server yes) (xend-relocation-ssl-server no) (xend-udev-event-server no) (xend-unix-path /var/lib/xend/xend-socket) (xend-tcp-xmlrpc-server-address '0.0.0.0') (xend-tcp-xmlrpc-server-port 8006) (xend-port 8000) (xend-relocation-port 8002) (xend-address '') (xend-relocation-address '') (xend-relocation-hosts-allow '^localhost$ ^.*\\.b2pweb\\.com$') (network-script network-dummy) (vif-script vif-bridge) (dom0-min-mem 1024) (enable-dom0-ballooning no) (total_available_memory 0) (dom0-cpus 1) (vnc-listen '0.0.0.0') (vncpasswd '') (keymap 'fr')
Ajout au fichier <path>/etc/default/grub</path>
GRUB_CMDLINE_XEN="dom0_mem=1024M dom0_max_vcpus=1 dom0_vcpus_pin"
GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=1024M dom0_max_vcpus=1 dom0_vcpus_pin"
Pour être sûr que xen soit le premier de la liste (donc celui qui démarre par défaut)
cd /etc/grub.d/
ln -s 20_linux_xen 09_linux_xen
update-grub
Open Manage
echo 'deb http://linux.dell.com/repo/community/debian wheezy openmanage' > /etc/apt/sources.list.d/linux.dell.com.sources.list
apt-key adv --recv-keys --keyserver pool.sks-keyservers.net 1285491434D8786F
aptitude update
aptitude install srvadmin-all snmpd
Activation d'OMSA SNMP[1]
- Activation de SNMP dans OMSA
/etc/init.d/dataeng enablesnmp
- Restart du Data Engine System d'OMSA
/etc/init.d/dataeng restart
- Edition du fichier <path>/etc/default/snmpd</path> pour virer
-I -smux - Edition du fichier /etc/snmp/snmpd.conf
com2sec local localhost public com2sec local 127.0.0.1 public com2sec local 192.168.0.0/24 public group MyRWGroup v1 local group MyRWGroup v2c local group MyRWGroup usm local view all included .1 80 access MyRWGroup "" any noauth exact all all none syslocation B2PWeb syscontact srs@b2pweb.com sysName virt2.b2pweb.com pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat extend .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro # Allow Systems Management Data Engine SNMP to connect to snmpd using SMUX smuxpeer .1.3.6.1.4.1.674.10892.1
test
snmpwalk -v2c -c public localhost 1.3.6.1.4.1.674.10893
Megacli
echo 'deb http://hwraid.le-vert.net/debian wheezy main' > /etc/apt/sources.list.d/hwraid.sources.list
wget -O - http://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | apt-key add -
aptitude update
aptitude install megacli
x2go
apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E
cat << 'EOF' >> /etc/apt/sources.list.d/x2go.list
# X2Go Repository
deb http://packages.x2go.org/debian wheezy main
# X2Go Repository (sources)
deb-src http://packages.x2go.org/debian wheezy main
EOF
aptitude update
aptitude install x2goserver gnome-session
!!! Désactivation de sfcbd update-rc.d sfcb disable
OCS Inventory
aptitude install ocsinventory-agent
choisir http et mettre http://in.b2pweb.com/ocsinventory comme serveur
echo 'tag=Serveurs_LAN' >> /etc/ocsinventory/ocsinventory-agent.cfg
NRPE pour Nagios
aptitude install nagios-nrpe-server nagios-plugins
ajout du réseau local dans le fichier /etc/nagios/nrpe.cfg
allowed_hosts=127.0.0.1,192.168.0.0/24 dont_blame_nrpe=1
Paquet nagios-plugins-b2pweb
wget -O - http://koji.b2pweb.com/repos/debian/DEB-GPG-KEY-B2PWEB-ALL
echo 'deb http://koji.b2pweb.com/repos/debian wheezy main' >> /etc/apt/sources.list
aptitude update && aptitude install nagios-plugins-b2pweb
On redémarre le service NRPE
service nagios-nrpe-server restart
Réseau
cat << EOF > /etc/network/interfaces
- This file describes the network interfaces available on your system
- and how to activate them. For more information, see interfaces(5).
- The loopback network interface
auto lo iface lo inet loopback
auto br0 iface br0 inet dhcp
bridge_ports eth0
EOF
reboot
aptitude install libvirt-bin virt-manager
dpkg-reconfigure dash
echo 'cgroup /dev/cgroup cgroup defaults 0 0' >> /etc/fstab echo '192.168.0.89:/opt/vbox/vbox2 /mnt/backup nfs defaults,noatime,rw,hard 0 0' >> /etc/fstab mkdir /mnt/backup mkdir /dev/cgroup mount -a
- ↑ tuto prevenant de http://blog.brachium-system.net/archives/70-Debian-Dell-OMSA-SNMP.html