【160126】服务器管理记录

  • Add sudoers

    whereis sudoers
    chmod u+w /etc/sudoers
    sudo nano /etc/sudoers
    chmod u-w /etc/sudoers

  • Nginx installing

    • Download

      sudo apt-get install nginx
      sudo apt-get install php5-cli php5-cgi mysql-server php5-mysql
      sudo apt-get install php5-fpm

    • Edit profile

      sudo nano /etc/nginx/sites-available/default

      root /var/www/html; index index.php index.html index.htm;
      location ~ \.php$ { include /etc/nginx/fastcgi_params; #需放在第一行,否则会出错 fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name; }

    • Run

      sudo spawn-fcgi -a 127.0.0.1 -p 9000 -C 10 -u www-data -f /usr/bin/php-cgi
      /etc/init.d/nginx start

【160126】服务器管理记录

https://devblog.citruxonve.net/posts/948b51e/

Author

Semprathlon / Simfae Dean

Posted on

01/26/2016

Updated on

07/19/2023

Licensed under

Comments