LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   how to upgrade php and mysql on live server (https://www.linuxquestions.org/questions/linux-server-73/how-to-upgrade-php-and-mysql-on-live-server-546390/)

nesargha 04-16-2007 01:17 AM

how to upgrade php and mysql on live server
 
hi guys,

We have red hat 9.0 linux, with php 4.2.2 and MySQL - 3.23.54, this machine also runs sendmail, squid (internet). The php and mysql was installed from the red hat 9.0 CD (rpm).

1. we want to upgrade php and mysql for some of our programming needs.

2. since its a live server what are the things we have to look into ( impact on other programs).

3. we know upgrading the distro is good and solve our problems but our priority is to upgrade the s/w not distro.

right now we have taken the backup of the of mysql database and the list of programs that use php and mysql.
my
rpm -qa | grep php
php-4.2.2-17
php-manual-4.2.2-17
php-snmp-4.2.2-17
php-devel-4.2.2-17
php-ldap-4.2.2-17
php-mysql-4.2.2-17
php-pgsql-4.2.2-17
php-imap-4.2.2-17
php-odbc-4.2.2-17
rpm -qa | grep mysql
mysql-server-3.23.54a-11
php-mysql-4.2.2-17
mysql-3.23.54a-11
If any of you guys have gone through the same process please let us know how we can solve this problem.

thanks in advance.

thekillerbean 04-16-2007 02:39 AM

FWIW, I have upgraded MySQL on a live server without any impact whatsoever - well, not a single user reported any issues either on the day or within 2 weeks of the upgrade. Cannot say the same for PHP as I did not upgrade that one!

MySQL was upgraded from 3.23 to 5.1!

Cheers,
tkb.

reddazz 04-16-2007 06:45 AM

Moved: This thread is more suitable in Linux Server and has been moved accordingly to help your thread/question get the exposure it deserves.

Jzarecta 04-16-2007 08:38 AM

Oops sorry, is too early in the morning here. Anyway I think that the best way to upgrade a service might be with a second box (mirroring). This way you will just switch the routing tables to the different IP. The other way is just to upgrade and apply the upgrade by doing a service restart. This will create a very tiny downtime but is not like you would need to reboot the whole system.

New fancy ways is to have a virtual PC this virtual PC will act as a mirror and you can just use sockets to re route the service. This however might need more technical experience on using internal sockets since you are no longer in a network but in a internal socket/service connection matrix.

nesargha 04-16-2007 08:44 AM

hi guys,

I hope this moving helps me

trickykid 04-16-2007 10:26 AM

Most MySQL RPM's will shutdown MySQL and restart after the install or upgrade. In best practice, you may want to shut these down yourself and make sure you have a full backup or mysqldump of the databases and tables.

For PHP, in most cases, you can install while Apache is running, but it's best practice to schedule a downtime, install and make sure you meet all dependencies for both or all upgrades as PHP install would require an Apache restart for the new modules to get picked up.

In your case, you're running an older version of Redhat, it might be safe to build a new server with upgrades and transfer the databases and data over, as meeting all required dependencies can and will be a lot of work unless you rebuild your own RPM's for your platform as Redhat 9 itself is old and you may want to do more than a PHP and MySQL update.

Jzarecta 04-17-2007 12:11 AM

Quote:

Originally Posted by trickykid
Most MySQL RPM's will shutdown MySQL and restart after the install or upgrade. In best practice, you may want to shut these down yourself and make sure you have a full backup or mysqldump of the databases and tables.

Actually I will recomend to double backup not jut the mysqldump but also the binaries that are usually stored on /var/lib/mysql/

Also when you do a mysqldump make sure to use the --create-options this will includes the database creation and not just the table dump.

More info at man mysqldump

nesargha 04-17-2007 12:38 AM

Hi Guys,

Thanks for the reply, Yes i know red hat 9 is older ver, but right now our priority is to upgrade php & mysql, I will surely look into that aspect also.

If you people have any other advice please let me know, I am planning to do this weekend so by that time i want to gather more info and plan myself before starting to do the task.

nesargha 04-18-2007 02:12 AM

hey guys,

i think MYSQL will go smoothly, what about PHP have any one upgraded php, if so please share your experience with me.

Thanks

Jzarecta 04-19-2007 01:06 AM

Quote:

Originally Posted by nesargha
hey guys,

i think MYSQL will go smoothly, what about PHP have any one upgraded php, if so please share your experience with me.

Thanks

PHP needs to be defined on the httpd.conf since you have to define the php4 and regular php. PHP 'reload' when the apache server reload.

patil 01-20-2009 04:28 AM

My SQL problem
 
hi guys,

We have red hat linux, with php 4.0 and MySQL - 4.0.18-32.23, this machine also runs postfix, squid (internet). The php and mysql was installed from the red hat 9.0 CD (rpm).

1. we want to upgrade php and mysql for some of our programming needs.

2. since its a live server what are the things we have to look into ( impact on other programs).

3. we know upgrading the distro is good and solve our problems but our priority is to upgrade the s/w not distro.

right now we have taken the backup of the of mysql database and the list of programs that use php and mysql.

rpm -qa | grep mysql
mysql-4.0.18-32.23
mysql-client-4.0.18-32.1
apache2-mod_auth_mysql-20030510-208.1
mysql-shared-4.0.18-32.1
qt3-mysql-3.3.1-35.11
perl-DBD-mysql-2.9003-22.1
python-mysql-0.9.3b2-90.1
php4-mysql-4.3.4-43.61

Please help me how to upgrade mysql to 5.x

Regards,
Patil

patil 01-20-2009 05:58 AM

Mysql upgradation
 
Please check the below lines

rpm -qa | grep mysql
mysql-4.0.18-32.23
mysql-client-4.0.18-32.1
apache2-mod_auth_mysql-20030510-208.1
mysql-shared-4.0.18-32.1
qt3-mysql-3.3.1-35.11
perl-DBD-mysql-2.9003-22.1
python-mysql-0.9.3b2-90.1
php4-mysql-4.3.4-43.61

Please suggest me how to upgrade to 4.1.x and live mailserver is running without distrubing.

Wating for reply

Regards,
Patil

nesargha 01-20-2009 11:32 PM

Hi Patil,

Upgrade ur redhat 9.0, even we tried to upgrade the only the s/w keeping the distro, but later we found that security wise and by all other means its good to upgrade the distro, as red hat 9.0 is very old version and it lacks some of the security updates which the newer version has.

Since your ar also having email server running on it i advice you to update it as there are changes of hackers hacking into ur redhat 9.0 and using it send spam mails (if this happen ur ip would be blocked and blacklisted in email blacklisted db and you will not able to send or receive mails from ur server). Ours red 9.0 was hacked even though we had closed all the ports and had a good linux admin looking after it.

you can do the upgrading work on sat/sunday when no one will be accessing their mails.

and its on no use just updating the s/w when ur whole distro is outdated, how long will you do this.

If your in or around blore (within karnataka) and need any help then i can get u professional help, who will take care of whole upgrade without any single issue.

-
nes

patil 01-21-2009 12:03 AM

nesargha,

Thanks for your help, I am living in bangalore itself, so please contact on you can give your mail ID I will reply for it, even I need your help to upgrade mysql.

Regards,
patil


All times are GMT -5. The time now is 12:25 PM.