Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Vagrant build LNMP environment     - Bug tracking library after FastJson omitted the decimal point 0 (Programming)

- Nodejs nano library to handle couchdb: need a timeout (Database)

- Linux regex sed detailing (Linux)

- Java multi-threaded shared communications variables (Programming)

- Linux with Windows Explorer as a security system (Linux)

- Linux nice program origin of the name (Linux)

- nginx.conf Optimization (Server)

- Linux System Getting Started Tutorial: mounted directly in Linux LVM partition (Linux)

- How Ubuntu Snappy Core 2 running on Raspberry Pi (Linux)

- RabbitMQ tutorial examples: the Hello RabbitMQ World Java realization (Linux)

- independently configurable PHP environment under CentOS6.5 (Server)

- Rails 4.1.6 start being given Could not find a JavaScript runtime (Linux)

- 20+ Best Practices article MySQL Performance Optimization (Database)

- Linux system commands to view hardware information (Linux)

- Ubuntu 12.04 commonly use shortcuts finishing Share (Linux)

- JavaScript, some conclusions about the implicit conversion (Programming)

- Linux platform host to prevent hacking skills (Linux)

- Install and manage Java under mac (Linux)

- Using Ruby to build a simple HTTP service and sass environment (Server)

- Android components save state series - Activity (Programming)

  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.
- libreadline.so.6: can not open shared object file problem solution (Linux)
- Modular JavaScript (Programming)
- Use GNU / Linux broadcasting of television programs (Linux)
- SecureCRT session buffer size settings (Linux)
- Oracle DATABASE LINK (DBLINK) Create (Database)
- Reset CentOS / RHEL root account password 7 (Linux)
- Ubuntu users to install household financial management tools HomeBank 5.0.0 (Linux)
- How comprehensive resist attacks from the network (Linux)
- Compare several ways to transfer files between Linux hosts (Linux)
- Distributed File System FastDFS deployment (Server)
- To share Internet access through NAT mode under Virtual Linux VMware Workstation (Linux)
- PostgreSQL vacuum principle of a function and parameters (Database)
- Linux disk quota-related instruction (Linux)
- Linux operating system boot manager -GRUB (Linux)
- RegExp object implements regular match --JavaScript (Programming)
- AngularJS notes --- Scope and controller (Programming)
- To compile and install Redis Linux and master-slave replication configuration (Database)
- Understand ASP.NET 5 running the command: DNVM, DNX, and DNU (Server)
- Ubuntu derivative version of the user and how to install SmartGit / HG 6.0.0 (Linux)
- Repair CentOS 6.4 Grub boot (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.