• https://zhuanlan.zhihu.com/p/117547388

     

    wget -qO- bench.sh | bash
    #或者
    curl -Lso- bench.sh | bash
    #或者
    wget -qO- 86.re/bench.sh | bash
    #或者
    curl -so- 86.re/bench.sh | bash

  • docker compose 常用操作命令

     

    3.常用命令

    docker-compose up -d nginx                     构建建启动nignx容器

    docker-compose exec nginx bash            登录到nginx容器中

    docker-compose down                              删除所有nginx容器,镜像

    docker-compose ps                                   显示所有容器

    docker-compose restart nginx                   重新启动nginx容器

    docker-compose…[阅读更多]

  •  

    进入容器

    # cd /root/xxx

    //停止运行的bitwarden容器

    docker compose stop

    //拉取最新镜像

    docker compose pull

    //重新构建并启动

    docker compose up -d –build

  •  

    vim常用命令之多行注释和多行删除

     

    vim中多行注释和多行删除命令,这些命令也是经常用到的一些小技巧,可以大大提高工作效率。

     

    1.多行注释:

    1). 首先按esc进入命令行模式下,按下Ctrl + v,进入列(也叫区块)模式;

    2). 在行首使用上下键选择需要注释的多行;

    3). 按下键盘(大写)“I”键,进入插入模式;

    4). 然后输入注释符(“//”、“#”等);

    5). 最后按下“Esc”键。 注:在按下esc键后,会稍等一会才会出现注释,不要着急~~时间很短的

     

     

    2.删除多行注释:

    1). 首先按esc进入命令行模式下,按下…[阅读更多]

  • 该方式也适用于系统垃圾清理

    # cd /

    # 通过df -h 和 du -sh * |sort -h 命令

    # 清除/var/log

    # 清除mysql bin log,活着关闭bin-log日志

  • zabbix cpu 爆满导致pve 宿主机卡死,这里涉及到zabbix server 配置参数优化

     

     

  • okass 在版块 Linux平台 中发起了话题 ubuntu清理系统垃圾 2年前

    1.clean 命令删除所有的软件安装包。即可删除所有存储在本地计算机的所有软件安装包。

    sudo apt-get clean

    2.autoclean 命令删除不再可用的软件安装包

    sudo apt-get autoclean

    3.remove 命令删除特定软件

    sudo apt-get remove 软件名

    4.用 purge 命令删除软件“残余”

    sudo apt-get purge 软件名

    5.autoremove 命令删除不再需要的依赖软件包

    sudo apt-get autoremove

     

  • okass 在版块 Coding 中回复了话题 Apache2 相关优化专题 2年前

    注意事项:

     

    • 升级 Apache 到最新版本,新版本往往包含性能提升和安全更新。
    • 在 httpd.conf 中设置 “HostNameLookups off” 能避免针对每个访问者的 DNS 域名的反向查询。
    • 对于繁忙的网站,在 httpd.conf 中设置 “MaxClients 230” 或者更高。这项设置让更多的 httpd 进程同时响应请求,并避免了处理器排队的情况发生。
    • 采用另外一台服务器处理图片文件。
    • 缺保您的 Web 页面和 CGI 页面采用了浏览器缓冲技术。具体的文章可以参考本站:采用 mod_gzip 加速 Zope 和 Apache
    • 保持您的 Ap…

    [阅读更多]

  • okass 在版块 Coding 中回复了话题 Apache2 相关优化专题 2年前

    2. worker模式

     

    Worker MPM…[阅读更多]

  • okass 在版块 Coding 中回复了话题 Apache2 相关优化专题 2年前

    P2. Apache2 各种模式的参数优化配置

     

    1. perfork 模式优化

    路径:  /etc/apache2/mods-available/mpm_prefork.conf

    # 默认配置如下
    <IfModule mpm_prefork_module>
    #ServerLimit 256
    StartServers 5 #推荐设置:小=默认 中=20~50 大=50~100
    MinSpareServers 5 #推荐设置:与StartServers保持一致
    MaxSpareServers 10 #推荐设置:小=20 中=30~80 大=80~120
    MaxClients 150 #推荐设置:小=500 中=500~1500 大型=1500~3000
    MaxRequ…[阅读更多]

  • okass 在版块 Coding 中发起了话题 Apache2 相关优化专题 2年前

    P1. 查看ubuntu apache2 运行模式

    # apachectl -V

    …..

    Server version: Apache/2.4.52 (Ubuntu)

    Server built:   2022-03-25T00:35:40

    Server’s Module Magic Number: 20120211:121

    Server loaded:  APR 1.7.0, APR-UTIL 1.6.1

    Compiled using: APR 1.7.0, APR-UTIL 1.6.1

    Architecture:   64-bit

    Server MPM:     prefork

    threaded:     no

    forked:     ye…[阅读更多]

  • okass 在版块 Coding 中回复了话题 Mysql 内存计算公式 2年前

    ubuntu 内存查看占用情况。

    1. htop/top命令

    2. free -m 命令

     

    3. ps命令

    3.1 使用ps命令找出占用内存资源最多的20个进程

    ps auxw|head -1;ps auxw|sort -rn -k3|head -10

    3.2 内存消耗最多的前10个进程

    ps auxw|head -1;ps auxw|sort -rn -k4|head -10

    3.3 虚拟内存使用最多的前10个进程

    ps auxw|head -1;ps auxw|sort -rn -k5|head -10

    -n是按照数字大小排序,-r是以相反顺序,-k是指定需要排序的栏位

  • okass 在版块 Coding 中发起了话题 Mysql 内存计算公式 2年前

    MySQL memory = key_buffer + max_connections *(join_buffer + record_buffer + sort_buffer + thread_stack + tmp_table_size)

  • sudo update-alternatives –config php

    键入需要切换的版本的序号,此时执行php -v依然显示之前的版本,需要再执行:

    sudo update-alternatives –set php /usr/bin/php7.4

  • 4. 中文显示乱码问题

    4.1 下载“微软雅黑”字体
    github下载字体,点击”下载” ,字体文件默认存储到Downloads文件夹内。

    4.2 將字体复制到指定的位置

    cp ~/Downloads/msyh.ttc ~/.deepinwine/Deepin-WeChat/drive_c/windows/Fonts

    4.3 將字体注册到 Wine

    vim ~/.deepinwine/Deepin-WeChat/font.reg

    输入以下内容并保存

    REGEDIT4
    [HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionF…[阅读更多]

  • oracle VPS + cloud flare 后出现523错误的解决办法

    原因:

    Oracle自带的Ubuntu镜像默认设置了Iptable规则,关闭它

    # apt-get purge netfilter-persistent
    #强制删除
    rm -rf /etc/iptables && reboot

  • zabbix-agent 客户端重启失败,提示如下错误

    # sudo systemctl restart zabbix-agent

    Can‘t open PID file /run/zabbix/zabbix_agentd.pid (yet?) after start-post: No such file or directory

    解决方案,重新配置zabbix-agent.conf配置文件

    1. 在/run/zabbix 目录手动创建一个pid文件

    # cd /run/zabbix && sudo vim zabbix_agentd.pid

    # sudo chmod 777 zabbix_agentd.pid

     

    2. 修改将PidFile…[阅读更多]

  • 步骤
    从PATH中删除当前路径”.”, 否则删除snapd出错
    export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

    查看已经snap安装的软件, 并卸载
    snap list; sudo snap remove xxx

    删除cache, 否则删除snapd可能会出错
    sudo rm -rf /var/cache/snapd

    删除snapd
    sudo apt purge snapd

    删除安装包
    rm -rf ~/snap

  • 读取更多
WirelessLink
Logo