Linux Yum download rpm package and install lamp environment

Source: Internet
Author: User
Tags install php

1. Download the Yum plugin yum-downloadonly, which allows you to download packages only.

Yum Install Yum-downloadonly

2. Download apache,mysql,php with Yum.

2.1 Downloads Apache

Yum Install httpd httpd-devel--downloadonly--downloaddir=/home/lamp

2.2 Download MySQL

Yum install MySQL mysql-server mysql-devel--downloadonly--downloaddir=/home/lamp

2.3 Download PHP

Yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml--downloadonly--downloaddir=/home/ Lamp

3. Install the apache,mysql,php with RPM.

RPM-IVH *.rpm--force

4. Start apache,mysql,php.

4.1 Starting MySQL:/etc/init.d/mysqld start

4.2 Start apache+php:/etc/init.d/httpd start

5. Test the apache+mysql+php environment

Create a new test.php file in/var/www/html/(the default installation environment after loading the PHP file is this path, except manual configuration), write the following, and then save.

<?php
Phpinfo ();
?>

Then opens the http://serverip/test.php in the client browser, if can display successfully, then indicates the installation succeeds.
This completes the installation.

6. Set up boot from boot

MySQL boot from: chkconfig mysqld on

apache+php boot from: Chkconfig httpd on

Linux Yum download rpm package and install 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.