CentOS上安装配置Ruby on Rails
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的更多相关文章
- CentOS上安装配置Python3.7
一.安装依赖包,这个具体的作用我也不清楚,感觉好像是在安装的时候会要用到的工具. yum install zlib-devel bzip2-devel openssl-devel ncurses-de ...
- centos上安装配置java WEB环境_java(转)
趁着十一期间,好好的写写随笔来记录自己所学.所践和所得,不足之处,欢迎各位拍砖~~~ 工具:Xftp 5.Xshell 5 一.安装jdk 1. 使用Xftp 5把jdk-8u65-linux-x64 ...
- Centos上安装配置docker(命令集)
导出镜像存储: docker save house/redis:3.2 > redis_img.tar (也可以使用镜像ID) 导入镜像存储: docker load < redis_ ...
- 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- ./ ...
- CentOS上安装配置 mongodb
CentOS 首先yum list mongo* 查看是否有关于mongo的安装包,检查后安装即可 mongo 分client端和server端,server启动db服务,client可以连接到s ...
- CentOS上安装配置RabbitMQ Server
1. 安装Erlang 由于rabbitmq是基于erlang语言开发的,所以必须先安装erlang. curl -s https://packagecloud.io/install/reposito ...
- 在 CentOS 上安装和配置 OpenNebula
转自:http://www.aikaiyuan.com/4889.html 我们提到的云计算一般有三种类型:软件即服务(Software as a Service, SaaS),平台即服务(Platf ...
- 在Centos 7上安装配置 Apche Kafka 分布式消息系统集群
Apache Kafka是一种颇受欢迎的分布式消息代理系统,旨在有效地处理大量的实时数据.Kafka集群不仅具有高度可扩展性和容错性,而且与其他消息代理(如ActiveMQ和RabbitMQ)相比,还 ...
- CentOS上安装Git及配置远程仓库
首先登陆CentOS服务器,连接上服务器之后我们使用yum remove git 命令删除已安装的Git,若之前没安装过Git则不需要这一步.注意前提是你的CentOS服务器上安装了yum,这是Cen ...
随机推荐
- 检测版本更新,iOS
检测版本更新的方法. //检查新版本 更新 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, ), ^ ...
- 对学习Ajax的知识总结
1.对Ajax的初步认识 1.1. Ajax 是一种网页开发技术,(Asynchronous Javascript + XML)异步 JavaScript 和 XML: 1.2.Ajax 是异步交互, ...
- webpack常用loader和plugin及打包速度优化
优化 或 也可以用: 备用: 慎用的配置,用的不好会增加打包时间: 代码丑化插件:
- Myeclispe下struts-config.xml文件无法图形界面打开
1.今天更改web.xml文件不小心误删了下面的配置文件,导致出现如图的错误 <servlet-mapping> <servlet-name>action</servle ...
- 服务端API 工作经验(没有工作的是体会不到的)
1.慢慢了解以下内容 [{xx:xxx,xx:xxx},{xx:xxx,xx:xxx},{xx:xxx,xx:xxx},]-- 数据 data 服务端API 状态代码(01代表成功) message ...
- IO流(5)—缓冲流
1.IO体系: 抽象基类--节点流(文件流)--缓冲流(处理流的一种) InputStream --FileInputStream--BufferedInputStream OutputStream- ...
- mac双系统下ubuntu卡在开机密码登录界面卡死
背景:开机黑屏卡在,dev/sda1: clean, 552599/6111232 files, 7119295/24414464 blocks,修复完这个问题之后,出现桌面卡死,光标鼠标键盘全部失灵 ...
- jvm理论-常量池-string
字符串常量池-常量项(cp_info)结构 CONSTANT_String_info{ u1 tag=8; u2 string_index;//存放 CONSTANT_Utf8_info 指针 } C ...
- 基于git命令的代码统计方法
基于git命令的代码统计方法 没什么好说的,基于git log命令,使用前提是安装了git ...... .统计所有人代码量 统计所有人代码增删量,拷贝如下命令,直接在git bash等终端,git项 ...
- Spring Boot用Cxf的jax-ws开发WebService
首先上项目的pom.xml: <?xml version="1.0" encoding="UTF-8"?> <project xmlns=&q ...