Changes

Jump to navigation Jump to search
m
Line 25: Line 25:  
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
 
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
 
rpm --import https://fedoraproject.org/static/217521F6.txt
 
rpm --import https://fedoraproject.org/static/217521F6.txt
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
+
# rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
 
rpm --import http://www.salstar.sk/pub/yum/keys/RPM-GPG-KEY-Fedora-Pre-Extras
 
rpm --import http://www.salstar.sk/pub/yum/keys/RPM-GPG-KEY-Fedora-Pre-Extras
 
# rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
 
# rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
Line 83: Line 83:  
....
 
....
 
</pre>
 
</pre>
 +
 +
The RPMs that now stand installed are listed [[Media:CentOS5_Yum_Enabled_RPMs.txt|'''here.''']].
    
== Install screen ==
 
== Install screen ==
 
To enable background updates, screen is installed.
 
To enable background updates, screen is installed.
  yum install screen
+
  yum install screen nano mlocate
 
It is invoked / re-attached with <tt>'''screen -aR scrname'''</tt> and detached from the session with <tt>'''Ctrl-A d'''</tt>.
 
It is invoked / re-attached with <tt>'''screen -aR scrname'''</tt> and detached from the session with <tt>'''Ctrl-A d'''</tt>.
 +
 +
Set '''keepcache=1''' in '''/etc/yum.conf''' to retain the rpms for further use.
 +
 +
Take a backup of the Virtual Machine now before the mess that begins next.
 +
 +
== Install the SME 8 RPMs ==
 +
* Remove all current repos in /etc/yum.repos.d
 +
mkdir /tmp/repo.bak
 +
