Koozali.org: home of the SME Server

[ANNOUNCE] Update script for 6.0.1-01 for testing

Offline gregswallow

  • *
  • 651
  • +1/-0
[ANNOUNCE] Update script for 6.0.1-01 for testing
« on: September 20, 2004, 06:53:14 PM »
NOTE: There is a newer version of this script here:
http://forums.contribs.org/index.php?topic=24285.0

[ANNOUNCE] Update script for 6.0.1-01 for testing

By Greg Swallow (greg_at_skynetbc.com)


Just thought I would share this.  It's just two sh scripts I made to download and install some of the contribs and howto's others have made available.  Nothing is new except for the bit that updates Apache to 1.3.31-5 with the 'norlug' rpm.  That was my only add-on, everything else is others work. Thanks everyone!

I don't have too much spare time to get involved with development of the SME Server, but I think something like this would be good so that beta-testers of the next version could install all of the proposed contributions on top of a clean 6.0.1-01 install.  Then everyone will be testing exactly the same setup.  Someone just needs to decide what is going to be updated/included in the next version...

So here are the two scripts.  I'd suggest running the downloads.sh script twice.  The second time it should only take half a second as it won't download the files twice.  If you see any file not found errors, then maybe figure out another place to download that file from, as ***you really don't want to run the updates script if you are missing any files***.  Once you have all the files you can run the update script.  Everything installs cleanly for me, but I haven't tested this much.  

What's included: (Again, thanks to everyone who contributed to these - Updated Sept. 22 - links to sources added)
PHP 4.3.8
http://forums.contribs.org/index.php?topic=23270.0
http://forums.contribs.org/index.php?topic=23301.0

phpmyadmin-2.6.0-7
http://forums.contribs.org/index.php?topic=23242.msg92492#msg92492

Zlib 1.2.1.1-4
Proftpd 1.2.10-es1
fetchmail 6.2.5-1
rsync 2.6.2-1
gnupg 1.2.4-0_19
openssh 3.9p1-1es1
openssl 0.96m-1es1
http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/

imp 3.2.5-01dm (and associated updates)
http://no.longer.valid/mylinks/singlelink.php?cid=117&lid=416

apache 1.3.31-5 (required compat-glibc, db4, python2.3)
mod_ssl 2.8.19-1
(no howto/contrib available - not extensivly tested)

mysql 4.0.21-0
http://forums.contribs.org/index.php?topic=23920.0

spamfilter add-on panel
http://sme.swerts-knudsen.dk/howtos/howto_29.htm

double-bounce deletion howto
http://sme.swerts-knudsen.dk/howtos/howto_27.htm

Downloads.sh (Updated Sept 22. NOTE - the wget commands should each be on one line - be careful when copying and pasting)
Code: [Select]

