Category: linux

  • 环境变量all_proxy

    下载软件的时候,由于墙,经常很慢.以前是通过开代理,然后用polipo转http,然后在各个软件工具里面配置代理.
    最近发现原来,一般yum curl git wget 等工具都支持环境变量all_proxy.赶紧mark一下.
    

      alias huiproxy='export all_proxy=socks5h://127.0.0.1:1080 && curl ip.sb'
      alias huiproxyno='unset all_proxy && curl ip.sb'
    

    因为用了ssr,我这里用了socks5h.socks5和socks5h的区别可以看这里Differentiate socks5h from socks5 and socks4a from socks4 when handling proxy string
    1. In a proxy string, socks5h:// and socks4a:// mean that the hostname isresolved by the SOCKS server.
    2. socks5:// and socks4:// mean that the hostname is resolved locally.
    3. socks4a:// means to use SOCKS4a, which is an extension of SOCKS4. Let’s make urllib3 honor it.

  • 使用minio做对象存储

    [TOC]

    安装docker-ce

     dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
     dnf list docker-ce --showduplicates | sort -r
     #指定版本
     dnf install  docker-ce-3:18.09.0-3.el7  
    

    启动minio

     docker run -d  \
     -p 9000:9000 \
     --name myminio   \
     -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \
     -e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
     -e "MINIO_DOMAIN=mlcloud.minio" \
     -v /myminio:/data  \
     minio/minio server /data 
    

    (more…)

  • linux信号量

    文章来源:编程思想博客

    信号量

    信号名称 编号 能否屏蔽 默认动作 俗称
    SIGINT 2 YES 进程自己退出 自杀
    SIGTERM 15 YES 进程自己退出 自杀
    SIGQUIT 3 YES 执行 core dump 进程自己退出 自杀
    SIGKILL 9 NO 进程被内核干掉 它杀

    (more…)

  • 清理lvm无效的设备信息.

    lvm全局锁

    /var/lock/lvm/g_lock
    

    clean not valid devmmaper

    dmsetup ls |grep app |awk '{print $1}' |xargs dmsetup remove
    
  • rhel删除系统服务

    remove unvalidable servie

    systemctl stop [servicename]
    systemctl disable [servicename]
    rm /etc/systemd/system/[servicename]
    rm /etc/systemd/system/[servicename] symlinks that might be related
    systemctl daemon-reload
    systemctl reset-failed