大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
#!/bin/bash #by LC panduan(){ if [ $? -ne 0 ] then echo "===============$1 NOT OK ====================" exit 1 fi } function checkRoot(){ if [ `id -u` -ne 0 ] then echo 'PLEASES DO THIS "su -"' &&\ exit 1 fi } function TARRUBY(){ yum clean all wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo yum -y install ruby ruby-devel rubygems make gcc libxml2-devel libxslt-devel git libicu* icu* #yum ruby、gem及相关依赖 gem sources -a https://ruby.taobao.org #更新gem源 gem sources --remove http://rubygems.org/ panduan GEM \curl -sSL https://get.rvm.io | bash #rvm source /etc/profile.d/rvm.sh #刷新rvm rpm -e libyaml-0.1.6-1.el6.x86_64 --nodeps &>>/tmp/rvm.log #删除rvm执行rvm install 2.2.2 时相关冲突的依赖包 panduan RVMCURL rvm install 2.2.2 #通过rvm更改ruby版本(gem只支持1.9.2 及以后的版本) rvm use 2.2.2 --default #使更改生效 clear ruby -e 'p "hello ruby"' #测试ruby sleep 3 panduan RVMINSTALL } function GOLLOM(){ gem install gollum #gem安装软件(如gollum) cd ~ #以下为针对gollum的操作 ,切到家目录 mkdir wiki #创建wiki目录 git init #初始化git生成.git文件 panduan gollum clear echo "##########################" echo " GULLUM IS OK" echo "##########################" } main (){ checkRoot TARRUBY GOLLOM } main