Koozali.org: home of the SME Server

Looking for HowTo install MySQL 5.x and PHP 5.x

pippin

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #30 on: January 03, 2007, 01:57:37 AM »
Where can i get 7.1 then? the USA mirror is Down

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #31 on: January 03, 2007, 02:22:39 AM »
Content deleted - outdated information.
Regards,
William

IF I give advise.. It's only if it was me....

pippin

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #32 on: January 03, 2007, 02:34:42 AM »
well i only get timeout when i try thats why i said the US mirror is down :D

And the other mirrors that are closer to me havent got the 7.1

Edit i got in with FTP :D But timeout again

Offline Jean-Philippe Pialasse

  • *
  • 2,747
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #33 on: January 03, 2007, 10:22:03 AM »
The mirrors are to be updated due to upload of 7.1 version and upload of rpm to update from 7.0 to 7.1 so wait 2 or 3 more days for propagation.

Thanks to the new plugin for yum update, it chose the fastest (so probably the nearest ) miror to query update, but it may be the last to be propaged. If the miror is being propaged you'll get a lot of break download errors so be patient.

For the How to, unfortunatly it is read only and totaly buggy !

I have a french version that is working for MYSQL 5, but nut not really safe for PHP 5 for the moment (one or two things to check).

The procedure given just above should success

Mathias

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #34 on: February 27, 2007, 02:25:42 PM »
Hello
Unnimillenium, I did  follow your french how to, and I got a problem with PHP5 I guess.
Well I am trying to update the template for httpd.conf after the php5 installation and I got this message :
Code: [Select]

# expand-template /etc/httpd/conf/httpd.conf

WARNING in /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/php-5.0.4-5.centos4.i386.rpm: ERROR: Cannot process template /etc/e-smith/templates-custom//etc/httpd/conf/httpd.conf/php-5.0.4-5.centos4.i386.rpm: Unmatched close brace at line 125
 at /sbin/e-smith/expand-template line 45

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Do not use the old wiki how-to for SME >= 7.1
« Reply #35 on: March 03, 2007, 09:16:27 AM »
The old wiki how-to was only relevent to SME 7.0 and does not provide an easy upgrade path. Actually, till the '5' series become part of the base there is really no 'easy' upgrade path.

I've tested the following in a server-only VM. Server-manager and webmail login were possible after upgrading. This was the only test of success.

If you upgraded SME 7.0 by the old wiki there is a post here on how to downgrade. If you downgrade, I suggest you update to 7.1.1 before upgrading again.

If you upgraded SME 7.1 by the old wiki there is a post here on how to transition from the custom templates to the default templates.

Word of warning. You will be doing a 7.1 to 7.1.1 update. New kernels will get installed. Grub prior to 7.1.1 can revert to an incorrect kernel type (smp/up). If this occurs with a VIA C3 processor your machine will not boot. Updating e-smith-grub prior to starting is recommended.
Code: [Select]
yum update e-smith-grub \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=smeaddons

Code: [Select]
signal-event post-upgrade
signal-event reboot


Bigger word of warning. Using this post is at your risk.

SME 7.1 >> php/mysql to 5 series >> SME 7.1.1

Code: [Select]
db yum_repositories setprop updates Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts
db yum_repositories setprop base Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts
db yum_repositories setprop centosplus Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts,perl*,perl-DBI,httpd,mod_ssl
expand-template /etc/yum.conf

Code: [Select]
yum update php mysql \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=centosplus \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=smeaddons

Code: [Select]
signal-event post-upgrade
signal-event reboot

Code: [Select]
mysql_upgrade
Code: [Select]
cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql \
--force \
--user=root \
--host=localhost \
--database=mysql

Code: [Select]
signal-event post-upgrade
signal-event reboot

If you have transitioned to the default templates this is the start of the 7.1.1 update.
Code: [Select]
rpm -e --nodeps \
smeserver-support \
e-smith-horde \
e-smith-base


At this point some backups will be produced. Either rename them at the end to reuse them or go into a local server console to recreate them.
Code: [Select]
warning: /home/e-smith/db/networks saved as /home/e-smith/db/networks.rpmsave
warning: /home/e-smith/db/hosts saved as /home/e-smith/db/hosts.rpmsave
warning: /home/e-smith/db/domains saved as /home/e-smith/db/domains.rpmsave
warning: /home/e-smith/db/configuration saved as /home/e-smith/db/configuration.rpmsave
warning: /home/e-smith/db/accounts saved as /home/e-smith/db/accounts.rpmsave

