Debian7下安装Nginx+PHP+MariaDB

 

安装Nginx
Debian官方源里面的Nginx比较老,所以我们用Dotdeb源来安装Nginx。
添加Dotdeb源,使用vim打开 /etc/apt/sources.list:

vim /etc/apt/sources.list

添加如下两行:

deb http://packages.dotdeb.org wheezy all

deb-src http://packages.dotdeb.org wheezy all

导入GnuPG key:

wget http://www.dotdeb.org/dotdeb.gpg cat dotdeb.gpg | apt-key add –

然后安装Nginx

apt-get install -y nginx-full


安装MariaDB

apt-get install python-software-properties

apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db

add-apt-repository ‘deb http://mirror.jmu.edu/pub/mariadb/repo/5.5/debian wheezy main’

apt-get update

apt-get install mariadb-server

安装PHP

apt-get install php5-fpm php5-gd php5-mysql php5-memcache php5-curl memcached

启动Nginx并配置

启动Nginx

service nginx start

编辑配置文件

vim /etc/nginx/sites-available/default

重启Nginx

service nginx restart

 

原创文章,转载请注明: 转载自orvice's blog

并以超链接的形式注明本文链接地址:
https://blog.orx.me/post/627