Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Vagrant build LNMP environment     - Binder began to talk about inter-process communication mechanism from Android AIDL (Programming)

- Three easy open source firewall on the Linux platform (Linux)

- PostgreSQL query result area is removed and precision (Database)

- Using FTPClient to upload and download files in Java (Programming)

- Unetbootin make use U disk loading Linux system (Linux)

- Computer black magic: tail recursion (Programming)

- Spark local development environment to build (Server)

- Oracle RMAN repair logical bad blocks (Database)

- Manual cleaning Oracle audit records (Database)

- 32-bit and 64-bit integer in PHP and MySQL range (Database)

- The new task parallel library feature in .NET 4.6 (Programming)

- How to write a new Git protocol (Linux)

- A script to make your Ubuntu 14.04 Memory screen brightness (Linux)

- Apache Kafka: the next generation of distributed messaging system (Server)

- Upgrade to Node V4 seven reasons (Programming)

- APF firewall installation and configuration under Linux (Linux)

- sed and awk in shell usage and some examples (Linux)

- To install Oracle Database Details and FAQ Summary under CentOS (Database)

- DataGuard Standby backup error RMAN-06820 ORA-17629 to solve (Database)

- ORA-00600 error solve one case (Database)

  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.
- View and modify Linux machine name (Linux)
- Linux process stack and process function stack frame (Linux)
- W and uptime command (Linux)
- Linux host dual LAN transceiver package ARP problem (Linux)
- To install CentOS 6.5 on your hard drive under Windows 7 (Linux)
- Thinking in Java study notes - initialization and cleanup (Programming)
- Extended VMware Ubuntu root partition size (Linux)
- Getting Started with Linux system to learn: how to configure a static IP address for CentOS7 (Linux)
- A drop datafile Oracle bug (Database)
- Command filter MySQL slow query log (Database)
- Detailed installation OpenCV2.3.1 under CentOS 6.5 (Linux)
- MySQL Study of --Percona Server 5.5 Upgrade 5.6 (Database)
- RCU lock in the evolution of the Linux kernel (Linux)
- Red Hat Enterprise Linux configuration VNC multi-user access methods (Linux)
- Java transient keyword (Programming)
- Kali Linux virtualbox rc = Error 1908 workaround (Linux)
- Java interface (Programming)
- CentOS / Linux SELinux Close (Linux)
- Linux, Apache Web site security settings (Linux)
- Some security configuration of Linux systems (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.