Install LAMP PHP5.4 in CentOS yum

Source: Internet
Author: User

Install LAMP PHP5.4 in CentOS yum

Linux: CentOS 6.5

1. there is no difference between yum installation and source code compilation, but the installation process is quite different. yum only requires three commands to complete. The source code requires 13 packages and requires pressure compilation, the steps are troublesome and sometimes errors occur. It takes about two hours to compile and install the source code. The advantage is that you can configure parameters such as the address by yourself. yum will be installed for half an hour and will not cause errors, it is easy to update.

2. my machine is a CentOS release 5.9 64-bit system. Generally, the machine carries the yum command, and the yum package source can be used, that is, you do not need to download it yourself, directly add the software you want to install after yum-y install. It will automatically download and automatically install the software, which is very convenient. For example, yum-y install httpd automatically downloads and installs the apache server. In the lamp environment, you only need to install httpd, mysql, and php.

3. update yum-y update first.

4. install Apache, Mysql, and PHP with yum.

4.1 install Apache
Yum install httpd-devel
After the installation is complete, start apache with/etc/init. d/httpd start
Set to boot: chkconfig httpd on

4.2 install mysql
Yum install mysql-server mysql-devel
Similarly, start mysql with/etc/init. d/mysqld start

4.3 set the mysql password
Mysql>; USE mysql;
Mysql>; UPDATE user SET Password = PASSWORD ('newpassword') WHERE user = 'root ';
Mysql>; flush privileges;

You can also use the mysql_secure_installation command to set the mysql password.

4.4 Allow Remote Login
Mysql-u root-p
Enter Password: <your new password>
Mysql> grant all privileges on *. * TO 'username '@' % 'identified by 'Password' with grant option;
After that, you can use mysql-front to remotely manage mysql.
Set to boot
Chkconfig mysqld on

5 PHP5.4 Installation

Rpm-Uvh http://mirror.webtatic.com/yum/el6/latest.rpm (download the 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 php54w-odbc php54w-pdo php54w-pear php54w-pecl-igbinary php54w-xml php54w-xmlrpc php54w-opcache php54w-intl php54w-pecl-memcache installation PHP corresponding to a variety of extensions;

Yum installation is a variety of conveniences. It has been tried more than a dozen times with source code installation, and various bugs cannot be solved !!!!

------------------------------------ Split line ------------------------------------

CentOS 6.5 system installation and configuration LAMP (Apache + PHP5 + MySQL) server environment

Configure the LAMP + phpMyAdmin PHP (5.5.9) development environment in Ubuntu 14.04

Ubuntu 14.10 text tutorial on hard drive installation in Windows 7

Install Ubuntu 14.10 on a USB flash drive

Official release and download of Ubuntu 14.10

How to upgrade Ubuntu 14.04 LTS to Ubuntu 14.10

Install LAMP in Ubuntu 14.10

------------------------------------ Split line ------------------------------------

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.