apt-get 除了可以更新、安装,还可以删除已安装程序
包括apache、mysql、php等等,只要你觉得程序有毛病,一言不合删除即可。
使用:
apt-get remove --purge apache\*
apt-get remove --purge mysql\*
即可删除所有相关程序及文件
再运行apt-get clean 扫尾~~
ubuntu/debain上安装最新的nginx
Ubuntu自带更新程序默认的nginx并非新版,要安装最新的nginx,以stable版为例(1.2.10),最简便方法是: 继续阅读“ubuntu/debain上安装最新的nginx”
解决update时key不可用的问题
debian/ubuntu在进行自动更新时候可能会遇到“There is no public key available for the following key IDs”的错误提示
可以通过以下命令解决:
apt-get install debian-keyring debian-archive-keyring
apt-key update
之后再运行
apt-get update && apt-get upgrade
即可!
debian上安装最新的nginx
nginx目前依然是发展势头强劲的服务器系统。大约从1.8版本起分为mainline和stable两个分支,总之新版总是有很多新特征更优化吧。
但是默认debian安装的都是nginx 1.62版本,要安装新版本,需要更新source.list 继续阅读“debian上安装最新的nginx”
nginx下WP的url rewrite
nginx可以像apache那样支持htaccess来实现rewrite,但实际上htaccess需要对文件夹内每个文件进行一次判断来实现重写,效率并不高。 继续阅读“nginx下WP的url rewrite”
apt-get update丢失key
一些主机商的源码包并非标准版本,在运行apt-get update时候会提示
W: There is no public key available for the following key IDs:
9D6D8F6BC857C906
W: There is no public key available for the following key IDs:
7638D0442B90D010
之类的错误
解决办法:
运行apt-get install debian-keyring debian-archive-keyring
apt-get update
即可。
source.list
一些VPS主机只提供精简版OS,这样子在apt-get一些程序时候会提示找不到等等错误
最好的解决办法就是更改/etc/apt下面的source.list文件
今天一台debian8 64bit mini版本的主机安装mariaDB时候折腾半天,总是提示“无法找到版本” 继续阅读“source.list”
letsencrypt
letsencrypt 目前提供免费的SSL证书,关于这项服务近一年来网上有很多介绍,
使用
git clone https://github.com/letsencrypt/letsencrypt cd letsencrypt ./letsencrypt-auto --agree-dev-preview --server https://acme-v01.api.letsencrypt.org/directory certonly
debian8上安装PHP7.06+MariaDB+Nginx1.10
对于Linux VPS来说,本人最爱的是Debian和Ubuntu系统,这两个OS也是Unix世界中使用最为广泛活力最强的OS之一。Ubuntu可以说是Debian的衍生系,桌面应用更为友好一些,但在在作为server的表现方面,Debian略强。目前Ubuntu已经推出Ubuntu16,而Debian是Debian8,前两天在DO上将Debian8+Nginx1.10+PHP7.06+MariaDB5.5安装配置成功,在此分享一下经验。
debian和php
新败的主机开始折腾!系统选debian7×64,服务器选LEMP(也就是LNMP),而不是常用的LAMP,因为NGINX似乎更简单高效,而且fastcgi的运行模式似乎也比apache内置模式要好
。Nginx (pronounced “engine x”, providing the “E” in LEMP). 继续阅读“debian和php”

