阿里云的ECS公共系统镜像里有“Debian 8.0 64位”的选择项,下边以安装wordpress为例,简单记录一下安装环境的过程。
环境:Debian 8 64位, nginx-1.6.2,php-5.6,MariaDB-10.0
过程:
1. 创建文件 /etc/apt/sources.list,因为当前Debian 8的镜像系统中没有该文件,内容如下:
deb http://httpredir.debian.org/debian jessie main contrib non-free
deb-src http://httpredir.debian.org/debian jessie main contrib non-free
deb http://httpredir.debian.org/debian jessie-updates main contrib non-free
deb-src http://httpredir.debian.org/debian jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
2. 运行 apt-get update 的命令,更新软件包安装源
3. 运行 apt-get install nginx 命令,安装 nginx web
4. 运行 apt-get install php5-fpm php5-mysqlnd 命令,安装 php-fpm 及相应组件
5. 编辑默认的nginx站点配置文件/etc/nginx/sites-enabled/default,添加 index.php 类型的默认首页文件,及启用php
index index.html index.htm index.nginx-debian.html;
# 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;
}
6. 之后需要通过 systemctl restart nginx 命令重启 nginx 服务,以让更改生效
7. 运行 apt-get install mariadb-server 命令,安装 MariaDB (mysql)数据库服务端
8. 将wordpress的程序文件放在 /var/www/html 目录里,根据提示完成wordpress安装
参考:
https://wiki.debian.org/SourcesList
https://www.vultr.com/docs/setup-up-nginx-php-fpm-and-mariadb-on-debian-8
About httpredir.debian.org
The redirector aims to solve the problem of choosing a Debian mirror. It uses the geographic and network location of the user and the mirrors, the architecture of the requested files, IP address family, the availability and freshness of the mirrors, and a few other things.
The result: it selects the best mirror that can serve the file. Give the demonstration a try!
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。