These file versions were correct 3-MAR-2007
Code: [Select]
rpm -ivh --nodeps \
http://mirror.contribs.org/smeserver/releases/7/smeupdates/i386/RPMS/smeserver-support-1.6.0-32.el4.sme.noarch.rpm \
http://mirror.contribs.org/smeserver/releases/7/smeupdates/i386/RPMS/e-smith-base-4.18.0-10.el4.sme.noarch.rpm \
http://mirror.contribs.org/smeserver/releases/7/smeupdates/i386/RPMS/e-smith-horde-1.13.0-19.el4.sme.noarch.rpm

Code: [Select]
yum clean all
Code: [Select]
yum update \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=centosplus \
--enablerepo=smeaddons

Answer y to overwrite
Code: [Select]
cp hosts.rpmsave hosts
cp domains.rpmsave domains
cp configuration.rpmsave configuration
cp accounts.rpmsave accounts
cp networks.rpmsave networks

Code: [Select]
signal-event post-upgrade
signal-event reboot


SME 7.1 >> SME 7.1.1 >> php/mysql to 5 series

Code: [Select]
db yum_repositories setprop updates Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts
db yum_repositories setprop base Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts
db yum_repositories setprop centosplus Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts,perl*,perl-DBI,httpd,mod_ssl
expand-template /etc/yum.conf

Code: [Select]
yum update \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=smeaddons

Code: [Select]
signal-event post-upgrade
signal-event reboot

This is the start of the php/mysql upgrade.
Code: [Select]
yum update php mysql \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=centosplus \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=smeaddons

Code: [Select]
signal-event post-upgrade
signal-event reboot

Code: [Select]
mysql_upgrade
Code: [Select]
cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin/mysql \
--force \
--user=root \
--host=localhost \
--database=mysql

Code: [Select]
signal-event post-upgrade
signal-event reboot
Regards,
William

IF I give advise.. It's only if it was me....

jazbokes

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #36 on: March 04, 2007, 03:47:19 PM »
Thanks William for all your assistance and education..

I'm trying to install Alfresco document management and Alfresco-sugarcrm application, but first I have to update php4 to php5

My attempts results the below errors;
though iam able to access server-manager but not webmail..

Upgraded to smeserver 7.2 through test & testupdates repo


[root@sme8dev ~]# mysql_upgrade
Could not find file mysql_fix_privilege_tables.sql
Please use --basedir to specify the directory where MySQL is installed


[root@sme8dev ~]# cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin
/mysql \
> --force \
> --user=root \
> --host=localhost \
> --database=mysql
ERROR 1060 (42S21) at line 22: Duplicate column name 'File_priv'
@hadGrantPriv:=1
1
1
1
ERROR 1060 (42S21) at line 28: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 29: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 30: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 41: Duplicate column name 'ssl_type'
ERROR 1060 (42S21) at line 70: Duplicate column name 'Routine_type'
ERROR 1054 (42S22) at line 94: Unknown column 'Type' in 'columns_priv'
ERROR 1060 (42S21) at line 100: Duplicate column name 'type'
@hadShowDbPriv:=1
1
1
1
ERROR 1060 (42S21) at line 110: Duplicate column name 'Show_db_priv'
ERROR 1060 (42S21) at line 127: Duplicate column name 'max_questions'
ERROR 1060 (42S21) at line 137: Duplicate column name 'Create_tmp_table_priv'
ERROR 1060 (42S21) at line 140: Duplicate column name 'Create_tmp_table_priv'
ERROR 1061 (42000) at line 145: Duplicate key name 'Grantor'
@hadCreateViewPriv:=1
1
1
1
ERROR 1060 (42S21) at line 252: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 253: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 254: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 259: Duplicate column name 'Show_view_priv'
ERROR 1060 (42S21) at line 260: Duplicate column name 'Show_view_priv'
ERROR 1060 (42S21) at line 261: Duplicate column name 'Show_view_priv'
@hadCreateRoutinePriv:=1
1
1
1
ERROR 1060 (42S21) at line 282: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 283: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 284: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 289: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 290: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 291: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 293: Duplicate column name 'Execute_priv'
ERROR 1060 (42S21) at line 294: Duplicate column name 'Execute_priv'
ERROR 1060 (42S21) at line 306: Duplicate column name 'max_user_connections'
@hadCreateUserPriv:=1
1
1
1
ERROR 1060 (42S21) at line 315: Duplicate column name 'Create_user_priv'


