centos6.5 Yum Install Lnmp (method for newcomers to new recruits)

Source: Internet
Author: User
Tags configuration php

New recruits, beginning with the environment, local writing code with the Wamp, in LNMP or lamp testing, unless some local tyrants companies use (fruit machine).

In addition, the whole process in the brain in the first article (remember not all also do not matter, a back to two back to ripe), the practice, practice out of the truth!

One: First to install a virtual host software on your own computer, I have:

VMWARE10---> Network address: http://pan.baidu.com/s/1pJt5HVl

centos6.5 (32-bit): Network address: Http://pan.baidu.com/s/1pJqNLxD

XSHELL4: Network address: Http://pan.baidu.com/s/1c0GmHNU

Two: In the configuration of a virtual host, see the Documentation:

  VMware Workstation10 Installation +centos6.5 installation Graphics Tutorial :

Http://wenku.baidu.com/link?url=wT81MtiBKctFXzIvBheTr3f-ckWfuiGF1dgZWwK0u_CP2yywLSB3w_LwhNsE4cG7yc_ 2cululgbsquyrol8resvnvvmvxg0xauxh9osjvuu

Note: At the time of installation, choose to configure the network card, the installation will be able to surf the internet, or need to install their own matching, start the installation is not well equipped.

Check if you can surf the Internet: It's easy to open the command ping www.baidu.com (Crtl+c is to stop pinging all the time) or open the browser and try to know whether it's successful or not.

Three: Above has already put Lnmp's L solved, below on Yum installs Nginx, Mysql, PHP

When I install it, I refer to the following three documents

    1. Http://www.myhack58.com/Article/sort099/sort0102/2014/42632_2.htm (mainly refer to this, others for comparison)
    2. http://jingyan.baidu.com/article/5d368d1eed38ac3f60c05791.html?qq-pf-to=pcqq.c2c
    3. Http://www.cnblogs.com/xiaoit/p/3991037.html

The installation process is divided into three stages, pre-installation preparation, formal installation, post-installation configuration,

    1. Pre-installation stage, this phase is quite smooth, this stage you need network card with good to the Internet, wget is the download command of Linux.
    2. During the installation phase:

①:yum install Nginx, or there is no installation package, the preparation phase to configure the third party Yum source, when not added up, how to do? Learn Baidu, found the solution: Enter the command yum install epel-release (with Yum is really good, the premise can be networked!) The Yum install Nginx is OK.

②:mysql, it's no problem. Smooth Installation

③:php, it was a smooth installation.

3: Post-installation configuration phase: The stage of the problem must be careful,

①: Configure Nginx to support PHP, just follow the line

②: Configure PHP, according to his I configured the time zone, anti-SQL injection, disable functions, suppress PHP version, Trojan cross-station is not configured, are in the local testing, if it is configured server, you do the words are already Daniel, novice first with local step by step!

③: Configuration php-fpm, and then test, according to his, generally do not have problems, but then shut the machine, testing time has been prompted to find the file directory, the urgent, not its solution Ah, find information asked people, the original PHP-FPM did not start .... It's all in a word.

OK test results under:

Summarize some of the commands that are commonly used during installation

  1. Ifconfig View network card information to view your IP
  2. chkconfig iptables offTurn off the firewall
  3. Service Network restart Restart networking service
  4. Shutdown-r now #重启系统
  5. Chkconfig Nginx on Nginx set to boot
    /etc/init.d/nginx Restart Nginx Restart
  6. /etc/init.d/mysqld Start #启动MySQL
    Chkconfig mysqld on #设为开机启动
  7. /ETC/RC.D/INIT.D/PHP-FPM Start #启动php-fpm
    Chkconfig PHP-FPM on #设置开机启动
  8. Nginx Two configuration files:/etc/nginx/nginx.conf/etc/nginx/conf.d/default.conf
  9. PHP configuration file:/etc/php.ini
  10. Configuration file for php-fpm:/etc/php-fpm.d/www.conf
  11. Nginx Default Site Directory is:/usr/share/nginx/html/

    Permission settings: Chown nginx.nginx/usr/share/nginx/html/-R

    MySQL database directory is:/var/lib/mysql

    Permission settings: Chown mysql.mysql-r/var/lib/mysql

  12. Uninstall the Nginx,mysql already installed, PHP:yum remove nginx/httpd; yum remove mysql; yum remove php

First of all, but there is one thing to do, is: Windows mounted to the virtual machine, to achieve file sharing and synchronization; who made us not a fruit machine?

centos6.5 Yum Install Lnmp (method for newcomers to new recruits)

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.