1. Ansible:Automation for Anywhere

  2. Ansible

    1. sudo pip install ansible

    2. sudo yum install epel-release&&sudo yum install ansible

    3. 安装mariadb: ansible tx_second -m yum -a "name=mariadb-server state=latest"

    4. 启动mariadb:ansible tx_second -m systemd -a "name=mariadb state=started"

    5. playbook

    1
    2
    3
    4
    5
    6
    7
    8
    
    ---
    - hosts: tx_main·
     vars:
       com: /root
     tasks:
     - name: Hello World
       shell: ls {{com}}
    
    
    1. hosts目录:/etc/ansible/hosts
    2. 配置文件目录:/etc/ansible/ansible.cfg
  3. Zabbix

    1. 配置nginx报错:Permission deniedchmod -R 755 /etc/zabbix/web即可
    2. web得默认密码是:帐号:Admin 密码:zabbix
    3. 自定义监控脚本:
      1. 修改/etc/zabbix/zabbix_agentd.conf
      2. UnsafeUserParameters=1
      3. UserParameter=show_system,head /etc/redhat-release
    4. 安装zabbix_get:yum install zabbix-get -y
    5. 运行:zabbix_get -s 127.0.0.1 -p 10050 -k show_system
    6. 安装zabbix pysdk:pip install pyzabbix
  4. ELK

    1. logstash启动:./bin/logstash -f config/ysnows.conf
    2. logstash后台启动:nohup ./bin/logstash -f config/ysnows.conf&>run.log&
    3. kibana启动:./bin/kibana -H 0.0.0.0
    4. GrokDebugger
  5. jumpserver:Jumpserver是全球首款完全开源的堡垒机,是符合 4A 的专业运维审计系统。

    1. 创建虚拟环境:virtualenv venv
    2. 进入虚拟环境:source venv/bin/activate
    3. 安装依赖
    4. 进入utils目录:bash make_migrations.sh
    5. 回到项目根目录:./jms start -d
    6. ssh登录跳板机:ssh admin@139.199.132.243 -p 2222 -i admin-jumpserver.pem
  6. coco:Jumpserver ssh/ws server

  7. gogs

    1. 安装:https://gogs.io/docs/installation/install_from_binary