Category Archives: Centos

Install PHP 5.3 mcrypt extension on Centos 5.6

yum install php53-devel
yum install libmcrypt-devel
yum install gcc
wget http://museum.php.net/php5/php-5.3.3.tar.bz2
tar xvjf php-5.3.3.tar.bz2
cd php-5.3.3/ext/mcrypt/
phpize
aclocal
./configure
make
make install
echo "extension=mcrypt.so" > /etc/php.d/mcrypt.ini
service httpd restart

If the above code doesn’t work try the below code

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/php-mcrypt-5.3.3-1.el6.x86_64.rpm

install vim on centos

yum install vim wont work on the CentOs server. First search for the versions of vim on the server using

yum search vim

The result can be something similar to below:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.steadfast.net
* extras: centos-distro.cavecreek.net
* updates: centos.mirror.lstn.net
Reducing CentOS-5 Testing to included packages only
Finished
================================= Matched: vim =================================
vim-X11.x86_64 : The VIM version of the vi editor for the X Window System.
vim-common.x86_64 : The common files needed by any version of the VIM editor.
vim-enhanced.x86_64 : A version of the VIM editor which includes recent
: enhancements.
vim-minimal.x86_64 : A minimal version of the VIM editor.

Now use the below code to install the vim editor

yum install vim-enhanced.x86_64

Missing Dependency: libmcrypt.so.4 is needed by package php-mcrypt-5.2.11-2.el5.art.i386 (atomic)

yum install libmcrypt
yum install libmcrypt-devel
yum install php-mcrypt.x86_64

installing APC on Centos 5

APC also called as “Alternate PHP Cache”

yum install php-pear
yum install php-devel
yum install httpd-devel
pecl install apc
echo "extension=apc.so" > /etc/php.d/apc.ini
service httpd restart [/etc/init.d/httpd restart]

Check the installation using the command

php -m

update php to 5.2 on centos using shell commands

Open the file /etc/yum.repos.d/CentOS-Base.repo

Add the below lines to the file


[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing# CentOS-Testing:
# !!!! CAUTION !!!!
# This repository is a proving grounds for packages on their way to CentOSPlus and CentOS Extras.
# They may or may not replace core CentOS packages, and are not guaranteed to function properly.
# These packages build and install, but are waiting for feedback from testers as to
# functionality and stability. Packages in this repository will come and go during the
# development period, so it should not be left enabled or used on production systems without due
# consideration.

Use the shell prompt and type the below

yum --disablerepo=* --enablerepo=c5-testing check-update php*

After checking the versions update your php

yum --disablerepo=* --enablerepo=c5-testing update php*
Follow

Get every new post delivered to your Inbox.

Join 268 other followers

%d bloggers like this: