• wsl Windows Subsystem Linux(WSL)安装
    netnr 2019-05-11 10
    # 教程链接
    https://docs.microsoft.com/zh-cn/windows/wsl/install-manual
    
    # 使用开发人员模式
    设置》更新和安全》开发中选项》开发人员模式
    
    # 添加 Windows 应用程序
    # 适用于 Linux 的 Windows 子系统,或 PowerShell 执行命令安装
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • aegis centos卸载阿里云盾服务
    netnr 2019-05-09 8
    # 查看开机启动的服务名
    chkconfig --list
    
    # 一般情况下阿里云盾的服务是aegis
    # 停止服务
    service aegis stop
    
    # 删除服务
    chkconfig --del aegis
  • linux-task-manager.sh 任务管理器
    netnr 2019-04-20 6
    yum install epel-release -y && yum install htop -y # 安装 htop
    
    # help
    https://www.tecmint.com/htop-linux-process-monitoring/
    
    
    npm install gtop -g # 安装 gtop
    
    # help
    https://github.com/aksakalli/gtop
  • OfficeOnlineServer Office Online Server 调用说明
    netnr 2019-04-17 806
  • ab Linux 使用 ab 压力测试工具
    netnr 2019-04-17 487
    yum install httpd-tools # 安装
    ab -V # 版本
    
    # Get 请求,10 并发 总 100 次
    ab -c 10 -n 100 https://netnr.eu.org/
    
    # Post 请求(发送当前目录下的 post.txt 文件:uid=1&pwd=1)
    ab -c 10 -n 100 -p post.txt https://netnr.eu.org/
    # Post 请求(发送当前目录下的 post.txt)
    ab -c 10 -n 100 -T 'application/json' -p post.txt https://netnr.eu.org/
  • 88 88
    念尘草 2019-04-13 227
  • rwx.md Linux修改文件属性和权限
    netnr 2019-04-09 509
    ### 文件权限描述由10个字符组成,例如,“-rwxr-xr--”、"drwxr-xr-x"
    + 第一个字符的含义为:
        - d: 目录
        - -: 文件
        - l: 连接文件
        - b: 设备文件里面的可供存储的接口设备
        - c: 设备文件里面的串行端口设置,例如键盘、鼠标
    + 接下来的9个字符,分为三组,每组三个字符,均为 `rwx` 的三个参数组合。位置不会改变,没有某权限,则出现 `-` 号
    + 三组字符中,第一组表示文件所有者的权限;第二组表示同用户组的权限;第三组表示others的权限
    + 三种身份又有三种权限,r(读)、w(写)、x(执行)
  • netsh-interface.bat windows使用netsh命令实现端口转发
    netnr 2019-03-29 396
    ::安装IPv6,XP或更低版本要安装,安装后不需要启用,win7及以上不需要
    netsh interface ipv6 install
    
    ::添加端口转发 192.168.1.2:2433 => 192.168.1.3:1433
    netsh interface portproxy add v4tov4 listenaddress=192.168.1.2 listenport=2433 connectaddress=192.168.1.3 connectport=1433
    
    ::添加端口转发 *:2433 => 192.168.1.3:1433 不设置listenaddress
    netsh interface portproxy add v4tov4 listenport=2433 connectaddress=192.168.1.3 connectport=1433
    
    ::删除端口转发 192.168.1.2:1433
  • Fetch-QQ-Mail.js 提取QQ邮箱发送的日志,为月度考核作业
    netnr 2019-03-29 65
    /*
        更新时间:2019-03-29
        使用方法:打开QQ邮箱,选择【已发送】界面,打开浏览器控制台(或按F12),拷贝脚本粘贴回车(按Enter)
     */
    
    (function () {
        var win = document.getElementById('mainFrame').contentWindow;
        var tds = win.document.getElementsByTagName('td');
    
        //邮件ID
  • install-docker.sh linux 安装 docker
    netnr 2019-02-19 403
    wget -qO- get.docker.com | bash # 一键安装
    
    # ubuntu 清华镜像安装
    apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common # 安装依赖
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
    add-apt-repository "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable" # 添加 arm64 软件仓库
    apt-get update && apt-get install docker-ce docker-ce-cli containerd.io
    # help
    https://mirror.tuna.tsinghua.edu.cn/help/docker-ce/
    https://docs.docker.com/engine/install/ubuntu/
  • install-nodejs.sh 安装 nodejs
    netnr 2019-02-18 385
    # 版本号支持:lts.x current.x 5.x 6.x 7.x 8.x 10.x 12.x 14.x 16.x
    
    # CentOS
    curl -fsSL https://rpm.nodesource.com/setup_lts.x | bash - # As root
    curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash - # No root privileges
    yum install -y nodejs # 安装
    
    # Using Ubuntu
    curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
    sudo apt-get install -y nodejs
  • ifcfg 设置静态 IP
    netnr 2019-01-23 480
    # 进入目录
    cd /etc/sysconfig/network-scripts
    ls
    
    # ifcfg-ens开头的文件,如 ifcfg-ens33
    
    # 默认配置文件如下:
    
    TYPE=Ethernet
    PROXY_METHOD=none
  • conn.net.md ASP.NET数据库访问驱动(Oracle、MySQL、PostgreSQL等),VS开发使用
    netnr 2019-01-18 9
    # Oracle
    
    ### ODBC 驱动
    https://www.oracle.com/database/technologies/dotnet-odacdev-downloads.html  
    https://www.oracle.com/database/technologies/odac-downloads.html (64bit)
    
    ### 下载 Oracle Visual Studio 工具和 ADO.NET 数据访问提供程序
    https://www.oracle.com/technetwork/topics/dotnet/downloads/index.html
    
    ### Oracle 数据库下载
  • acme.sh 使用 acme.sh 从 ZeroSSL 生成免费的 https 证书
    netnr 2019-01-17 518
    yum install socat # CentOS7 需要先安装 socat
    
    curl https://get.acme.sh | sh -s email=netnr@netnr.com # 一键安装
    
    # 从 git 安装
    git clone https://github.com/acmesh-official/acme.sh.git && cd ./acme.sh
    ./acme.sh --install -m netnr@netnr.com --server zerossl
    
    # 安装完后重新加载 Bash
    bash
  • 字典示例 数据字典例子
    netnr 2019-01-16 378
  • 文档示例 展示文档示例
    netnr 2019-01-16 358
  • grub.cfg CentOS 7 修改开机等待时间
    netnr 2019-01-12 11
    # 编辑配置
    vi /boot/grub2/grub.cfg
    
    # 找到位置
    set timeout_style=menu
    set timeout=5 
    
    # set timeout=1 建议修改为 1 秒
    
    # 保存