CentOS Yum Install lamp PHP5.4 version

Source: Internet
Author: User

CentOS Yum Install lamp PHP5.4 version
[Font: Big Small]

Linux system version: CentOS 6.5

1.yum Installation and source code compilation in the use of the time no difference, but the installation process is very different, yum only need 3 commands to complete, the source code needs 13 packages, but also have to compress the compilation, the steps are cumbersome, and as sometimes error, source code compiled installation takes about 2 hours, The advantage is that you can configure your own address and other parameters, Yum installed half an hour to fix, generally do not make mistakes, update is also very convenient.

2. My machine is the CentOS release 5.9 64 for the system, the general machine with the Yum command, and the Yum package is available, that is, you do not download things, directly yum-y install after the installation of the software you need to install, he will automatically download automatic installation, Very convenient. For example, yum-y install httpd automatically downloads and installs the Apache server. Lamp environment only need to install httpd,mysql,php

3. First update the YUM-Y update

4. Install apache,mysql,php with Yum.

4.1 Installing Apache
Yum Install httpd Httpd-devel
When the installation is complete, start Apache with/etc/init.d/httpd start
Set to boot: Chkconfig httpd on

4.2 Installing MySQL
Yum install MySQL mysql-server mysql-devel
Again, when done, start MySQL with/etc/init.d/mysqld start

4.3 Setting the MySQL password
mysql>; Use MySQL;
mysql>; UPDATE user SET Password=password (' newpassword ') WHERE user= ' root ';
mysql>; FLUSH privileges;

The MySQL password can also be set by: Mysql_secure_installation command

4.4 Allow remote logins
Mysql-u root-p
Enter Password: <your new password>
Mysql>grant all privileges on * * to ' user name ' @ '% ' identified by ' password ' with GRANT OPTION;
When you're done, you can manage MySQL remotely with Mysql-front.
Set to boot
Chkconfig mysqld on

5 PHP5.4 Installation

RPM-UVH http://mirror.webtatic.com/yum/el6/latest.rpm (download latest source) yum install php54w Php54w-bcmath php54w-cli Php54w-common php54w-devel php54w-fpm php54w-gd php54w-imap php54w-ldap php54w-mbstring php54w-mcrypt php54w-mysql p Hp54w-odbc php54w-pdo php54w-pear php54w-pecl-igbinary php54w-xml php54w-xmlrpc php54w-opcache php54w-intl php54w-pecl -memcache install PHP corresponding to the various extensions;

The use of Yum installation is a variety of convenience, with the source of the installation test more than 10 times, a variety of bugs can not be solved!!!

CentOS Yum Install lamp PHP5.4 version

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.