The lamp (apache+mysql+php) environment is configured in Fedora 21

Source: Internet
Author: User
Tags install php php server nginx reverse proxy


Install a Fedora Linux, the desktop UI is tolerable, and then start to configure the environment.

First of all intend to configure a LNMP environment, because the Aliyun above is LNMP environment, Nginx reverse proxy function is quite good, but this machine, it is intended to configure Apache, the following is the configuration of lamp environment measured flow:

First, install the Apache server

1.1 Using Yum for installation:
# yum Install httpd
1.2 Configure Apache to boot with system boot
#chkconfig--levels 235 httpd on
1.3 Start/Turn off Apache service:
#service httpd Start
#service httpd Stop
or command to start/Turn off Apache:
#/etc/init.d/httpd start
#/etc/init.d/httpd stop

Second, the installation of PHP server

2.1 Using Yum to install PHP:
#yum Install httpd php Php-common
2.2 Using Yum to install modules
# yum Install PHP-PECL-APC php-cli php-pear php-pdo php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pe cl-memcached php-gd php-mbstring Php-mcrypt php-xml
2.2 Start/Turn off Apache service:
#service httpd Start
#service httpd Stop
or command to start/Turn off Apache:
#/etc/init.d/httpd start
#/etc/init.d/httpd stop

Third, the installation of MySQL

3.1 using Yum to install MySQL:
#yum install MySQL mysql-server
3.2 start/close/View status:
#service mysqld start
#service Mysqld Stop
#service mysqld status
3.3 Set the root password
#mysql-u root
mysql>set password for Root@localhost=pas Sword (' yourpwd ');

Related Article

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.