云服务器基本环境配置(php5.6+mysql+nginx)

1、安装nginx

sudo apt-get install nginx

nginx 基本配置

server{
        listen 80;
        server_name www.xxxxxx.cn;
        root /var/www/xxxxx;
        error_log /var/www/xxxxx/error.log;
        location /{
                index index.php index.htm index.html;
        }
        location ~ .php$ {
            fastcgi_pass unix:/run/php/php5.6-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include fastcgi_params;
       client_max_body_size 500m;//上传文件大小限制 } }

 

2、安装php5.6

//添加 PPA
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6 php5.6-cli php5.6-curl php5.6-fpm php5.6-intl php5.6-mcrypt php5.6-mysqlnd php5.6-gd

3、安装mysql

sudo apt-get install mysql-server

 

posted @ 2018-07-04 14:57  jyLi  阅读(330)  评论(0编辑  收藏  举报