mv /etc/yum.repos.d/*.repo /tmp/repo.bak/
 +
* Upload '''/etc/yum.repos.d/[[Media:SME8_sme-base.repo.txt|sme_base.repo]]'''
 +
wget http://wiki.contribs.org/images/3/30/SME8_sme-base.repo.txt -O /etc/yum.repos.d/sme-base.repo
 +
* YUM install sme rpms
 +
yum --disablerepo=base,updates,extras upgrade --nogpg
 +
yum install smeserver\* e-smith\* *.sme.* --enablerepo=smeos8,smeupdates8 --nogpgcheck
 +
* 287 MB / 374 RPMs Installed
 +
* SMEServer uses runlevels 7 and 4
 +
rm -f /etc/rc4.d/*
 +
cp -a /etc/rc7.d/* /etc/rc4.d/
 +
* Now get the [[Media:SME8_VZ_PostYUM.txt|'''list''']] of installed RPMs
 +
<pre>
 +
ABC=`rpm -qa`
 +
echo ${ABC} > sme8_rpms_after_yum.txt
 +
ABC=
 +
</pre>
 +
* Some RPMs get removed and others get updated.
 +
* Use a MySQL database to check the differences:
 +
<syntaxhighlight lang="sql">
 +
CREATE DATABASE `rpmmatch`CHARACTER SET latin1 COLLATE latin1_general_ci;
 +
CREATE TABLE `rpmmatch`.`smerpms`( `rpmname` VARCHAR(100) NOT NULL, PRIMARY KEY (`rpmname`) );
 +
CREATE TABLE `rpmmatch`.`c5minrpms`( `rpmname` VARCHAR(100) NOT NULL, PRIMARY KEY (`rpmname`) );
 +
LOAD DATA LOW_PRIORITY LOCAL INFILE 'C:\\smerpms.csv' INTO TABLE `rpmmatch`.`smerpms` FIELDS ESCAPED BY '\\' TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' (`rpmname`);
 +
LOAD DATA LOW_PRIORITY LOCAL INFILE 'C:\\c5minrpms.csv' INTO TABLE `rpmmatch`.`c5minrpms` FIELDS ESCAPED BY '\\' TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' (`rpmname`);
 +
UPDATE c5minrpms SET rpmname=REPLACE(rpmname, ".(none).rpm", "") WHERE 1;
 +
UPDATE smerpms  SET rpmname=REPLACE(rpmname, ".(none).rpm", "") WHERE 1;
 +
SELECT a.* FROM c5minrpms a LEFT JOIN smerpms b USING (rpmname) WHERE b.rpmname IS NULL ORDER BY rpmname;
 +
SELECT a.* FROM smerpms a LEFT JOIN c5minrpms b USING (rpmname) WHERE b.rpmname IS NULL ORDER BY rpmname;
 +
</syntaxhighlight>
 +
* 75 packages difference including 2 kernels not needed
 +
 +
== Install Missing Packages ==
 +
Since networking and sshd will not be working, ssh into the ProxmoxVE host and use '''vzctl enter <VEID>''' to work further. Edit the file /etc/sysconfig/network-scripts/ifcfg-venet0:
 +
<pre>
 +
DEVICE=venet0
 +
BOOTPROTO=static
 +
ONBOOT=yes
 +
IPADDR=127.0.0.1
 +
NETMASK=255.255.255.255
 +
BROADCAST=0.0.0.0
 +
IPV6INIT="yes"
 +
</pre>
 +
to be something like:
 +
<pre>
 +
DEVICE=venet0
 +
BOOTPROTO=static
 +
ONBOOT=yes
 +
IPADDR=192.168.60.110
 +
NETMASK=255.255.255.0
 +
GATEWAY=192.168.60.1
 +
NETWORK=192.168.60.0
 +
BROADCAST=192.168.60.255
 +
IPV6INIT="yes"
 +
</pre>
 +
Restart Networking with:
 +
ifdown venet0 && ifup venet0
 +
 +
Alternatively, the VLANs can be used:
 +
<pre>
 +
# cat /etc/sysconfig/network-scripts/ifcfg-venet0
 +
DEVICE=venet0
 +
BOOTPROTO=static
 +
ONBOOT=yes
 +
IPADDR=127.0.0.1
 +
NETMASK=255.255.255.255
 +
BROADCAST=0.0.0.0
 +
IPV6INIT="yes"
 +
 +
# cat /etc/sysconfig/network-scripts/ifcfg-venet0:0
 +
DEVICE=venet0:0
 +
ONBOOT=yes
 +
IPADDR=192.168.22.107
 +
NETMASK=255.255.255.255
 +
 +
ifdown venet0 && ifup venet0
 +
ifdown venet0:0 && ifup venet0:0
 +
</pre>
 +
 +
Now install the missing packages:
 +
yum install mlocate xz xz-libs \
 +
    zip unzip which vixie-cron vim-enhanced vim-common usbutils traceroute tnef time telnet tcpdump \
 +
    syslinux sysfsutils strace setserial safecat rsync rp-pppoe rpm-build qmail-qfilter \
 +
    pyxf86config perl-suidperl kudzu libgomp lockdev lsof maildrop man minicom mkbootdisk mod_ssl \
 +
    mt-st mutt newt anacron at authconfig bc bind-libs bind-utils cdrecord cyrus-sasl \
 +
    cyrus-sasl-md5 dhclient dhcp diald diald-top distcache dosfstools eject fetchmail ftp \
 +
    gettext glib groff hdparm hesiod iptraf iptstate isdn4k-utils --nogpgcheck
 +
* '''maildrop''' complained of key requirement and hence the '''--nogpgcheck'''
 +
* '''pcmciautils''' is dependent on the '''kernel''' and hence avoided
 +
* Restart the Virtual machine and set the IP again as done earlier (we need to address the VM startup sauce to do this atutmagically):
 +
signal-event post-upgrade; signal-event reboot
 +
 +
== Package Differences ==
 +
One RPM from the pre-installed RPMs in the template remains:
 +
beecrypt-4.1.2-10.1.1.i386.rpm
 +
Two kernels and one kernel dependent RPM were not installed:
 +
kernel-2.6.18-308.4.1.el5.i686.rpm
 +
kernel-2.6.18-348.1.1.el5.i686.rpm
 +
pcmciautils-014-5.i386.rpm
 +
The final list of 574 RPMs and 4 extra keys are [[Media:SME8_RPMs_In_OpenVZ.txt|'''here''']].
 +
 +
== Setting locale ==
 +
=== /usr/bin/locale ===
 +
<pre>
 +
LANG=
 +
LC_CTYPE="POSIX"
 +
LC_NUMERIC="POSIX"
 +
LC_TIME="POSIX"
 +
LC_COLLATE="POSIX"
 +
LC_MONETARY="POSIX"
 +
LC_MESSAGES="POSIX"
 +
LC_PAPER="POSIX"
 +
LC_NAME="POSIX"
 +
LC_ADDRESS="POSIX"
 +
LC_TELEPHONE="POSIX"
 +
LC_MEASUREMENT="POSIX"
 +
LC_IDENTIFICATION="POSIX"
 +
LC_ALL=
 +
</pre>
 +
=== Change the locale ===
 +
<pre>
 +
/usr/bin/localedef -i en_US -f UTF-8 en_US.UTF-8
 +
export LC_ALL=en_US.UTF-8
 +
export LANG=en_US.UTF-8
 +
 +
/usr/bin/locale
 +
</pre>
 +
The new locale is:
 +
<pre>
 +
LANG=en_US.UTF-8
 +
LC_CTYPE="en_US.UTF-8"
 +
LC_NUMERIC="en_US.UTF-8"
 +
LC_TIME="en_US.UTF-8"
 +
LC_COLLATE="en_US.UTF-8"
 +
LC_MONETARY="en_US.UTF-8"
 +
LC_MESSAGES="en_US.UTF-8"
 +
LC_PAPER="en_US.UTF-8"
 +
LC_NAME="en_US.UTF-8"
 +
LC_ADDRESS="en_US.UTF-8"
 +
LC_TELEPHONE="en_US.UTF-8"
 +
LC_MEASUREMENT="en_US.UTF-8"
 +
LC_IDENTIFICATION="en_US.UTF-8"
 +
LC_ALL=en_US.UTF-8
 +
</pre>
 +
 +
== Current State of files ==
 +
===  df ===
 +
<pre>
 +
Filesystem          1K-blocks      Used Available Use% Mounted on
 +
/dev/simfs            8388608  1344356  7044252  17% /
 +
none                    549288        4    549284  1% /dev
 +
</pre>
 +
 +
=== cat /etc/fstab ===
 +
<pre>
 +
#------------------------------------------------------------
 +
# BE CAREFUL WHEN MODIFYING THIS FILE! It is updated automatically
 +
# by the SME server software. A few entries are updated during
 +
# the template processing of the file and white space is removed,
 +
# but otherwise changes to the file are preserved.
 +
# For more information, see http://www.e-smith.org/custom/ and
 +
# the template fragments in /etc/e-smith/templates/etc/fstab/.
 +
#
 +
# copyright (C) 2002 Mitel Networks Corporation
 +
#------------------------------------------------------------
 +
none    /dev/pts        devpts  rw      0 0
 +
</pre>
 +
 +
=== cat /etc/mtab ===
 +
<pre>
 +
/dev/simfs / simfs rw,relatime 0 0
 +
sysfs /sys sysfs rw,relatime 0 0
 +
/proc /proc proc rw,relatime 0 0
 +
none /dev tmpfs rw,relatime,mode=755 0 0
 +
none /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
 +
none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
 +
</pre>
 +
 +
=== /var/lib/modules ===
 +
This folder is empty as no CentOS kernel was installed.
 +
 +
=== dhcpd ===
 +
dhcpd was exiting and respawning itself unable to get an IP. IT hardcoded in OpenVZ on NIC side for server only mode. Shut it down with:
 +
service dhcpd stop
 +
chkconfig dhcpd off
 +
 +
== Errors ==
 +
=== Init Boot Log ===
 +
On startup, the VM emits the following error:
 +
<pre>
 +
Applying Intel CPU microcode update: FATAL:
 +
Could not load /lib/modules/2.6.32-7-pve/modules.dep: No such file or directory
 +
/etc/rc.d/init.d/microcode_ctl: microcode device /dev/cpu/microcode doesn't exist?
 +
Starting system logger: [ OK ]
 +
</pre>
 +
 +
The said package is:
 +
</pre>
 +
rpm -qa | grep -i microcode
 +
microcode_ctl-1.17-3.el5
 +
</pre>
 +
 +
* Removing it would mean the removal of 41 '''smeserver''' and '''e-smith''' rpms which are dependent.
 +
* Ref: [http://forums.fedoraforum.org/showthread.php?t=236507 Forum Post].
 +
* Ref: [http://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-Troubleshooting-Microcode_error_during_guest_boot.html CentOS Docs]
 +
* Hence:
 +
/sbin/service microcode_ctl stop
 +
/sbin/chkconfig --del microcode_ctl
 +
* Copy the /lib/modules/2.6.32-7-pve folder from the host to the guest.
 +
* Initial Boot Log of the VM will show the following error:
 +
<pre>
 +
iscsid is stopped
 +
Starting iSCSI daemon: WARNING: Error inserting libiscsi (/lib/modules/2.6.32-7-pve/kernel/drivers/scsi/libiscsi.ko): Unknown symbol in module, or unknown parameter (see dmesg)
 +
WARNING: Error inserting libiscsi_tcp (/lib/modules/2.6.32-7-pve/kernel/drivers/scsi/libiscsi_tcp.ko): Unknown symbol in module, or unknown parameter (see dmesg)
 +
WARNING: Error inserting mdio (/lib/modules/2.6.32-7-pve/kernel/drivers/net/mdio.ko): Unknown symbol in module, or unknown parameter (see dmesg)
 +
WARNING: Error inserting cxgb3 (/lib/modules/2.6.32-7-pve/kernel/drivers/net/cxgb3/cxgb3.ko): Unknown symbol in module, or unknown parameter (see dmesg)
 +
WARNING: Error inserting libcxgbi (/lib/modules/2.6.32-7-pve/kernel/drivers/scsi/cxgbi/libcxgbi.ko): Unknown symbol in module, or unknown parameter (see dmesg)
 +
FATAL: Error inserting cxgb3i (/lib/modules/2.6.32-7-pve/kernel/drivers/scsi/cxgbi/cxgb3i/cxgb3i.ko): Unknown symbol in module, or unknown parameter (see dmesg)
 +
</pre>
 +
* Remove offending RPM and it's dependancies:
 +
<pre>
 +
# yum remove iscsi-initiator-utils
 +
 +
Removed:
 +
  iscsi-initiator-utils.i386 0:6.2.0.872-16.el5
 +
 +
Dependency Removed:
 +
  mkbootdisk.i386 0:1.5.3-2.1                            mkinitrd.i386 0:5.1.19.6-79.el5
 +
</pre>
 +
 +
== Remove needless services ==
 +
Ref: http://wiki.openvz.org/Physical_to_container
 +
rpm --nodeps -e acpid auditd kudzu netplugd microcode_ctl lvm2_monitor irqbalance ntpd lm_sensors
 +
If it complains with some being not installed like '''auditd netplugd lvm2_monitor ntpd''', then
 +
rpm --nodeps -e acpid kudzu microcode_ctl irqbalance lm_sensors
 +
 +
== Current Status ==
 +
* Networking and sshd works
 +
* Pinging outside works
 +
* yum update works
 +
* '''venet0''' and '''venet0:0''' not recognised inside SMEServer
 +
** Try to take a look at /etc/udev/rules.d/70-persisten-net.rules. Specifically the MAC address [RequestedDeletion ]
 +
* login as '''root''' and type '''console''' and enter the configuration menu
 +
* Can test internet access
 +
* elinks does not browse server-manager
 +
* configuration of server '''fails''' since no network card is recognised as it relies on '''udev'''
 +
* devnodes '''/dev/tun''' is available in the container
 +
 +
[[Category: Howto]] [[Category: Virtualisation‏‎]]

Navigation menu