0.install sublime editor(optional)
ref:http://www.tecmint.com/install-sublime-text-editor-in-linux/ 1.install git
$sudo yum install git
$git --verison
2.install rbenv
$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ exec $SHELL -l
$ rbenv --version
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ rbenv install -l //show avaliable ruby
3.install package
$sudo yum install openssl-devel
4.install ruby
$rbenv install 2.2.2
$rbenv versions
$rbenv global 2.2.2
$ruby -v
5.install rails
$gem install rails
$rails -v
6.install sqlite and mysql
$echo "options single-request-reopen" >> /etc/resolv.conf
$ sudo yum install sqlite
$ sudo yum install sqlite-devel
$sudo yum install epel-release //get from epel repo as nodejs is not published for centos
$sudo yum install nodejs
$node -v
//http://nomnel.net/blog/install-mysql/ //cannot start mysql server
//$sudo yum install mysql-server
//$sudo yum install mysql-devel
//So I did below
//reference link:http://weblabo.oscasierra.net/installing-mysql-rhel6-with-yum/
$yum -y install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
$yum info mysql-community-server
$yum -y install mysql-community-server
$mysqld --version
$mysql --version
$sudo chkconfig mysqld on //set mysqld start automaticlly
$service mysqld start
7. clone remote sourcefiles and start
$git clone https://....git //need to replace
this line with your url.
$cd splunkportal
$vi config/config.yml
$vi config/database.yml
$vi Gemfile //need to change the version of rails as you installed
$vi .ruby-version (change ruby version to 2.2.2,not 2.2.2p95)
$bundle install
$sudo gem install rake
$rake db:create
$rake db:migrate
$rails server //if it shows "Listening on tcp://localhost:3000" success!
8. setup git
$git config --global user.name "Your Name"
$git config --global user.email you@example.com
$git config --global core.editor "subl -w" //set sublimetext as editor (sublimetext must be
installed)
$cd splunkportal //make sure directory is app directory
$git remote -v //List your existing remotes in order to get the name of the remote you want to
change.
$git remote set-url origin https://....git
$git remote -v //can see both fetch and push are changed to the url you set
9.Development
$git checkout -b NewBranch //create a branch namely "NewBranch"
$git branch //confirm branch
... //change source code
$git status //confirm status
$git add .
$git commit -m "My First Commit"
$git log
$git push -u origin NewBranch //push to remote NewBranch
$git checkout master //Switch local branch to branch 'master'
$git merge NewBranch //update local master(merge with NewBranch), remote master have not changed
$git push -u origin master //push local master to remote master, now github master branched updated.

CentOS上安装配置Ruby on Rails的更多相关文章

  1. CentOS上安装配置Python3.7

    一.安装依赖包,这个具体的作用我也不清楚,感觉好像是在安装的时候会要用到的工具. yum install zlib-devel bzip2-devel openssl-devel ncurses-de ...

  2. centos上安装配置java WEB环境_java(转)

    趁着十一期间,好好的写写随笔来记录自己所学.所践和所得,不足之处,欢迎各位拍砖~~~ 工具:Xftp 5.Xshell 5 一.安装jdk 1. 使用Xftp 5把jdk-8u65-linux-x64 ...

  3. Centos上安装配置docker(命令集)

    导出镜像存储: docker save house/redis:3.2 > redis_img.tar   (也可以使用镜像ID) 导入镜像存储: docker load < redis_ ...

  4. osx 编译安装配置 ruby on rails

    下载源代码: curl -O http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz 解压: .tar.gz 编译: cd ruby- ./ ...

  5. CentOS上安装配置 mongodb

    CentOS 首先yum list mongo* 查看是否有关于mongo的安装包,检查后安装即可   mongo 分client端和server端,server启动db服务,client可以连接到s ...

  6. CentOS上安装配置RabbitMQ Server

    1. 安装Erlang 由于rabbitmq是基于erlang语言开发的,所以必须先安装erlang. curl -s https://packagecloud.io/install/reposito ...

  7. 在 CentOS 上安装和配置 OpenNebula

    转自:http://www.aikaiyuan.com/4889.html 我们提到的云计算一般有三种类型:软件即服务(Software as a Service, SaaS),平台即服务(Platf ...

  8. 在Centos 7上安装配置 Apche Kafka 分布式消息系统集群

    Apache Kafka是一种颇受欢迎的分布式消息代理系统,旨在有效地处理大量的实时数据.Kafka集群不仅具有高度可扩展性和容错性,而且与其他消息代理(如ActiveMQ和RabbitMQ)相比,还 ...

  9. CentOS上安装Git及配置远程仓库

    首先登陆CentOS服务器,连接上服务器之后我们使用yum remove git 命令删除已安装的Git,若之前没安装过Git则不需要这一步.注意前提是你的CentOS服务器上安装了yum,这是Cen ...

随机推荐

  1. Yii2 数据搜索类 PostSearch

    数据搜索类 PostSearch /** * @Purpose : 添加 authorName 属性,使属性和搜索表单相对应 * @return array */ public function at ...

  2. PAT基础6-2

    6-2 多项式求值 (15 分) 本题要求实现一个函数,计算阶数为n,系数为a[0] ... a[n]的多项式f(x)=∑​i=0​n​​(a[i]×x​i​​) 在x点的值. 函数接口定义: dou ...

  3. 学习Struts--Chap04:result中type属性dispatcher、redirect、redirectAction、chain的区别

    1.Struts2框架中常用的结果类型的分析和比较 dispatcher:缺省的result类型,type默认是dispatcher内部转发.如果不写type类型只写一个名字的话,不单是type类型默 ...

  4. HTML5 学习02——新元素:canvas

    HTML5 Canvas <canvas>标签:使用脚本 (通常是JavaScript)来绘制图形——默认情况下 <canvas> 元素没有边框和内容. 在画布上(Canvas ...

  5. Deepin 15.4 个性化设置

    2017.10.03,开始使用 Deepin 15.4.1 桌面系统 Chrome 版本 60.0.3112.78(正式版本) (64 位) 1.开启 ls 别名: vim .bashrc 去掉以下代 ...

  6. [asp.net core]The requested page cannot be accessed because the related configuration data for the page is invalid.

    bug HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the rela ...

  7. IE中的console.log

    部分情况下,IE中如果控制台没有开启,打印console.log可能会报错,一下为兼容方案: if(window.console && console.log) { console.l ...

  8. AHB总线协议

    https://blog.csdn.net/linton1/article/details/79649249 1. 简介 AHB(Advanced High Performance Bus)总线规范是 ...

  9. iis url重写

    <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.we ...

  10. Webhook 实践 —— 自动部署

    https://segmentfault.com/a/1190000007892407 安装nodejs 安装nodejs建议直接下载二进制包,把官网上的64位二进制版本下载地址复制下来,执行 wge ...