Advertisement
shokti

ubuntu 12.10 - LEMP install

Dec 26th, 2012
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. add nginx repository:
  2. sudo apt-get install python-software-properties
  3. sudo add-apt-repository ppa:nginx/stable
  4.  
  5. update database:
  6. sudo apt-get update
  7.  
  8. install nginx:
  9. sudo apt-get install nginx
  10.  
  11. restart nginx:
  12. sudo /etc/init.d/nginx start
  13.  
  14. install php(php5-fpm):
  15. sudo apt-get install php5-cli php5-cgi php5-fpm php5-mcrypt
  16.  
  17. edit nginx config file:
  18. sudo nano /etc/nginx/sites-available/default
  19.  
  20. The changes you will need to make are as follows:
  21. 1) index index.html index.htm;
  22. to
  23. index index.html index.htm index.php;
  24.  
  25. uncomment the following lines:
  26. location ~ \.php$ {
  27. fastcgi_pass unix:/var/run/php5-fpm.sock;
  28. fastcgi_index index.php;
  29. include fastcgi_params;
  30. }
  31. restart nginx and php5-fpm:
  32. sudo /etc/init.d/nginx restart
  33. sudo /etc/init.d/php5-fpm
  34.  
  35. install mysql:
  36. sudo apt-get install mysql-server mysql-client php5-mysql
  37.  
  38. install phpmyadmin(if ask what type of webserver-apache or lighthttpd- don't pick any and continue. if ask about dbconfig answer no):
  39. sudo apt-get install phpmyadmin
  40.  
  41. link phpmyadmin to nginx default path:
  42. ln -sf /usr/share/phpmyadmin /usr/share/nginx/html
  43.  
  44. restart nginx:
  45. /etc/init.d/nginx restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement