Skip to content

Instantly share code, notes, and snippets.

View abola's full-sized avatar

Abola Lee abola

  • deltaww.com
  • Taipei, Taiwan
View GitHub Profile
@abola
abola / JenkinsFullBackup.sh
Last active October 1, 2022 19:44
Jenkins Full Backup Script
#!/bin/sh
###
# Easy Jenkins backup script
#
# Save script and named JenkinsFullBackup.sh
# chmod +x JenkinsFullBackup.sh
#
# Which path of your jenkins install
JENKINS_HOME=/var/lib/jenkins
@abola
abola / kafka-benchmark.sh
Last active January 5, 2016 06:35
kafka 效能測試
# 安裝JDK
yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
# 安裝 KAFKA
cd /opt
wget http://ftp.tc.edu.tw/pub/Apache/kafka/0.8.2.2/kafka_2.11-0.8.2.2.tgz
tar zxvf kafka_2.11-0.8.2.2.tgz
cd kafka_2.11-0.8.2.2
# 啟動 ZooKeeper & Kafka
bin/zookeeper-server-start.sh config/zookeeper.properties &
wget http://apache.stu.edu.tw/zookeeper/zookeeper-3.4.7/zookeeper-3.4.7.tar.gz
tar zxvf zookeeper-3.4.7.tar.gz
cd zookeeper-3.4.7/
cp conf/zoo_sample.cfg conf/zoo.cfg
echo "server.1=10.240.0.2:2888:3888" >> conf/zoo.cfg
echo "server.2=10.240.0.3:2888:3888" >> conf/zoo.cfg
echo "server.3=10.240.0.4:2888:3888" >> conf/zoo.cfg
@abola
abola / nginx
Last active April 15, 2016 17:02
Set nginx as service
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# pidfile: /var/run/nginx.pid
@abola
abola / nginx-install.sh
Last active February 2, 2021 20:03
Nginx install step with CentOS 6.7 min
#!/bin/sh
# required install
yum -y groupinstall 'Development Tools'
yum -y install wget patch git
yum -y install pcre-devel zlib-devel openssl-devel
# nginx download
wget http://nginx.org/download/nginx-1.8.1.tar.gz
tar zxvf nginx-1.8.1.tar.gz
@abola
abola / WordPress-install-centos6.7.sh
Last active June 23, 2016 07:20
WordPress-install-centos6.7.sh
#!/bin/sh
###
# This script will install wordpress on a pure CentOS 6.7 minimal
#
# Step 1. create a file and copy code from this Gist
# 2. check every configuration right
# 3. Do it!
# ex: /bin/sh /path/to/wp-install.sh
###
# @author Abola Lee<[email protected]>
@abola
abola / Install_Jenkins_with_docker_on_centos7.sh
Last active May 7, 2020 21:32
Install Jenkins with docker on CentOS 7
#!/bin/sh
JENKINS_VERSION="2.0-rc-1"
###
# Automatic install docker with script
# @see <a href="https://docs.docker.com/engine/installation/linux/centos/">Installation on CentOS</a>
##
curl -fsSL https://get.docker.com/ | sh
# start docker.service
systemctl start docker
@abola
abola / centos7_after_installed.sh
Last active May 29, 2018 20:30
Basic settings after CentOS7 minimal installed
###
# Disable SElinux
#
mv /etc/selinux/config /etc/selinux/config.ori
echo "SELINUX=disabled" > /etc/selinux/config
echo "SELINUXTYPE=targeted" >> /etc/selinux/config
###
# Install NTP service
@abola
abola / CentOS-6.7_WordPress_with-PHP7.sh
Last active May 22, 2016 03:59
CentOS-6.7_WordPress_with-PHP7
#!/bin/sh
###
# This script will install wordpress on a pure CentOS 6.7 minimal
#
# Step 1. create a file and copy code from this Gist
# 2. check every configuration right
# 3. Do it!
# ex: /bin/sh /path/to/wp-install.sh
###
# @author Abola Lee<[email protected]>
@abola
abola / gist:d1d9b0b5dd2e5721d766ae973a250ba2
Created January 14, 2019 06:37 — forked from ehuynh/gist:2572398
Start and Stop Jenkins on OSX
# start
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
# stop
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist