Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Vagrant build LNMP environment     - Windows 8.1 hard drive to install Ubuntu 14.04 dual system reference tutorials and multi-drive Precautions (Linux)

- Linux environment has been running Tomcat how to deploy the new Tomcat (Server)

- Linux Apache server security (Linux)

- Atheros AR8161 / AR8162 network card driver problem solving in CentOS 6.4 (Linux)

- Getting Started Linux Shell Scripting (Programming)

- How Linux Log Analysis (Linux)

- To install MySQL on Linux (Database)

- Java NIO in the world (Programming)

- DVD production using CentOS installation source within the company Yum (Linux)

- About Samba certification process and permissions (Linux)

- The difference between IPython and Python (Linux)

- Linux file content inspection - cat, tac, no, more, less, head, tail, od (Linux)

- Java collections series (Programming)

- C ++ casts New Standard Comments (Programming)

- Oracle table compression Technology Introduction (Database)

- How to force Linux users to change the initial password the first time you log in (Linux)

- Linux user login ban (Linux)

- Linux Shell Understanding and Learning (Linux)

- RHEL7 unattended automatic installation DHCP + TFTP + SYSLINUX + TFTP + Kickstart (Linux)

- Java object serialization (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: "192.168.10.10"
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"
end
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
modify

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:
fastcgi_pass 127.0.0.1:9000;
# # 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 = 127.0.0.1: 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.
     
         
       
         
  More:      
 
- Linux system monitoring tool set cpu (Linux)
- Hardware Firewall Basics (Linux)
- hexdump Linux command (Linux)
- Eclipse installs support for Java 8 (Linux)
- RHEL 6.4 installed MySQL 5.6.27 (Database)
- Upgrade to Linux Mint 16 petra Mint 17 Qiana (Linux)
- MySQL primary and secondary replicate data inconsistencies (Database)
- How to create a remote (Linux)
- Use mod_wsgi Django application deployment (Server)
- To compiler and install MariaDB-10.0.20 under CentOS 6.6 (Database)
- C # and JavaScript arrays to re-summary (Programming)
- Debian 7.6 install Nvidia graphics driver (Linux)
- Analysis JavaBean (Programming)
- Nonstandard IMP-00010 error processing one case (Database)
- Unix system security configuration (Linux)
- Safety testing Unix and Linux server entry succinctly (Linux)
- Linux operation and maintenance of the actual file system, file links (Linux)
- LVM mirrored logical volume to achieve (Linux)
- Use LVM partition on Ubuntu and easily adjust the snapshot (Linux)
- Java and Python use make way dictionary word search script (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.