美文网首页
ubuntu16.04+php+Nginx

ubuntu16.04+php+Nginx

作者: 薛子育 | 来源:发表于2017-07-26 11:08 被阅读0次

    mysql两次密码

    sudo apt install -y mysql-server mysql-client
    

    php 5.6

    sudo add-apt-repository -y ppa:ondrej/php
    sudo apt update
    sudo apt install -y php5.6 php5.6-fpm php5.6-mysql php5.6-mbstring php5.6-curl php5.6-xml
    

    nginx轻量级服务器

    sudo apt install -y nginx
    

    报错:

    E: Sub-process /usr/bin/dpkg returned an error code (1)
    sudo service apache2 stop
    
    sudo vim /etc/nginx/sites-enabled/default
    # root /var/www/html;
    root /project/path;...(项目路径)
    location ~ \.php$ { 
         include snippets/fastcgi-php.conf;
         fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
    }
    
    sudo systemctl reload nginx
    

    phpstorm

    sudo apt install -y php-xdebugsudo vim /etc/php/5.6/mods-available/xdebug.ini
    
    xdebug.remote_enable=1xdebug.remote_host=localhostxdebug.remote_port=9000xdebug.idekey=PHPSTROM
    
    sudo systemctl restart php5.6-fpm
    

    相关文章

      网友评论

          本文标题:ubuntu16.04+php+Nginx

          本文链接:https://www.haomeiwen.com/subject/idmnkxtx.html