Centos6.5 adding Epel and Remi Source installation lamp Environment

Source: Internet
Author: User

Want to build a lamp environment, because the compilation and installation too cumbersome, for me as a novice, too complex. The version of Apache, MySQL, and PHP that comes with CentOS is too low to use. On Baidu search round, originally can add epel and Remi Source to solve. For Epel Source and Remi Source, the Netizen is introduced this way:

Epel Source

EPEL, extra Packages for Enterprise Linux, is a project created and maintained by the Fedora community to provide high quality packages for RHEL and derivative distributions such as CentOS, scientific Linux, etc. The Epel contains a lot of software, which is a good addition to the official standard source.

"EPEL (Extra Packages for Enterprise Linux) are a Fedora special Interest Group that creates, maintains, and manages a hig H quality set of additional packages for Enterprise Linux, including, and not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL). "

Wiki:http://fedoraproject.org/wiki/epel

Fedora EPEL Download: http://mirrors.fedoraproject.org/publiclist/EPEL/

epel:http://download.fedora.redhat.com/pub/epel/

Please download the appropriate packages for different versions.

Remi Source

Remi Source may be very rarely heard, but Remi Source Goface highly recommended, especially for those who do not want to compile the latest version of the Linux users, because the Remi source of software is almost the latest stable version. Perhaps you would doubt stability? Rest assured, these are Linux hardcore players compiled into the source, their familiarity with the system environment and software compilation parameters is beyond doubt.

remi:http://rpms.famillecollet.com/

You also need to download for different version numbers. (reproduced as described above)

Yum Remove Epel-release-6-8.noarch

The following are the procedures and commands for the installation:

To install the Epel source:

My local CentOS is 6.5, so the corresponding version is installed Epel 6

RPM-IVH http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Then import the key

RPM--import/etc/pki/rpm-gpg/rpm-gpg-key-epel-6

Don't forget, there's one more step.

Yum Install Yum-priorities

To install the Remi Source:

The version also corresponds to the centos6.x

RPM-IVH http://rpms.famillecollet.com/enterprise/remi-release-6.rpmrpm--import http://  Rpms.famillecollet.com/rpm-gpg-key-remi

You also need to execute the following command

Yum Install Yum-priorities

Ok,epel and Remi sources have been added, as you can see in/etc/yum.repos.d/, there are several more files:

Epel.repoepel-Testing.reporemi.php70.reporemi.repo

Install lamp Environment:

Installing Apache

Yum Install httpd

Modify firewall configuration

Open/etc/sysconfig/iptables

VI /etc/sysconfig/iptables

In the file, add:

 -J ACCEPT3306

Turn off SELinux
Open File

VI /etc/selinux/config

Comment out the following two lines and increase the selinux=disabled:

#SELINUX =enforcing #注释掉 #selinuxtype=targeted #注释掉SELINUX=disabled #增加

Configure Apache2

Edit Apache configuration file

sudo VI

Found #ServerName www.example.com:80
Modify the ServerName here to set your own domain name, if no domain name, can be set to localhost:80

Configure boot auto-start apache2

Chkconfig httpd on

To restart CentOS, you should be able to see the ' Apache 2 Test pages ' page in the browser input localhost.

Install MySQL

Yum--enablerepo=remi install MySQL mysql-server

After installation, set the boot to start automatically, and copy the configuration file

chkconfig mysqld   on CP

Starting MySQL, a/var/lib/mysql/mysql.sock file is generated based on the configuration file. If you do not have this file, you cannot log in to MySQL.

Set a password for the root account

Mysql_secure_installation

Then follow the prompts to enter it.

Installing PHP5

Yum--enablerepo=remi Install PHP

Then install the following PHP components:

--enablerepo=remi  Install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt Php-bcmath Php-mhash Libmcrypt

To modify the Apache configuration:

VI /etc/httpd/conf/httpd.conf

Find DirectoryIndex index.html Index.html.var

Modified to:

DirectoryIndex index.php index.html index.htm default.html default.htm

Restart Apache to create a php file test.

End.

Centos6.5 adding Epel and Remi Source installation lamp Environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.