Thanks
Jon

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #37 on: March 05, 2007, 07:52:07 AM »
Quote from: "jazbokes"


Upgraded to smeserver 7.2 through test & testupdates repo

I have not tried 7.2 yet.

Quote from: "jazbokes"

[root@sme8dev ~]# mysql_upgrade
Could not find file mysql_fix_privilege_tables.sql
Please use --basedir to specify the directory where MySQL is installed

Try...
Code: [Select]
mysql_upgrade --basedir /usr

Quote from: "jazbokes"


[root@sme8dev ~]# cat /usr/share/mysql/mysql_fix_privilege_tables.sql | /usr/bin
/mysql \
> --force \
> --user=root \
> --host=localhost \
> --database=mysql
ERROR 1060 (42S21) at line 22: Duplicate column name 'File_priv'
@hadGrantPriv:=1
1
1
1
ERROR 1060 (42S21) at line 28: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 29: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 30: Duplicate column name 'Grant_priv'
ERROR 1060 (42S21) at line 41: Duplicate column name 'ssl_type'
ERROR 1060 (42S21) at line 70: Duplicate column name 'Routine_type'
ERROR 1054 (42S22) at line 94: Unknown column 'Type' in 'columns_priv'
ERROR 1060 (42S21) at line 100: Duplicate column name 'type'
@hadShowDbPriv:=1
1
1
1
ERROR 1060 (42S21) at line 110: Duplicate column name 'Show_db_priv'
ERROR 1060 (42S21) at line 127: Duplicate column name 'max_questions'
ERROR 1060 (42S21) at line 137: Duplicate column name 'Create_tmp_table_priv'
ERROR 1060 (42S21) at line 140: Duplicate column name 'Create_tmp_table_priv'
ERROR 1061 (42000) at line 145: Duplicate key name 'Grantor'
@hadCreateViewPriv:=1
1
1
1
ERROR 1060 (42S21) at line 252: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 253: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 254: Duplicate column name 'Create_view_priv'
ERROR 1060 (42S21) at line 259: Duplicate column name 'Show_view_priv'
ERROR 1060 (42S21) at line 260: Duplicate column name 'Show_view_priv'
ERROR 1060 (42S21) at line 261: Duplicate column name 'Show_view_priv'
@hadCreateRoutinePriv:=1
1
1
1
ERROR 1060 (42S21) at line 282: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 283: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 284: Duplicate column name 'Create_routine_priv'
ERROR 1060 (42S21) at line 289: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 290: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 291: Duplicate column name 'Alter_routine_priv'
ERROR 1060 (42S21) at line 293: Duplicate column name 'Execute_priv'
ERROR 1060 (42S21) at line 294: Duplicate column name 'Execute_priv'
ERROR 1060 (42S21) at line 306: Duplicate column name 'max_user_connections'
@hadCreateUserPriv:=1
1
1
1
ERROR 1060 (42S21) at line 315: Duplicate column name 'Create_user_priv'


Thanks
Jon


The last two commands are to update mysql privilege tables. The last one in a subset of the first. I split them because the first would not complete due to mysql root user having a password. It appears to be more friendly now and the last command could be omitted.
Look at the first few lines.
Code: [Select]
more /usr/share/mysql/mysql_fix_privilege_tables.sql

Why you cannot login to Webmail I do not know.
Bug 2132 and 2558 might help.

BTW, how did you upgrade to php5/mysql5 ?
Regards,
William

IF I give advise.. It's only if it was me....

Offline nowhinjing

  • *
  • 32
  • +0/-0
it works
« Reply #38 on: March 05, 2007, 09:51:54 AM »
Hi, all,

further to the conversation I had been having with William in another thread - I felt that the state of my test server had become unclear, so I decided to dump off all the data, re-install 7.1 and then follow William's instuctions to upgrade to 7.1.1 and then update to PHP5 and MySQL5 - what else would you do on a wet windy Sunday afternoon ?

