Difference between revisions of "SME on CentOS 6"

From SME Server
Jump to navigationJump to search
Line 1: Line 1:
 
{{Level|Developer}}
 
{{Level|Developer}}
  
== SME 9, based on CentOS 6 ==
 
  
{{Note box|[from John Crisp]
+
{{Note box|Do NOT try this on anything other than a Virtual Machine, or a test machine.}}
  
These are my own attempts. I am not qualified to do this. Do NOT try it on anything other than a Virtual Machine, or a test machine.<br />}}
+
== SME 9, based on CentOS 6 ==
  
{{Note box| 20/01/2013 Daniel at Firewall Services has managed to get a booting CentOS 6 with the SME packages installed. He should be adding his notes here soon.
+
=== Prerequisites ===
 +
* VIrtual machine (Vmware, Parallels or Virtualbox)
 +
* Centos Minimal 64-bit architecture. 32-bit may follow later
 +
* Access to EPEL, RPMForge and ATrpms repositories
  
Some Gotchas :
+
=== Current status ===
 +
* Identify all SME Server specific packages (John C.) See notes below.
 +
* Setting up a RPM building environment (Ian W.)
 +
* booting CentOS 6 with the SME packages installed. (Daniel)
 +
* Notes:
 +
** Some RPMs need to be got from EPEL, RPMForge and ATrpms
 +
** Needs a hack in yum-priority.conf
 +
** selinux-policy-targeted and authconfig need to be removed
 +
** You have to completely disable SELinux in /etc/sysconfig/selinux
 +
** LOTS of things are broken, but then that's no great surprise.
 +
** If we have a booting system we can start to look at fixing it.
 +
** nke has been playing on 32 bit as well - I guess it will probably be worth replicating from 64 to 32 to see what happens.
  
Some RPMs need to be got from EPEL, RPMForge and ATrpms
 
  
Needs a hack in yum-priority.conf
+
There are two paths that I can see to testing this:
 
 
selinux-policy-targeted and authconfig need to be removed
 
 
 
(I found I had to disable selinux myself)
 
 
 
You have to completely disable it in /etc/sysconfig/selinux
 
 
 
LOTS of things are broken, but then that's no great surprise.
 
 
 
If we have a booting system we can start to look at fixing it.
 
 
 
nke has been playing on 32 bit as well - I guess it will probably be worth replicating from 64 to 32 to see what happens.
 
 
 
}}
 
  
These are some notes on my attempts at installing SME on CentOS 6.  
+
1. Install CentOS 6 Minimal and try to add the equivalent 6 packages and see what is missing.
  
There are two paths that I can see to testing this:
 
 
1. Install CentOS 6 Minimal and try to add the equivalent 6 packages and see what is missing.<br />
 
 
2. Install CentOS 6 Minimal and then try to add existing SME v8 (el5) packages
 
2. Install CentOS 6 Minimal and then try to add existing SME v8 (el5) packages
  
I decided to try Route 1 first.
+
This how-to takes on route 1.
 
 
I did the following using a Virtualbox VM for expediency allowing me to revert changes easily if I needed too.
 
  
 
== Installing CentOS 6 minimal ==
 
