安装网站服务器:
1.安装nginx:http://my.oschina.net/duwaiweb/blog/80578
apt-get install nginx
/etc/init.d/nginx start
配置域名:http://wiki.ubuntu.org.cn/Vps
nginx默认用户名和用户组:www-data:www-data
2.安装PHP-FPM:
#
# deb cdrom:[Debian GNU/Linux 8.5.0 _Jessie_ - Official amd64 DVD Binary-1 20160604-15:35]/ jessie contrib main
deb http://mirrors.ustc.edu.cn/debian/ jessie main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian/ jessie main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ jessie-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian/ jessie-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ jessie-backports main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian/ jessie-backports main contrib non-free
deb http://mirrors.ustc.edu.cn/debian-security/ jessie/updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian-security/ jessie/updates main contrib non-free
apt-get install php5-cgi php5-fpm php5-gd php5-mysql php5-curl php5-mcrypt php5-common php-apc
apt-get install php5-mysqlnd php5-readline
##然后安装了mysql 和 phpmyadmin
/etc/nginx/sites-enabled里面的example.com中,修改php那段为:
index index.html index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
修改/etc/nginx/fastcgi_params文件,在文件最后添加
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
重启nginx和php5-fpm
<?php phpinfo(); ?>
APC 可显著加速 PHP 应用的速度。在应用中加入 APC 可提升应用的响应速度,降低服务器负载。
apt-get install php-apc
/etc/init.d/php5-fpm restart
/etc/init.d/nginx restart
#location ~ \.php$ {
location ~ \.php($|/) {
3.安装mysql:
apt-get install mysql-server
nano /etc/mysql/my.cnf
[client]下添加default-character-set=utf8
修改root密码:
# /etc/init.d/mysql stop
# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
# mysql -u root mysql
mysql> update user set password=password('fjvnriQ!1') where user='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
# /etc/init.d/mysql restart
# mysql -uroot -p
安装phpmyadmin
注意不要再按空格选择 apache2 , 直接回车下一步。
cd /var/www/html
ln -s /usr/share/phpmyadmin .
以上 debian8架设nginx+php+mysql 已经完成,下面是可能会出现的问题,如果你已经架设成功,可以不用看下面的内容。
导入数据库时提示文件太大:在nginx.conf的http中增加 client_max_body_size 8m,
/etc/php5/fpm中搜索“upload_max_filesize”将其默认的2M修改大一点就行了
wordpress伪静态出错
编辑/etc/nginx/sites-enabled/default 修改自己网站的location / { 内容为:
location / {
try_files $uri $uri/ =404;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
相关推荐
DebianLNMP是一个用Linux Shell编写的可以为Debian/Ubuntu VPS(VDS)或独立主机安装LNMP(Nginx、MySQL、PHP、phpMyAdmin)生产环境的Shell程序。DebianLNMP 是以 Debian + Linux + Nginx + MySQL + PHP 的安装顺序命名...
Debian 5 VPS下的Nginx+PHP+MySQL的解决方案
Debian+Nginx+PHP(FastCGI)+MySQL搭建LNMP服务器
在友善之臂NanoPC-T2上安装nginx服务器和php5-fpm的deb安装包及其所依赖的安装包。
Debian+Nginx+PHP(FastCGI)+MySQL搭建LNMP服务器(二版)
LNMP指的是一个基于CentOS/Debian编写的Nginx、PHP、MySQL、phpMyAdmin、eAccelerator一键安装包。可以在VPS、独立主机上轻松的安装LNMP生产环境。
LNMP一键安装包是一个用Linux Shell编写的可以为CentOS/RadHat/Fedora、Debian/Ubuntu/Raspbian VPS(VDS)或独立主机安装LNMP(Nginx/MySQL/PHP)、LNMPA(Nginx/MySQL/PHP/Apache)、LAMP(Apache/MySQL/PHP)生产环境的...
最近尝试把项目迁移到Python环境下,特别新装了一台干净的Debian系统,准备重新配置环境,上网找了一些运行Python Web的环境方案,最后敲定Nginx+uWSGI组合,Nginx用得比较多,熟练些;uWSGI据说性能不错,想尝试...
第三十三章:Lvs+Keepalived+Nginx+Tomcat高可用集群1
搭建 Debian 7.0.1 环境 + Mysql 5.5.22 + php5.5.1 + moodle 24 提供参考,顺被自己备注
Debian6系统下使用之前发布的“DebianLNMP”服务器软件套件,DebianLNMP一键安装包是一个快捷的服务器套件,轻轻松松全自动安装LNMP(Nginx、MySQL、PHP、phpMyAdmin)可直接用再生产环境。现在我们已经在Debian/...
解决深度系统v15中无法安装libjasper1的问题,直接下载安装即可。原始的网址为:http://ftp.br.debian.org/debian/pool/main/j/jasper/libjasper1_1.900.1-debian1-2.4+deb8u3_amd64.deb
DebianLNMP加强版一键安装包Debian6配置Nginx PHP5.3 MySQL最快最新 一如既往,安装快捷方便、迅速! 直接给出安装方法:最快安装、最新稳定版、最省资源! 两步安装即完成命令(Pro加强版) root@DebianLNMP-...
在Debian6系统下安装LNMP(Debian6 + Nginx1.2.x + PHP5.3.x + MySQL5.5.x 最省资源一键安装包)只需要上面两条命令。 DebianLNMP是一个用Linux Shell编写的可以为Debian/Ubuntu VPS(VDS)或独立主机安装LNMP(Nginx、...
在Debian6系统下安装LNMP(Debian6 + Nginx1.2.x + PHP5.3.x + MySQL5.5.x 最省资源一键安装包)只需要上面两条命令。 DebianLNMP是一个用Linux Shell编写的可以为Debian/Ubuntu VPS(VDS)或独立主机安装LNMP(Nginx、...
BBS-GO论坛程序部署简单教程(Debian10 Linux系统+Caddy服务器+Mysql数据库)
Ubuntu Debian(NGINX/PHP/MYSQL)快速配置工具LNMP云安装 Ubuntu Debian云安装基于debian apt-get 快速配置安装nginx php mysql等。LNMP云安装Ubuntu Debian(NGINX/PHP/MYSQL)快速配置工具经测试,整个过程约2-5分钟...
debian 5+xdmcp+oracle 10g debian 5成功安装oracle 10g文档之前的系统配置文档