Category Archives: Centos

Install PHP 5.3 mcrypt extension on Centos 5.6

yum install php53-devel
yum install libmcrypt-devel
yum install gcc
tar xvjf php-5.3.3.tar.bz2
cd php-5.3.3/ext/mcrypt/
make install
echo "" > /etc/php.d/mcrypt.ini
service httpd restart

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

rpm -Uvh
rpm -Uvh

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:
* extras:
* updates:
Reducing CentOS-5 Testing to included packages only
================================= 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: is needed by package (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 "" > /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

name=CentOS-5 Testing
gpgkey= 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*

Get every new post delivered to your Inbox.

Join 270 other followers

%d bloggers like this: