一台云服务器可以做多少个网站,wordpress友链代码,网站改版后百度不收录,网站发布方式 提高树莓派支持安装非常多的操作系统#xff0c;如官方所展示#xff1a;这里我选择了推荐的 Raspbian 系统#xff0c;它基于 Debian#xff0c;这就意味着我可以按照 Debian 的方式来安装软件。一、安装 Nginx0、先将系统更新到最新状态$ sudo apt-get update sud…树莓派支持安装非常多的操作系统如官方所展示这里我选择了推荐的 Raspbian 系统它基于 Debian这就意味着我可以按照 Debian 的方式来安装软件。一、安装 Nginx0、先将系统更新到最新状态$ sudo apt-get update sudo apt-get upgrade1、下载 nginx$ sudo apt-get install nginx -y2、启动 Nginx 服务$ sudo /etc/init.d/nginx start3、打开树莓派的 IP 地址[ ok ] Starting nginx (via systemctl): nginx.service.二、安装 PHP配合Nginx使用时PHP的安装包和Apache2配合使用稍微有些不同PHP以FastCGI接口方式运行因此我们需要安装PHP FPM包。1、下载 PHP$ sudo apt-get install php5-fpm -y2、在 Nginx 启动 PHP$ cd /etc/nginx$ sudo vim sites-enabled/default找到index index.html index.htm;添加 index.phpindex index.php index.html index.htm;往下滚找到# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000## location ~ \.php$ {去除 # 注释改成location ~ \.php$ {include snippets/fastcgi-php.conf;fastcgi_pass unix:/var/run/php5-fpm.sock;}它应该看起来像# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000#location ~ \.php$ {include snippets/fastcgi-php.conf;# With php5-cgi alone:# fastcgi_pass 127.0.0.1:9000;# With php5-fpm:fastcgi_pass unix:/var/run/php5-fpm.sock;}重新加载配置文件$ sudo /etc/init.d/nginx reload3、启动 PHP$ sudo service php5-fpm start三、测试 PHP1、重命名文件$ cd /var/www/html/$ sudo mv index.nginx-debian.html index.php2、编辑文件$ sudo vim index.php3、在合适的地方填入4、观看效果四、安装 MySQL待续翻译自