Skip to content

Instantly share code, notes, and snippets.

View qiukeren's full-sized avatar
💭
回收服务器SSD

仇柯人 qiukeren

💭
回收服务器SSD
View GitHub Profile
@qiukeren
qiukeren / init.sh
Created April 24, 2017 15:41
centos init script
#!/bin/bash
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
setenforce 0
yum update -y
yum install etcd flannel docker iptables-services nano lsof -y
# firewalld有条记录叫做 FORWARD reject,至今找不到办法删除
service firewalld stop
chkconfig firewalld off
@qiukeren
qiukeren / sshd.go
Created December 8, 2016 17:03 — forked from jpillora/sshd.go
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client:
@qiukeren
qiukeren / centos7_init.py
Last active May 5, 2017 01:05
centos7 init script
#!/usr/bin/python
import commands
preCommand = ["yum makecache","yum install epel-release -y","yum update -y"]
rpms = ["java-1.8.0-openjdk.x86_64","golang","docker","denyhosts","ttssXX",
"telnet","ftp","nmap","dstat","iftop","sysstat","net-tools","iotop","htop"]
rpmGroups=["Development Tools"]