#!/bin/sh
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/SpamFilter/spamfilter_install.sh
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/PHP/php4.3.8-upgrade.sh
mkdir updates
cd updates
wget -nc --tries=0 http://mirror.contribs.org/smeserver/contribs/nightspirit/e-smith-phpmyadmin/e-smith-phpmyadmin-2.6.0-7.noarch.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/zlib-1.2.1.1-4.i386.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/proftpd-1.2.10-es1.i386.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/fetchmail-6.2.5-1.i386.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/Rsync/rsync-2.6.2-1.noarch.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/GnuPG/gnupg-1.2.4-0_19.rh7.3.at.i386.rpm
cd ..
mkdir ssh
cd ssh
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/OpenSSH/openssh-3.9p1-1es1.i386.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/OpenSSH/openssh-clients-3.9p1-1es1.i386.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/OpenSSH/openssh-server-3.9p1-1es1.i386.rpm
cd ..
mkdir ssl
cd ssl
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/OpenSSL/openssl-0.9.6m-1es1.i386.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/OpenSSL/openssl-devel-0.9.6m-1es1.i386.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/OpenSSL/openssl-perl-0.9.6m-1es1.i386.rpm
cd ..
mkdir webmail
cd webmail
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/WebMail/e-smith-imp-1.10.0-04dm.noarch.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/WebMail/e-smith-kronolith-0.8.1-02.noarch.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/WebMail/e-smith-mnemo-0.8.0-04.noarch.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/WebMail/e-smith-nag-0.8.0-05.noarch.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/WebMail/horde-2.2.5-1dm.noarch.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/WebMail/imp-3.2.5-01dm.noarch.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/WebMail/kronolith-1.1.2-1es.noarch.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/WebMail/mnemo-1.1.2-1es.noarch.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/WebMail/nag-1.1.1-1es.noarch.rpm
wget -nc --tries=0 http://sme.swerts-knudsen.dk/downloads/Updates/6.0.1/WebMail/turba-1.2.2-1es00.noarch.rpm
cd ..
mkdir apache
cd apache
wget -nc --tries=0 ftp://mirrors.kernel.org/redhat/redhat/linux/7.3/en/os/i386/RedHat/RPMS/compat-glibc-6.2-2.1.3.2.i386.rpm
wget -nc --tries=0 ftp://ftp.pbone.net/mirror/norlug.org/redhat-7.3/RPMS/db4-4.0.14-4.norlug.i386.rpm
wget -nc --tries=0 ftp://ftp.pbone.net/mirror/norlug.org/redhat-7.3/RPMS/python2.3-2.3.4-2.norlug.i386.rpm
wget -nc --tries=0 ftp://ftp.pbone.net/mirror/norlug.org/redhat-7.3/RPMS/mod_ssl-2.8.19-1.norlug.i386.rpm
wget -nc --tries=0 ftp://ftp.pbone.net/mirror/norlug.org/redhat-7.3/RPMS/apache-1.3.31-5.norlug.i386.rpm
wget -nc --tries=0 ftp://ftp.pbone.net/mirror/norlug.org/redhat-7.3/RPMS/apache-devel-1.3.31-5.norlug.i386.rpm
wget -nc --tries=0 ftp://ftp.pbone.net/mirror/norlug.org/redhat-7.3/RPMS/apache-manual-1.3.31-5.norlug.i386.rpm
cd ..
mkdir mysql
cd mysql
wget -nc --tries=0 http://mysql.mirror.cygnal.ca/Downloads/MySQL-4.0/MySQL-server-4.0.21-0.i386.rpm
wget -nc --tries=0 http://mysql.mirror.cygnal.ca/Downloads/MySQL-4.0/MySQL-client-4.0.21-0.i386.rpm
wget -nc --tries=0 http://mysql.mirror.cygnal.ca/Downloads/MySQL-4.0/MySQL-devel-4.0.21-0.i386.rpm
wget -nc --tries=0 http://mysql.mirrored.ca/Downloads/MySQL-4.0/MySQL-shared-compat-4.0.21-0.i386.rpm
cd ..


Updates.sh
Code: [Select]

#!/bin/sh
sh spamfilter_install.sh

mkdir -p /etc/e-smith/templates-custom/var/qmail/alias/
touch /etc/e-smith/templates-custom/var/qmail/alias/.qmail-oblivion
echo "#" > /etc/e-smith/templates-custom/var/qmail/alias/.qmail-oblivion
mkdir -p /etc/e-smith/templates-custom/var/qmail/control/
touch /etc/e-smith/templates-custom/var/qmail/control/doublebounceto
echo "oblivion" > /etc/e-smith/templates-custom/var/qmail/control/doublebounceto
/sbin/e-smith/expand-template /var/qmail/alias/.qmail-oblivion
/sbin/e-smith/expand-template /var/qmail/control/doublebounceto
service qmail restart

sh php4.3.8-upgrade.sh

cd ssh
rpm -Uvh *.rpm
cd ..

cd ssl
rpm -Uvh *.rpm
cd ..

