分类目录归档:VPS

goaccess教程/中文/更新

debian/ubuntu安装

一般安装方法
apt update
apt install goaccess
跟进官方稳定版本方法
wget -O - https://deb.goaccess.io/gnugpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/goaccess.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/goaccess.gpg arch=$(dpkg --print-architecture)] https://deb.goaccess.io/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/goaccess.list
sudo apt-get update
sudo apt-get install goaccess

crunchbits 11.69测试

第一次测试

yabs第一次测试  开机第一次测试

# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
#              Yet-Another-Bench-Script              #
#                     v2023-04-23                    #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## 

haproxy docker quic

FROM ubuntu:20.04 AS builder-ssl

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update && apt-get -y install git make gcc

RUN git clone --depth 1 https://github.com/quictls/openssl.git
RUN cd /openssl && ./config enable-tls1_3 && make -j$(nproc) && make install_sw

FROM ubuntu:20.04 AS builder

用nginx动态添加指定端口白名单

1.准备好域名及搭好https服务的nginx,这里以域名123.com为例,https://123.com需要能正常访问

2.需要设置白名单的服务搭好  这里以端口10086为例

下面教程为debian/ubuntu系统

预先准备的组件,若已安装可跳过

apt install rsyslog iptables nano -y

下载处理白名单程序

wget -O /usr/local/bin/selfhelp-iptables https://github.com/aoyouer/selfhelp-iptables/releases/download/2.3.4/selfhelp-iptables

赋予运行权限

chmod +x /usr/local/bin/selfhelp-iptables

添加nginx路径反代上面程序的端口
编辑nginx配置 路径仅供参考

nano /etc/nginx/conf.d/123.com

在location / 或者location其他路径下添加,这里/2表示后续通过访问https://123.com/2来添加白名单,按需修改路径

location /2 {
                proxy_set_header  X-real-ip $remote_addr;
                proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_pass 

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

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;
........