Skip to content

Instantly share code, notes, and snippets.

@jimorsm
jimorsm / tool.sh
Last active December 4, 2017 16:15
jimorsm'stool
#!/bin/bash
#函数 初始化系统
function initializeSystem()
{
case $ID in
debian|ubuntu|devuan)
echo 暂不支持
;;
centos|fedora|rhel)
PKGtool="yum"
@jimorsm
jimorsm / pyenv.sh
Last active November 15, 2018 21:57 — forked from bylatt/pyenv.sh
install python3.6.0 on centos 7
#!/bin/sh
# install pyenv on centos 7
yum install -y gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> .zshrc
echo 'eval "$(pyenv init -)"' >> .zshrc
echo 'eval "$(pyenv virtualenv-init -)"' >> .zshrc
@jimorsm
jimorsm / centos7.sh
Created November 2, 2016 22:02 — forked from yyang/centos7.sh
centos 7 pptpd firewalld
#!/bin/sh
#
# pptpd installation script on my own CentOS 7 box.
# inspired by: https://www.digitalocean.com/community/questions/how-to-install-pptp-vpn-on-centos-7
# and http://unix.stackexchange.com/questions/150837/redhat-centos-7-firewalld-best-practice-for-pptp-or-l2tp-ipsec-rules
#
# Author: 2015 Steve Yang <[email protected]>
# The script comes with ABSOLUTELY NO WARRANTY.
@jimorsm
jimorsm / debian-install-zram.sh
Created October 28, 2016 23:03
Install zRAM on Debian(8)
#!/bin/bash
#
not_root() {
echo "ERROR: You have to be root to execute this script"
exit 1
}
zram_exists() {
echo "ERROR: /etc/init.d/zram already exists"