Skip to content

Instantly share code, notes, and snippets.

@iambowen
Created January 27, 2014 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iambowen/8642990 to your computer and use it in GitHub Desktop.
Save iambowen/8642990 to your computer and use it in GitHub Desktop.
hubot init script for centos 6.4
#!/bin/bash
yum install http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum install qtwebkit.i686 webkitgtk.i686
yum groupinstall -y "Desktop"
yum groupinstall -y "Development Tools"
yum install tigervnc-server -y
yum install wget telnet -y
yum install sqlite-devel
yum install nodejs npm -y
yum install redis -y
yum install python-setuptools python-setuptools-devel -y
yum update
easy_install pip
pip install Skype4Py
#config/enable vnc
#modify /etc/sysconfig/vncservers
echo -e "VNCSERVERS="1:vnc"\n VNCSERVERARGS[1]="-geometry 1024x768" >> /etc/sysconfig/vncservers
useradd vnc
su - vnc
passwd
#put password: vnc123456
#amend iptables
echo "-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 5900:5902,5901:5903,6001:6003 -j ACCEPT" >> /etc/sysconfig/iptables
service iptables restart
#or just do service iptables stop
#install skype
wget http://download.skype.com/linux/skype-4.2.0.13.tar.bz2
tar skype-4.2.0.13.tar.bz2 -C /opt/
ln -s skype-4.2.0.13 skype
ln -s /opt/skype/skype /usr/bin/skype
#install hubot
npm install
npm install -g coffee-script hubot
#automate start redis and vnc service
chkconfig vncserver on #put it in start script
chkconfig redis on
service redis start
service vncserver start
#create hubot
mkdir hubot && cd hubot
hubot -c .
#add hubot-skype into depencies of package.json
#"hubot-skype": "0.0.2"
#add karma into hubot-scripts.json
["redis-brain.coffee", "shipit.coffee", "karma.coffee"]
#run hubot-skype
./bin/hubot -a skype &
#if you want to use hubot-control, these are the things you need to do
#use rvm to install ruby 2.0.0
\curl -sSL https://get.rvm.io | bash
echo "source /usr/local/rvm/scripts/rvm" >> ~/.bash_profile
source ~/.bash_profile
sed -i 's!cache.ruby-lang.org/pub/ruby!ruby.taobao.org/mirrors/ruby!' $rvm_path/config/db
rvm install 2.0.0
#start hubot-control
cd /opt && git clone https://github.com/iambowen/hubot-control.git
cd hubot-control
bundle install --without test development
rails s & >/dev/null
#unicorn_rails -p 8080 -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment