FANDOM


1. 系统安全 https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04

2. 安装ngxin,mysql,php https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04

3. 安装Let's encrypt https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 注意ssl证书失效时间,才三个月,擦,失效后运行Certbot。

4. 增加HTTP/2支持。https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-with-http-2-support-on-ubuntu-16-04 其实只要在nginx 网站配置文件ssl部分添加http2即可,但是包括chrome插件HTTP/2 and SPDY indicator等在内的几个工具都显示网站还是HTTP1.1,从https://tools.keycdn.com/http2-test 网站以及命令行

openssl s_client -connect www.pentaxgear.com:443 -nextprotoneg ‘’

都显示已经开启了HTTP/2,很奇怪。

5. nginx添加两个网站:https://gist.github.com/santoshachari/8238a7a4e7132d3c86a8720a81cd9fa1

或者直接复制default配置文件,将有关ssl,server_name及root的配置修改一下,链接到sites-enabled里面,然后重新获取let's encrypt证书即可。注意,新网站的nginx配置文件中listen后的default_server要去掉,有两处。

6. 安装wordpress,https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-16-04

关于wordpress安全性的配置,可以看这篇帖子,安全无小事。 http://www.morphatic.com/2016/05/21/super-fast-secure-wordpress-install-on-digitalocean-with-nginx-php7-and-ubuntu-16-04-lts/ 文中还有很多优化的细节,很值得学习。

如果wordpress安装了W3 total cache插件的话,会有问题,vps内存非常紧张,估计是插件和php7的兼容问题,我的解决办法:https://www.itnota.com/fixing-php7-compatibility-issue-w3-total-cache/ 很简单,修改后一个多小时nginx的errorlog没有报错。update:vps还是会报内存不够的错误,删除了w3插件,装上的官方的插件之后也偶尔报错,但是次数减少了,不清楚是否是插件的原因。

7. 安装phpmyadmin, https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-with-nginx-on-an-ubuntu-14-04-server  文中nginx比较老,将phpmyadmin的目录链接到某网站root下就可以了,比如  ln -s /usr/share/phpmyadmin /var/www/html 

8.mysql优化工具 http://mysqltuner.com/ 专门讲mysql优化的网站 http://www.speedemy.com/

使用命令 mysqladmin -u root -p variables >> log 可以查看mysql一些默认参数的设定值。

上面网站里值得一看的一篇文章:

http://www.speedemy.com/17-key-mysql-config-file-settings-mysql-5-7-proof/

mysql内存计算器 http://www.mysqlcalculator.com/ 试了下,不准啊,但有参考价值。

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.