Ubuntu12.04 one-click installation of lnmp environment, because it is to build a test environment, all use apt installation, cancel the boot start :#! /Bin/bashsudoapt-get-yinstallpython-devsudoapt-get-yinstallmysql-serve
One-click installation of lnmp environment in Ubuntu 12.04, because it is to build a test environment, all use apt installation, cancel boot:
- #! /Bin/bash
-
- Sudo apt-get-y install python-dev
- Sudo apt-get-y install mysql-server mysql-client libmysqlclient-dev
- Sudo apt-get-y install python-setuptools
- Sudo easy_install mysql-python
- Sudo apt-get-y install nginx
- Sudo apt-get-y install php5-cli php5-cgi php5-fpm php5-mcrypt php5-mysql php5-curl
- Sudo echo"Extension = mysqli. so">/Etc/php5/fpm/php. ini
- Sudo apt-get-y install sysv-rc-conf
- Sudo sysv-rc-conf -- level2345Nginx off
- Sudo sysv-rc-conf -- level2345Php5-fpm off
- Sudo sed-I'S/start on runlevel \ [2345 \]/start on runlevel \ [\]/'/Etc/init/mysql. conf
- Cat>/etc/nginx/sites-availabel/default <EOF
- Server {
-
- Root/usr/share/nginx/www;
- Index. php index.html index.htm;
- Server_name localhost;
-
- Location ~ \. Php $ {
- Fastcgi_split_path_info ^ (. + \. php) (/. +) $;
- Fastcgi_pass127.0.0.1:9000;
- Fastcgi_index index. php;
- Include fastcgi_params;
- }
-
- }
- EOF
- Sudo/etc/init. d/mysql restart
- Sudo/etc/init. d/nginx restart
- Sudo/etc/init. d/php5-fpm restart