Friday, May 04, 2007

Upgrade PHP4 ke PHP 5 di CentOS 4

Cara upgrade ke PHP5 + mysql5 di CentOS 4.

Siapkan bumbunya ( source )

wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-5.1.6-1.2.1.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-pear-1.4.9-1.2.centos.noarch.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-xmlrpc-5.1.6-1.2.1.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-xml-5.1.6-1.2.1.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-mysql-5.1.6-1.2.1.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-mbstring-5.1.6-1.2.1.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-ldap-5.1.6-1.2.1.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-gd-5.1.6-1.2.1.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-devel-5.1.6-1.2.1.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-mcrypt-5.1.6-1.el4.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-ncurses-5.1.6-1.2.1.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/php-pdo-5.1.6-1.2.1.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/mysqlclient14-4.1.22-1.el4s1.1.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/mysql-server-5.0.22-1.centos.1.i386.rpm


remove php4 dan konco2nya
# yum remove php

install php-pear-1.4.9-1.2.centos.noarch terlebih dahulu , lalu baru php-5.1.6-1.2.1.centos, kemudian ikuti dengan package lain.
rpm -i --force --nodeps php-pear-5.0.4-3.centos4.i386.rpm
#rpm -i php-pear-1.4.9-1.2.centos.noarch.rpm php-5.1.6-1.2.1.centos.i386.rpm
#rpm -i php-devel-5.1.6-1.2.1.centos.i386.rpm php-gd-5.1.6-1.2.1.centos.i386.rpm php-ldap-5.1.6-1.2.1.centos.i386.rpm php-mbstring-5.1.6-1.2.1.centos.i386.rpm php-xml-5.1.6-1.2.1.centos.i386.rpm php-xmlrpc-5.1.6-1.2.1.centos.i386.rpm


wget http://rpm.pbone.net/index.php3/stat/3/srodzaj/2/search/libmcrypt-2.5.7-4.el4.centos.src.rpm
wget http://centos.arcticnetwork.ca/4/centosplus/i386/RPMS/php-mysql-5.1.6-1.2.1.centos.i386.rpm

restart apache
# apachectl restart

Sure enough, it restarted without a hitch, and phpinfo() now reports PHP Version 5.0.4. Woo-hoo!

From there, I just did installed all of the rest of the packages with rpm -i. After everything, I tried phpinfo() again and it picked up all of the modules perfectly.

YMMV. Happy upgrading,

###############################################################

cara masukin module mod_layout.so
ambil sourcenya di

wget http://download.tangent.org/mod_layout-4.1.tar.gz

tapi lu gak boleh lupa , harus install httpd yang ada binary apxs nya, klo gak ntar sia sia semua.
Caranya gampang "Install the "httpd-devel" RPM with yum. It has the apxs binary."

#yum install httpd-devel
ntar itu install semua dependencynya

baru lu masuk ke folder mod_layout-4.1 , lalu edit file Makefile , ganti apxs dan apachectl ke :
APXS=/usr/sbin/apxs
APACHECTL=/usr/sbin/apachectl

terus ketik make ketik make install
#make
#make install

Nah baru masukin "LoadModule layout_module modules/mod_layout.so" di httpd.conf , kalo misalnya gak ada biasanya otomatis
keisi di httpd.conf spt ini :
LoadModule layout_module /usr/lib/httpd/modules/mod_layout.so
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
AddType application/x-httpd-php .php .phtml

vi /etc/ld.so.conf
Masukan


load lib linuxnya dengan :
/sbin/ldconfig

restart apache --> /usr/sbin/apachectl restart atau service apache restart

done selesai.

Kalo masih bingung jgn lupa tanya om google hehe
Jgn lupa test : phpinfo.php

echo "

PHP INFO

";
phpinfo();
?>


Indoagmers - saturday 12:29 am 5/5/2007
Sial bisa juga akhirnya udah seharian otak atik.. centos


iseng ah paste link kali aja ada guna:
#GD boutel
http://www.alt-php-faq.org/local/68/#id68

yum --enablerepo=centosplus install php-mcrypt
http://www.musc.edu/webserver/mod_layout.html#_1_1
http://parallel.hpc.unsw.edu.au/~ag/p-mcrypt00.html

#package
http://mirror.centos.org/centos/4/centosplus/i386/RPMS/
http://isoredirect.centos.org/centos/4.4/centosplus/x86_64/RPMS/
http://tangent.org/index.pl?node_id=362

# HTTPD :
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/httpd-2.0.59-1.el4s1.5.el4.centos.i386.rpm
wget http://mirror.centos.org/centos/4/centosplus/i386/RPMS/httpd-devel-2.0.59-1.el4s1.5.el4.centos.i386.rpm



# Membuat Backup MYSQL Automatic
http://sanyasyari.com/2006/10/03/membuat-backup-mysql-automatic/#more-197

http://www.mydigitallife.info/2006/06/06/change-and-reset-mysql-root-password/

#mysql bajingan di centos

http://www.howtoforge.com/perfect_setup_centos_4.3_p4


# rpm -i php-mysql-5.1.6-1.2.1.centos.i386.rpm php-pdo-5.1.6-1.2.1.centos.i386.rpm

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More