Cette page présente les étapes pour créer un CT OpenVZ. . {{{#!shell mount /vz/private/201 mount /vz/private/201/var mount /vz/private/201/var/log debootstrap --arch=amd64 squeeze /vz/private/201/ http://mirror.vn.refer.org/debian/archive/ cd /vz/private/201 }}} * `vi etc/hostname` : {{{ sogo }}} * `vi etc/hosts` : {{{ 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 210.245.61.201 sogo.vn.auf.org sogo }}} * `vi etc/resolv.conf` : {{{ domain vn.auf.org search vn.auf.org nameserver 210.245.61.205 }}} * `vi etc/network/interfaces` : {{{ auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 210.245.61.201 netmask 255.255.255.240 network 210.245.61.192 broadcast 210.245.61.207 gateway 210.245.61.206 }}} * on prépare le démarrage du CT : {{{ umount /vz/private/201/var/log umount /vz/private/201/var cd vzctl set 201 --name sogo --save vzctl start sogo vzctl enter sogo su - dpkg-reconfigure tzdata }}} * `vi etc/apt/sources.list` : {{{ deb http://mirror.vn.refer.org/debian/archive squeeze main contrib non-free deb http://mirror.vn.refer.org/debian/archive squeeze-updates main contrib non-free deb http://mirror.vn.refer.org/debian/security squeeze/updates main contrib non-free deb http://apt.auf.org/ squeeze auf }}} * {{{ aptitude update aptitude install --allow-untrusted auf-keyring aptitude update aptitude install locales less screen sudo vim vim-tiny_ nano_ dpkg-reconfigure locales # fr_FR.UTF-8 vi_VN lo_LA km_KH echo syntax on >> /etc/vim/vimrc.local aptitude install --without-recommends exim4 ssh }}} * `vi /etc/exim4/update-exim4.conf.conf` : {{{ dc_eximconfig_configtype='satellite' dc_other_hostnames='' dc_local_interfaces='' dc_readhost='vn.auf.org' dc_relay_domains='' dc_minimaldns='false' dc_relay_nets='' dc_smarthost='smtp.vn.auf.org' CFILEMODE='644' dc_use_split_config='false' dc_hide_mailname='true' dc_mailname_in_oh='true' dc_localdelivery='mail_spool' }}} * {{{ update-exim4.conf sed -i "/^QUEUERUNNER=/s/=.*$/='queueonly'/" /etc/default/exim4 echo "root: un-alias-de-contact@vn.auf.org" >> /etc/aliases newaliases service exim4 restart }}} * ajouter à `/etc/ssh/sshd_config` : {{{ PermitRootLogin without-password AllowGroups ssh UseDNS no }}} * {{{ adduser root ssh service ssh restart sed -i '/getty/s/^/#/' /etc/inittab telinit q sed -i '/imklog/s/^/#/' /etc/rsyslog.conf service rsyslog reload ln -nfs /proc/mounts /etc/mtab }}}