cd webmail
rpm -Uvh e-smith-imp-1.10.0-04dm.noarch.rpm
rpm -Uvh imp-3.2.5-01dm.noarch.rpm
rpm -Uvh horde-2.2.5-1dm.noarch.rpm
rpm -Uvh turba-1.2.2-1es00.noarch.rpm
rpm -Uvh kronolith-1.1.2-1es.noarch.rpm
rpm -Uvh mnemo-1.1.2-1es.noarch.rpm
rpm -Uvh nag-1.1.1-1es.noarch.rpm
rpm -Uvh e-smith-kronolith-0.8.1-02.noarch.rpm
rpm -Uvh e-smith-mnemo-0.8.0-04.noarch.rpm
rpm -Uvh e-smith-nag-0.8.0-05.noarch.rpm
/sbin/e-smith/signal-event post-upgrade
cd ..


cd apache
rpm -Uvh compat-glibc-6.2-2.1.3.2.i386.rpm
rpm -Uvh db4-4.0.14-4.norlug.i386.rpm
rpm -Uvh python2.3-2.3.4-2.norlug.i386.rpm
rpm -Uvh apache-*.rpm
rpm -Uvh mod_ssl-2.8.19-1.norlug.i386.rpm
cd ..

cd mysql
service mysqld stop
rpm -e --nodeps mysql mysql-client mysql-server
rpm -e mysql-devel
rpm -e mysqlclient9
rpm -Uvh MySQL-*.rpm
chkconfig --levels 2345 mysql on
mv /etc/rc.d/init.d/mysql /etc/rc.d/init.d/mysqld
rm /etc/rc.d/rc7.d/S90mysqld
ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc7.d/S90mysqld
/sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
/sbin/e-smith/expand-template /root/.my.cnf
ln -s /usr/sbin/mysqld /usr/libexec/
service mysqld restart
/usr/bin/mysql_fix_privilege_tables
cd ..

cd updates
rpm -Uvh *.rpm
cd ..


Probably a good idea to do a reboot after that.  I think one of the contribs called for that, but I didn't put it in the script.

Offline gregswallow

  • *
  • 651
  • +1/-0
[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #1 on: September 21, 2004, 07:19:36 PM »
FYI, after these updates Rootkit Hunter doesn't show any security vulnerabilities anymore.

I think this is a good way to do updates for contribs/howto's.  If the author puts up the .sh script rather than a step by step description of do this/do that then its easier for people to try it out.

Please post any comments here.  Thanks.

Offline nefkho

  • ****
  • 183
  • +0/-0
    • http://www.cagothonglines.com
problem!
« Reply #2 on: September 22, 2004, 08:56:14 AM »
hi,

tried copying the script and run it but this is wat i get on all wget command.. any idea?

Try wget --help' for more options.
./download.sh: http://sme.swerts-knudsen.dk/downloads/SpamFilter/spamfilter_install.sh: No such file or directory
wget: missing URL
Usage: wget [OPTION]... [URL]...
Nef Kho  :-) .........

ricrjhl

Re: problem!
« Reply #3 on: September 22, 2004, 04:06:45 PM »
Quote from: "nefkho"
hi,

tried copying the script and run it but this is wat i get on all wget command.. any idea?

Try wget --help' for more options.
./download.sh: http://sme.swerts-knudsen.dk/downloads/SpamFilter/spamfilter_install.sh: No such file or directory
wget: missing URL
Usage: wget [OPTION]... [URL]...


The solution is very simple. When you look at the script as it is being displayed here in the forum you see that wget and the url are on seperate lines which is wrong. Remove at every wget the extra return such that the wget and the url are on a single line. Try again and it should work.

Richard.

ricrjhl

Warning/question
« Reply #4 on: September 22, 2004, 04:13:32 PM »
Hi,

I tried the updates as shown above and it all went without any problem with one acception. The webmail part was not completely successful. When I tryed to use webmail afterwards the displaying of the messages was completely garbled/wrong. The Calendar and memo part work ok. To be able to read webmail messages again I had to switch back to the old/previous situation of webmail.

Any solution to get this new webmail version working without the garbled display of e-mails ?

Richard

Offline gregswallow

  • *
  • 651
  • +1/-0