== Installing CentOS 6 minimal ==
 
 
First a few notes on CentOS 6 minimal, which is a bare bones install with very little on board. You can download a copy from one of the CentOS mirrors [http://www.centos.org/modules/tinycontent/index.php?id=30 here]
 
First a few notes on CentOS 6 minimal, which is a bare bones install with very little on board. You can download a copy from one of the CentOS mirrors [http://www.centos.org/modules/tinycontent/index.php?id=30 here]
  
Line 51: Line 43:
 
* Make regular snapshots of your Virtual Machine and describe them specifically. At least when you've reached an important milestone for yourself
 
* Make regular snapshots of your Virtual Machine and describe them specifically. At least when you've reached an important milestone for yourself
  
{{Note box|We need to decide on 32 or 64 arch - in this instance I decided to go with 64 bit as that seems to the future}}
 
  
 
=== Enable networking ===
 
=== Enable networking ===
Line 212: Line 203:
  
 
* [http://wiki.contribs.org/Package_Modification Simple Package Modification from our wiki]
 
* [http://wiki.contribs.org/Package_Modification Simple Package Modification from our wiki]
 +
* http://wiki.contribs.org/Setting_up_RPM_Building_for_SME_Server Building using Mock]
 
* [http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment On the CentOS wiki]
 
* [http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment On the CentOS wiki]
 
* [http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/index.html From the Fedora project]
 
* [http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/index.html From the Fedora project]

Revision as of 12:23, 21 January 2013

PythonIcon.png Skill level: Developer
Risk of inconsistencies with Koozali SME Server methodology, upgrades & functionality is high. One must be knowledgeable about how changes impact their Koozali SME Server. Significant risk of irreversible harm.



Important.png Note:
Do NOT try this on anything other than a Virtual Machine, or a test machine.


SME 9, based on CentOS 6

Prerequisites

  • VIrtual machine (Vmware, Parallels or Virtualbox)
  • Centos Minimal 64-bit architecture. 32-bit may follow later
  • Access to EPEL, RPMForge and ATrpms repositories

Current status

  • Identify all SME Server specific packages (John C.) See notes below.
  • Setting up a RPM building environment (Ian W.)
  • booting CentOS 6 with the SME packages installed. (Daniel)
  • Notes:
    • Some RPMs need to be got from EPEL, RPMForge and ATrpms
    • Needs a hack in yum-priority.conf
    • selinux-policy-targeted and authconfig need to be removed
    • You have to completely disable SELinux in /etc/sysconfig/selinux
    • LOTS of things are broken, but then that's no great surprise.
    • If we have a booting system we can start to look at fixing it.
    • nke has been playing on 32 bit as well - I guess it will probably be worth replicating from 64 to 32 to see what happens.


There are two paths that I can see to testing this:

1. Install CentOS 6 Minimal and try to add the equivalent 6 packages and see what is missing.

2. Install CentOS 6 Minimal and then try to add existing SME v8 (el5) packages

This how-to takes on route 1.

Installing CentOS 6 minimal

First a few notes on CentOS 6 minimal, which is a bare bones install with very little on board. You can download a copy from one of the CentOS mirrors here

  • As per above note, only use Virtual Machine for testing purposes. A good free VM package can be obtained here
  • You might want to note down as much as possible so you yourself and others can reproduce the actions
  • Don't use yum with the '-y' flag (install/upgrade without further user interaction) when using the yum install/upgrade commands. (beware copy/paste yum commands)
  • you might want to note down all packages listed by yum to be installed/upgraded AND their dependencies
  • When you are using 64-bit, please add '--exlcude=*86' at the end of the yum command line. This will prevent i386/i686 packages to be installed as 'required' dependencies
  • Make regular snapshots of your Virtual Machine and describe them specifically. At least when you've reached an important milestone for yourself


Enable networking

Each boot you have to start the network etc etc. I decided it was better with the minimal install and touch as little as possible - if I could then get SME packages installed I could then use that to configure networking later.

To start the networking

./etc/sysconfig/network-scripts/ifup-eth eth0

or

dhclient eth0

or if you want to assign a IP address yourself.

ifconfig eth0 192.168.1.2
echo "nameserver 192.168.1.254" >> /etc/resolv.conf
route add default gw 192.168.1.254 eth0

To make your changes permanent you will need to edit the configuration file to make it active on boot. There is only the vi text editor, you can also install nano.

yum install nano
nano /etc/sysconfig/network-scripts/ifcfg-eth0
and set ONBOOT=”YES”

For the current purposes I decided to start manually each time so I that left the base settings as untouched as possible.

Enable SSH

On first run make sure we have ssh installed so we can use a terminal to login - much easier for copy and pasting stuff :

yum install open-ssh*

To get to the sshd service you will need this on each boot :

service iptables stop
service sshd start

SME Server specific/required packages

To get a list of all specific SME Server packages you can run:

rpm -qa | grep 'smeserver\|e-smith'| sed -e 's/-[0-9].*//'|sort > smeserver-packages.txt


SME Server specific/required perl packages

I decided to attack perl first as the SME stuff is written in it.

Here is a list of perl files from v8 and their equivalent in CentOS 6 if available....

To get a list of the file names in v8 either do (all file starting with the string 'perl'):

rpm -qa --qf '%{NAME}\n' name=perl\*

(Thanks Shad !)

or as per suggestion on the lists (All files containing the string 'perl')

rpm -qa | grep perl | sed -e 's/-[0-9].*//'

(Thanks Gordon !)

To get a alphabetically sorted list (which is easier to compare lists) add '|sort' to the commands above.

rpm -qa --qf '%{NAME}\n' name=perl\*|sort
rpm -qa | grep perl | sed -e 's/-[0-9].*//'|sort

To export the list to a plain text file you could do:

rpm -qa | grep perl | sed -e 's/-[0-9].*//'|sort > perl-list.txt

(Thanks HF !)


Important.png Note:
Which command will be the de facto standard to use so we are all talking about the same list??


This is the output of the non-GREP variant:

perl-Digest-SHA	Y
perl	Y
perl-Archive-Tar	Y
perl-Authen-PAM	******
perl-Authen-SASL	Y
perl-BSD-Resource	******
perl-CGI-FormMagick	******
perl-CGI-Persistent	******
perl-Class-ParamParser	******
perl-Clone	Y
perl-Compress-Raw-Bzip2	Y
perl-Compress-Raw-Zlib	        Y
perl-Compress-Zlib	     Y
perl-Convert-ASN1	    Y
perl-Convert-BinHex	Y
perl-Convert-TNEF	******
perl-Crypt-Cracklib	******
perl-Crypt-OpenSSL-Bignum	Y
perl-Crypt-OpenSSL-Random	Y
perl-Crypt-OpenSSL-RSA	Y
perl-DateManip	Y
perl-DBD-MySQL	Y
perl-DBI	Y
perl-Digest-HMAC	Y
perl-Digest-SHA1	Y
perl-Email-Date-Format	Y
perl-Encode-Detect	Y
perl-Error	Y
perl-File-MMagic	******
perl-Geography-Countries	******
perl-HTML-Parser	Y
perl-HTML-Tabulate	******
perl-HTML-Tagset	Y
perl-I18N-AcceptLanguage	******
perl-IO-Compress-Base	Y
perl-IO-Compress-Bzip2	Y
perl-IO-Compress-Zlib	Y
perl-IO-Socket-INET6	Y
perl-IO-Socket-SSL	Y
perl-IO-stringy	Y
perl-IO-Zlib	Y
perl-IP-Country	******
perl-LDAP	Y
perl-libwww-perl	Y
perl-Locale-gettext	******
perl-Mail-DKIM	Y
perl-Mail-RFC822-Address	******
perl-Mail-SPF	******
perl-MailTools	Y
perl-MIME-Lite	Y
perl-MIME-tools	Y
perl-Net-DNS	Y
perl-Net-Ident	******
perl-Net-IP	Y
perl-Net-IPv4Addr	******
perl-Net-SMTP-SSL	Y
perl-Net-SSLeay	Y
perl-NetAddr-IP	Y
perl-Object-Persistence	******
perl-Package-Constants	Y
perl-Quota	******
perl-Razor-Agent	******
perl-RPM2	******
perl-Socket6	Y
perl-suidperl	Y
perl-Test-Inline	******
perl-Text-Iconv	Y
perl-Text-Template	******
perl-Time-TAI64	******
perl-TimeDate	Y
perl-Unix-ConfigFile	******
perl-URI	Y
perl-version	Y
perl-WWW-Automate	******
perl-XML-NamespaceSupport	Y
perl-XML-Parser	Y
perl-XML-SAX	Y


I am now going to try and lob in the existing/missing el5 versions to see what happens. My guess is we will need to rebuild the required modules.

FormMagick

Next will be an attack on FormMagick - there is no package in the default install so need to figure that out. In may indeed be horrible, but we can live with it for now.

Hopefully with perl and FormMagick installed, most of the SME stuff *should* basically install.


Discussion, help and share

  • Please consult/subscribe to the devs list for more information. devinfo mailinglist and in particular all threads starting with " SME on CentOS 6"
  • There is a IRC channel where people who are interested in this effort 'hang out'. You're most welcome to drop by and/or join. It's free! ;-)
    • You do not have to install anything to pay the channel a visit. All you need is a nice nickname and right click here to open the channel in a new browser window or tab.


Resources and references

Setting up a RPM Building environment under CentOS


Important.png Note:
Setting up a build system using mock should be documented somewhere on the wiki, but where?

http://wiki.contribs.org/Setting_up_RPM_Building_for_SME_Server Ian, if ok, please delete this note.