centos6 新更新源

国外
sed -i "s/enabled=1/enabled=0/g" /etc/yum/pluginconf.d/fastestmirror.conf && mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.old && curl -k -o /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Official.repo && yum install wget -y

国内
sed -i "s/enabled=1/enabled=0/g" /etc/yum/pluginconf.d/fastestmirror.conf && mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.old && curl -k -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo && yum install wget -y

debian8 新更新源

nano /etc/apt/sources.list
deb http://cdn-fastly.deb.debian.org/debian/ jessie main
deb-src http://cdn-fastly.deb.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

deb http://archive.debian.org/debian jessie-backports main
deb-src http://archive.debian.org/debian jessie-backports main

nano /etc/apt/apt.conf
Acquire::Check-Valid-Until "false";

apt-get install htop nano  -t jessie-backports
apt-get update && apt-get 

Yankee Scalable-Reactive TCP

For Debian 8/Ubuntu 16 ONLY.

Linux-headers is required to get compilation done.
This module is supported in kernel version after 4.9 .

(Latest version – 2.2.1)

  1. export MOD=react_rc2
  2. apt-get install make gcc-4.9 -y
  3. wget -O ./tcp_$MOD.c
    https://gist.github.com/anonymous/27b7ea6e93acdd23b097ab1a399c1287/raw/00c318f613856ed400c556126b851d18369e936b/tcp_react_rc2.c
  4. echo

dnscrypt-proxy

wget -O dnscrypt-proxy.sh https://raw.githubusercontent.com/ylx2016/reinstall/master/dnscrypt-proxy.sh && chmod +x dnscrypt-proxy.sh && ./dnscrypt-proxy.sh
dnsmasq_install=1
if [[ ${dnsmasq_install} == 1 ]]; then
  if [[ ! -d /etc/dnscrypt-proxy/ ]]; then
    mkdir /etc/dnscrypt-proxy/
  fi
ipv6_true="false"
block_ipv6="true"
if [[ -n ${myipv6} ]]; then
  

用alpine基于smartdns建立本地DNS服务器

因为是虚拟机下使用,下载虚拟机专用的镜像

https://alpinelinux.org/downloads/    Virtual板块下载86_64镜像

当前 http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/x86_64/alpine-virt-3.12.1-x86_64.iso


创建虚拟机 当前alpine内核是5.4,虚拟机创建及初始化过程略过

apk update && apk upgrade && apk add sudo nano

下载并安装smartdns  from https://github.com/pymumu/smartdns

wget https://github.com/pymumu/smartdns/releases/download/Release33/smartdns.1.2020.09.08-2235.x86_64-linux-all.tar.gz
tar xvf smartdns.1.2020.09.08-2235.x86_64-linux-all.tar.gz && cd smartdns && chmod +x ./install && mkdir mkdir /etc/default && ./install -i

wordpress处理cdnjs加载慢的问题

我这里用的是nginx替代字符串的方法,在appnode下仅供参考

location ~ ^/.+\.php(/|$) {
sub_filter '//cdnjs.cloudflare.com/ajax/libs' '//cdn.staticfile.org';
sub_filter '//cdn.datatables.net' '//cdn.staticfile.org/datatables';
sub_filter_once off;
........