I am please to say that all went to plan - I initially fell into the same problem as jazbokes but --basedir="/usr" soon fixed that.

I also got the same SQL errors as jazbokes, but they do not seem to be important as I have successfully restored the data and all seems to be well on my shiny new PHP5/MySql5 installation.

Anyone know when PHP5/MySQL5 will be in the core distribution ?

Thank-you, William - I could not have done this without  your help.

NWJ
...

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #39 on: March 05, 2007, 10:07:09 AM »
Thanks, but it was Greg who got the default templates changed to detect the installation if php5. Bug 1120.

As for php5/mysql5 in the core..  your not going to see it with the CentOS 4 series so you might have to wait for SMEServer 8. Bug 2422.

Oh, does your Webmail work ?
Regards,
William

IF I give advise.. It's only if it was me....

Offline nowhinjing

  • *
  • 32
  • +0/-0
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #40 on: March 05, 2007, 11:04:12 AM »
seems to - I have activated webmail and can log in with no problem.

I have not tried sending myself a message yet.

NWJ
...

jazbokes

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #41 on: March 06, 2007, 02:33:40 AM »
Thanks William  and Greg,

Now I'm able to login to webmail,  next to install Alfresco..


Thanks

Jon

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #42 on: March 06, 2007, 08:11:30 AM »
Update from 7.1.1 to 7.1.2 appears to generate some errors in the message log.

Looks like a later version of perl-DBI slipped in.

Code: [Select]
db yum_repositories setprop centosplus Exclude kernel,kernel-smp,mkinitrd,mdadm,initscripts,perl*,perl-DBI,perl-DBD-MySQL,httpd,mod_ssl
expand-template /etc/yum.conf

Code: [Select]
rpm -e --nodeps perl-DBI.i386
Code: [Select]
rpm -e --nodeps perl-DBD-MySQL
Code: [Select]
yum install perl-DBI perl-DBD-MySQL \
--disablerepo=* \
--enablerepo=base \
--enablerepo=updates \
--enablerepo=centosplus \
--enablerepo=smeos \
--enablerepo=smeupdates \
--enablerepo=smeaddons

Code: [Select]
signal-event post-upgrade
signal-event reboot
Regards,
William

IF I give advise.. It's only if it was me....

Offline nowhinjing

  • *
  • 32
  • +0/-0
Ooops !
« Reply #43 on: March 06, 2007, 04:02:56 PM »
Sorry, William. I spoke too soon !

Receiving mail POP3 is fine.

Sending mail SMTP is not working.

Error is :
Code: [Select]
Mar  5 18:27:15 louches httpd: PHP Warning:  Mail_smtp::include_once(Net/SMTP.php) [<a href='function.Mail-smtp-include-once'>function.Mail-smtp-include-once</a>]: failed to open stream: No such file or directory in /usr/share/pear-addons/Mail/smtp.php on line 148
Mar  5 18:27:15 louches httpd: PHP Warning:  Mail_smtp::include_once() [<a href='function.include'>function.include</a>]: Failed opening 'Net/SMTP.php' for inclusion (include_path='/home/httpd/html/horde/lib:/usr/share/pear-addons:/usr/share/pear') in /usr/share/pear-addons/Mail/smtp.php on line 148
Mar  5 18:27:15 louches httpd: PHP Fatal error:  Class 'Net_SMTP' not found in /usr/share/pear-addons/Mail/smtp.php on line 150
Mar  5 18:27:35 louches httpd: PHP Notice:  Only variable references should be returned by reference in /usr/share/pear-addons/Log.php on line 128


Just going to do a search to see if I can find the answer myself, comme un grand !

NWJ

<EDIT>

Search is your friend .....

For completeness sake, proble resolved by installing the following PEAR modules ....

Code: [Select]
# pear install Net_Socket
# pear install --alldeps Net_SMTP


send mail now works

</EDIT>
...

crackerboy

Looking for HowTo install MySQL 5.x and PHP 5.x
« Reply #44 on: April 14, 2007, 10:33:22 PM »
I have a problem there i cant access server-manager nor on the server it self or through the browser after following the french version of updating to mysql 5 and php 5 so how can i fix it?

It rejects the admin password but webmmail and phpmyadmin working