[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #5 on: September 22, 2004, 08:15:50 PM »
Sorry, I should have posted the sources for each of the rpm's in the script.  The webmail upgrade is based on instructions found here:  (It called for a reboot after that, so maybe try that if you haven't already)
http://no.longer.valid/mylinks/singlelink.php?cid=117&lid=416

Or maybe double check you got all the files.  It seems the code doesn't copy and paste very well.

Greg

Offline azche24

  • *
  • 163
  • +0/-0
    • http://az-law.de
Fine Update Script
« Reply #6 on: September 23, 2004, 08:04:51 AM »
Hi,

I applied your script at 2 Servers. After removing the CR s with dos2unix.exe and after rebooting the servers it went fine. All packages -even those which i updated manually before- behave as they should.

But: My Putty (SSH login) to the server no longer works. Must have something to do with the new *.ssh files.

How can i fix that?
Alexander Ziemann, Berlin - DE

frank3427

[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #7 on: September 23, 2004, 11:46:25 AM »
I just ran your scripts abd they have worked great, thanks for the good work. this was painless.

frank

mbachmann

[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #8 on: September 23, 2004, 12:45:09 PM »
Nice, thank you gregswallow. I'll torture a testmachine with it later on.

Copying the script in an Editor wich is capable to do DOS->UNIX conversions (like Ultraedit) will save you from the CR/LF problem.

Offline gregswallow

  • *
  • 651
  • +1/-0
Re: Fine Update Script
« Reply #9 on: September 23, 2004, 06:23:35 PM »
Quote from: "azche24"
Hi,

I applied your script at 2 Servers. After removing the CR s with dos2unix.exe and after rebooting the servers it went fine. All packages -even those which i updated manually before- behave as they should.

But: My Putty (SSH login) to the server no longer works. Must have something to do with the new *.ssh files.

How can i fix that?


First check that SSH login is turned on in the remote access - server manager panel.  On a new installation it is turned off by default.  I noticed when running Rootkit Hunter it said only SSH2 is enabled.  Probably the updated versions don't allow the SSH 1.X protocol anymore.  If it's still not working let me know.

Greg Swallow

Offline azche24

  • *
  • 163
  • +0/-0
    • http://az-law.de
Re: Fine Update Script
« Reply #10 on: September 23, 2004, 08:05:19 PM »
Quote from: "gregswallow"
First check that SSH login is turned on in the remote access - server manager panel.  On a new installation it is turned off by default.  I noticed when running Rootkit Hunter it said only SSH2 is enabled.  Probably the updated versions don't allow the SSH 1.X protocol anymore.  If it's still not working let me know.

Greg Swallow


SSH (from local network) is enabled in Server Manager. Putty is refused even if using SSH V 2.x ...
Alexander Ziemann, Berlin - DE

Offline gregswallow

  • *
  • 651
  • +1/-0
Re: Fine Update Script
« Reply #11 on: September 23, 2004, 11:21:17 PM »
Quote from: "azche24"
SSH (from local network) is enabled in Server Manager. Putty is refused even if using SSH V 2.x ...


Sorry, I can't duplicate your problem.  I just reinstalled a fresh copy of 6.01-01 on my test server, downloaded and installed these updates, rebooted, changed the SSH remote access settings to "Allow from local networks" and "Allow administrative command line access", downloaded putty .55, and it works for me.  I didn't have to change any settings in Putty.  

Greg

Offline gregswallow

  • *
  • 651
  • +1/-0
Re: Warning/question
« Reply #12 on: September 23, 2004, 11:26:48 PM »
Quote from: "ricrjhl"
Any solution to get this new webmail version working without the garbled display of e-mails ?

Richard


I don't have this problem either.  Other than what I just described doing above I enabled HTTPS Webmail and sent a message to myself - worked fine.  The 3.2.5 webmail contrib I have even applied to our 'production' server a few weekes ago without any problem so far.

Greg.

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #13 on: September 25, 2004, 03:38:07 PM »
Greg,

Thanks for putting this script together.  I have ran it now 4 times.  I keep getting these messages when it gets to the mysql upgrade:

If you get 'Access denied' errors, you should run this script again
and give the MySQL root user password as an argument!
Converting all privilege tables to MyISAM format
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

If your tables are already up to date or partially up to date you will
get some warnings about 'Duplicated column name'. You can safely ignore these!
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Creating Grant Alter and Index privileges if they don't exists
You can ignore any Duplicate column errors
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Adding columns needed by GRANT .. REQUIRE (openssl)
You can ignore any Duplicate column errors
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Creating the new table and column privilege tables
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Changing name of columns_priv.Type -> columns_priv.Column_priv
You can ignore any Unknown column errors from this
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Fixing the func table
You can ignore any Duplicate column errors
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Adding new fields used by MySQL 4.0.2 to the privilege tables
You can ignore any Duplicate column errors
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I read the original howto post by shared media, and it states the upgrade should give no errors.  Does any know why I am receiving the above errors?

Thanks,

JB
......

organetic

I keep getting the same errors described above...
« Reply #14 on: September 26, 2004, 03:26:30 PM »
Just did a fresh install of SME 6.0.1 and tried to run the update script.

I keep getting "Can't connect to local MySQL Server through socket /var/lib/mysql/mysql.sock"

Any idea of what can be happening?

Thanks for the script anyway!

Best regards,
Organetic

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #15 on: September 26, 2004, 05:34:56 PM »
I seem to have solved my problem from above and this may help you organic.  In the script where it does a service mysqld restart, change it to service mysqld start.  Once I changed this, the upgrade works fine for me every time.

YMMV,

JB
......

cyberdude

[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #16 on: September 26, 2004, 06:30:39 PM »
hi there!

Thees 2 files can they be downloaded somwhere ?
or is it just copy/paste the text......?

I have a sme 6.0 production server running - is it safly to install it on this maschine ??

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #17 on: September 26, 2004, 10:54:36 PM »
I just opened pico and copy and pasted the scripts to a file.
......

Offline Mjohnson

  • *
  • 172
  • +0/-0
[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #18 on: September 27, 2004, 05:06:21 AM »
Thanks Greg....

Your efforts are appreciated.  The scripts went in without a hitch.  I rebooted to get WebMail up and running.  I did remove the portion of the script to update the SpamAssassin panel as I had already updated that.  It is all working very well.

The users are happy....  The admin is happy....   It just doesn't get better than this!!

 :pint:
......

Offline gregswallow

  • *
  • 651
  • +1/-0
[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #19 on: September 27, 2004, 07:53:40 PM »
If you are having any problems with mysql, I would first try to reboot and see if the problems are fixed.  The author of that contrib recommends it.  His original post on the topic of that part of this script is here: http://forums.contribs.org/index.php?topic=23920.0

By all means if you can install that by itself and something doesn't work with all the rest of these updates then please let me know.  By the way, I also get some feedback (I dont think it is errors) when it gets to the 'fix_privelege_tables' bit, but everything seems to work fine for me.

I am just working on a updated version of the whole script, and I will put it up on a new forum thread.

Greg

Offline gregswallow

  • *
  • 651
  • +1/-0
[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #20 on: September 27, 2004, 08:16:42 PM »
Quote from: "cyberdude"

Thees 2 files can they be downloaded somwhere ?
or is it just copy/paste the text......?

I put up the text so people can see exactly what is there and edit them if they'd like.

Quote from: "cyberdude"

I have a sme 6.0 production server running - is it safly to install it on this maschine ??

I wouldn't - I'd do one thing at a time on a production machine - and only after testing it on another.

Offline gregswallow

  • *
  • 651
  • +1/-0
[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #21 on: September 27, 2004, 08:17:25 PM »
I have updated this and added a few more things.  Rather than making this thread longer, I posted it to a new one here:
http://forums.contribs.org/index.php?topic=24285.0

mbachmann

[ANNOUNCE] Update script for 6.0.1-01 for testing
« Reply #22 on: October 01, 2004, 10:36:04 AM »
Test machine upd. worked after some glitches, bravo  Greg.

I usually apply isoqlog contrib and cups.