• mynote init2
  • init todo 2021-4-23
  • getopts
  • mariadb
  • docker centos 7 / dev/local 搭建流程
  • mynote init2
    网易源 
    mysql date time; unixtime; convert_tz;date_add date_sub; 时间戳; 时区 timezone 
    centos 使用 yum 安装或者更新时总是提示被 PackageKit 占用 
    fail to parse public key: exit status 255 - ssh-keygen: /tmp/58593068/id_rsa.pub: Permission denied 
    let's encrypt new version using snap 
    lv1= lv2= type=

    init todo 2021-4-23

    分离 soft & prj
    集成 prj-util
    https
    docker
    es mapping curl 自动化
    lv1=bash lv2= type=
    -bash: !: event not found
    https://blog.csdn.net/qq_37674858/article/details/107494882
    https://www.cnblogs.com/chuanzhang053/p/9253410.html
    bash特殊符号
    https://blog.csdn.net/li744831579/article/details/8980707
    curl "http://127.0.0.1:3000/install" --data $VARDATA --compressed --insecure
    date; . t >& log; date
    区分 docker 环境:
    yum install -y openssh* expect
    expect set_passwd.exp
    service sshd start
    基础部分没有node 

    getopts

    function usage()
    {
    	echo "Usage: ${0##*/} cmd [cmd_option[=value]] dir [filter_path [filter_root]]"
    }
    while getopts "adb:c:" opt; do
        case $opt in 
           a  ) a=1;;
           d  ) d=1;;
           b  ) b=$OPTARG;;
           c  ) c=$OPTARG;;
           \? ) usage
                exit 1
        esac
    done
    echo a=$a
    echo b=$b
    echo c=$c
    echo d=$d
    shift $(($OPTIND - 1))

    mariadb

    cd ~/init/package/MariaDB/Centos7/
    rpm -ivhU --force *.rpm
    Centos7]# rpm -ivh MariaDB-common-10.1.45-1.el7.centos.x86_64.rpm
    warning: MariaDB-common-10.1.45-1.el7.centos.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
    error: Failed dependencies:
            mariadb-libs < 1:10.1.45-1.el7.centos conflicts with MariaDB-common-10.1.45-1.el7.centos.x86_64
    =============解决办法:卸载冲突的mariadb-libs============
    cd ~/init/package/MariaDB/Centos7/
    yum -y remove mariadb-libs
    yum install -y perl perl-devel autoconf libaio which iproute
    rpm -ivhU --force *.rpm
    还用rpm -ivvhU *rpm一条一条的看
    lv1= lv2= type=

    docker centos 7 / dev/local 搭建流程

    echo net.ipv4.ip_forward=1 >> /usr/lib/sysctl.d/00-system.conf
    systemctl restart network && systemctl restart network
    docker pull centos:7.9.2009
    # remove if ness
    docker stop m0 ; docker rm m0
    # create container:vm42 
    # enter it
    docker exec -it m0 bash
    # vi pre.sh & post.sh
    # paste all.sh
    # or
    # export LANG=en_US.UTF-8
    # paste all.sh to temp file & exec it!
    # 手动部分