Install LAMP on CentOS/RHEL 5/6

Light stack is a gathering of open source programming used to get web servers up and running.LAMP remains for Linux, Apache, MySQL, and PHP. As we accept that we are utilizing CentOS/RHEL server for designing web server, so first part ( Linux ) is as of now there. This article gives guidelines to introducing a LAMP (Linux, Apache, MySQL, PHP) stack on your server.

lamp_logo_opt

Step 1: Install Remi/EPEL Repository

Initially we have to include Remi and EPEL rpm stores in our framework. Utilize one of beneath summons according to your OS variant and framework building design.

CentOS/RHEL 6, 32 Bit:
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 

CentOS/RHEL 6, 64 Bit:
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 

CentOS/RHEL 5, 32 Bit:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

CentOS/RHEL 5, 64 Bit:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-releas5-4.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

Step 2: Install Apache ( httpd ) using Yum

In the wake of including EPEL and Remi archive in our framework. Lets utilization taking after summon to introduce most recent accessible Apache bundle.

# yum --enablerepo=remi install httpd

In the wake of introducing Apache, begin Apache administration utilizing after charge and empower auto begin on framework reboot.

# service httpd start
# chkconfig httpd on

Now point your browser to localhost on port 80, you will get default Apache page

Step 3: Install MySQL 5.5 using Yum

Presently you have effectively introduced Apache server. Lets introduce MySQL server and customer utilizing yum bundle supervisor with taking after summon. Additionally you can utilize this excercise to introduce MySQL on your framework.

# yum --enablerepo=remi install mysql mysql-server

In the wake of introducing MysQL server bundles, begin the administration and execute taking after charge for applying introductory security. Execute underneath summon and take after the guidelines.

# service mysqld start
# /usr/bin/mysql_secure_installation

Step 4: Install PHP 5.4

In the wake of comleting establishment of Apache and MySQL at long last we have to introduce PHP. Utilize the accompanying charge to introduce most recent PHP adaptation.

# yum --enablerepo=remi install php php-common

Additionally introduce obliged PHP libraries utilized for your application, Few of valuable libraries are recorded underneath.

# yum --enablerepo=remi install php-common php-cli php-mysql php-devel

Use this link for more details about these libraries and more php libraries.

Step 5: Start Services

At last begin Apache and MySQL administrations utilizing after charges and setup them to auto begin on framework boot.

# service httpd restart
# chkconfig httpd on
# service mysqld restart
# chkconfig mysqld on
Comments
  1. 9 years ago
    • 9 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.