Friday, June 10, 2011

Adding Repository and Install Web server in Centos5

Download lastest release
*for RPMforge repository
i386 ::

#wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm

x86_64 ::

#wget http://apt.sw.be/redhat/el5/en/x86_64/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

* Install the package

#rpm -ivh rpmforge-release-0.3.6-1.el5.rf.*.rpm

*c0nfigure
Open the RPMforge configuration file >> /etc/yum.repos.d/rpmforge.repo (entry priority=3)

for remi & epel repository
*download package
#wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

epel repository
#wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

*install package
#rpm -Uvh remi-release-5-3.noarch.rpm epel-release-5-3.noarch.rpm

*c0nfig
#perl -pi -e 's/enabled=0/enabled=1/g' /etc/yum.repos.d/remi.repo


Updating packet
#yum update


Install packet

#yum install packatename

or
#yum --enablerepo=remi install packatename


Web Server Installation
*Install Apache and Mod_ssl

#yum install httpd mod_ssl

activating Apache start automatically after reboot

#/sbin/chkconfig httpd on


*Install PHP

#yum install php-common php-gd php-mcrypt php-pear php-pecl-memcache php-mhash php-mysql php-xml

Restart service httpd

#service http restart


*install Mysql

#yum install  mysql-server mysql mysql-devel

enter password mysql: YOURPASSWORD
for login mysql

#mysql -u root -p (YOURPASSWORD)

Activate service myslq after restart

#/sbin/chkconfig mysqld restart


For configure httpd

#vi /etc/httpd/conf/httpd.conf


DONE ! type in your browser http://localhost or http://yourip


No comments:

Post a Comment