Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Vagrant build LNMP environment     - Ubuntu 15.04 installation Powercommands 2.0 (Linux)

- Vi (Vim) keyboard map and its basic commands (Linux)

- CentOS 7 source code to compile and install PHP5.6 Nginx1.7.9 and MySQL (LNMP build environment) (Server)

- Java logging performance of those things (Programming)

- Getting Started with Linux system to learn: how to install the kernel headers on Linux (Linux)

- JavaScript file loader LABjs API Explanation (Programming)

- Ubuntu 14.04 to install Blender 2.71 (Linux)

- Security enhancements in Ubuntu ssh service (Linux)

- Go constructed using an interpreted language (Programming)

- Mac OS X system setup Google Go language development environment configuration tool Sublime Text 2 (Linux)

- Red Hat Enterprise Linux 6.4 Configuring VNC Remote Desktop login access (Linux)

- Use Vagrant build cross-platform development environment for Python (Server)

- Java Foundation - Variables and data types (Programming)

- JavaScript basic types and type conversion (Programming)

- Java object initialization (Programming)

- Cobbler automatic mass deployment of CentOS 6 and CentOS 7 (Linux)

- Smack 4.1.x Upgrade Guide (Linux)

- Golang environment configuration recommendations (Linux)

- Oracle 10g, 11g database silent installation of small differences (Database)

- How to Install Node.js in CentOS 7 (Linux)

  Vagrant build LNMP environment
  Add Date : 2017-08-31      
  Vagrant build LNMP environment

Vagrant and install Virtualbox. This much said, the two software installation is complete, in a spare hard disk partition

mkdir Ubuntu_lnmp
vagrant init ubuntu / trusty64
Open vagrantfile open both configuration

config.vm.network "private_network", ip: ""
config.vm.provider "virtualbox" do | vb |
# Display the VirtualBox GUI when booting the machine
# Vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "1024"
Wait for the installation vagrant up vagrant ssh connection user name and password are vagrant

Environmental get vagrant

sudo apt-get update
Install nginx

sudo apt-get install nginx
Install Mysql set a password, the remote connection, they can connect using SSH, ssh user name and password are vagrant

sudo apt-get install mysql-server mysql-client libmysqlclient-dev
Install Git version control

sudo apt-get git
Install PHP and related modules

sudo apt-get install php5-fpm php5-mysql php5-cli php5-gd php5-memcache php5-memcached php5-json php5-mcrypt php5-curl php-pear build-essential php5-dev -y
sudo pecl install xdebug -y
sudo php5enmod json
sudo php5enmod mcrypt
Delete / usr / share / nginx / html

sudo ln -s / vagrant / usr / share / nginx / html
Note: This / vagrant directory is actually ubuntu_lnmp directory you created earlier, you modify ubuntu_lnmp virtual machine / vagrant in the local directory will be synchronized

Modify /etc/php5/fpm/php.ini

cgi.fix_pathinfo = 1
display_errors = On
date.timezone = PRC
/ Etc / nginx / sites-available / default

server {
// Find index
index index.php index.html index.htm
location ~ \ .php {
# Fastcgi_split_path_info ^ (/.+) $ (+ \ php..);
# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
# # With php5-cgi alone:
# # With php5-fpm:
# Fastcgi_pass unix: /var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
set $ path_info "";
set $ real_script_name $ fastcgi_script_name;
if ($ fastcgi_script_name ~ "^ (. +? \. php) (/.+) $") {
set $ real_script_name $ 1;
set $ path_info $ 2;
fastcgi_param SCRIPT_FILENAME $ document_root $ real_script_name;
fastcgi_param SCRIPT_NAME $ real_script_name;
fastcgi_param PATH_INFO $ path_info;
This is to support the PHP PHPINFO. In fact, not difficult to understand, fastcgi_param configuration item name will appear in $ _SERVER [CI Name]

Modify nginx user name

sudo vi /etc/nginx/nginx.conf
Find the user www-data; to user vagrant;

Modify the configuration of php-fpm configuration

sudo vi /etc/php5/fpm/pool.d/www.conf
Locate the following configuration items to modify

user = vagrant
group = vagrant
; Listen = / var / run / php5-fpm.sock commented to
listen = 9000
listen.owner = vagrant
listen.group = vagrant
My pm. Configuration

pm.max_children = 1000
pm.start_servers = 25
pm.min_spare_servers = 25
pm.max_spare_servers = 50
pm.max_requests = 1000
In order to prevent the fpm and cli php.ini not the same, can speak cli php.ini file deletion, and then past a ln

sudo cp /etc/php5/fpm/php.ini /etc/php5/cli/php.ini
Such modifying a configuration file, you can reach both sides synchronized.
- Linux Security trust with users (Linux)
- Is Linux the most secure operating system (Linux)
- Linux top command to get started (Linux)
- php How to prevent being injected (Linux)
- Grading defense against Linux server attacks (Linux)
- Ubuntu install perfectly handsome terminal Guake 0.8.1 (Linux)
- Installing software on Ubuntu: apt-get and dpkg difference (Linux)
- Oracle JDK installation under Ubuntu Linux (Linux)
- How to Install 3.16.7 CKT2 kernel in Ubuntu 14.10, Ubuntu 14.04 and its derivative versions (Linux)
- C + + secondary pointer memory model (pointer array) (Programming)
- Netcat Example (Linux)
- Through Oracle to help restore MySQL data problems (Database)
- Git Advanced Tutorial (Linux)
- Ubuntu 14.10 installation SecureCRT 7.3 (Linux)
- Java reflection by calling the class method (Programming)
- Linux kernel IPv6 protocol closed manner (Linux)
- Linux / Unix system-level IO (Linux)
- Installation Experience open source car Automotive Grade Linux system (Linux)
- C ++ copy constructor (Programming)
- MySQL development common query summary (Database)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.