Ubuntu12.04 one-click installation of lnmp Environment

Source: Internet
Author: User
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:

  1. #! /Bin/bash 
  2.  
  3. Sudo apt-get-y install python-dev
  4. Sudo apt-get-y install mysql-server mysql-client libmysqlclient-dev
  5. Sudo apt-get-y install python-setuptools
  6. Sudo easy_install mysql-python
  7. Sudo apt-get-y install nginx
  8. Sudo apt-get-y install php5-cli php5-cgi php5-fpm php5-mcrypt php5-mysql php5-curl
  9. Sudo echo"Extension = mysqli. so">/Etc/php5/fpm/php. ini
  10. Sudo apt-get-y install sysv-rc-conf
  11. Sudo sysv-rc-conf -- level2345Nginx off
  12. Sudo sysv-rc-conf -- level2345Php5-fpm off
  13. Sudo sed-I'S/start on runlevel \ [2345 \]/start on runlevel \ [\]/'/Etc/init/mysql. conf
  14. Cat>/etc/nginx/sites-availabel/default <EOF
  15. Server {
  16.  
  17. Root/usr/share/nginx/www;
  18. Index. php index.html index.htm;
  19. Server_name localhost;
  20.  
  21. Location ~ \. Php $ {
  22. Fastcgi_split_path_info ^ (. + \. php) (/. +) $;
  23. Fastcgi_pass127.0.0.1:9000;
  24. Fastcgi_index index. php;
  25. Include fastcgi_params;
  26. }
  27.  
  28. }
  29. EOF
  30. Sudo/etc/init. d/mysql restart
  31. Sudo/etc/init. d/nginx restart
  32. Sudo/etc/init. d/php5-fpm restart
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.