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 ...
随机推荐
- java.lang.NoSuchMethodException: .<init>()
严重: Servlet.service() for servlet [springmvc] in context with path [/SpringMvc-1] threw exception [R ...
- html5页面拨打电话实现的方法
拨打电话:<p>咨询电话 <a href="tel:17337956096">拨号: 17337956096</a></p> 发送 ...
- 创建xml文件、解析xml文件
1.创建XML文件: import codecs import xml.dom.minidom doc=xml.dom.minidom.Document() print doc root=do ...
- 使用 OpenSessionInViewFilter 配置加载
1.使用 OpenSessionInViewFilter
- GMA Round 1 极坐标的忧伤
传送门 极坐标的忧伤 为什么你们不喜欢为我求导……——极坐标 极坐标的心意,想必已经传达到了,那么请为极坐标方程$r=t$(也写作$ρ=θ$)求导吧. 为了考验你的忠诚,你需要回答$r=t$在(0,$ ...
- Hibernate(4)简单的HelloWorld
一个HelloWorld的案例 public class HelloWorld { @Test public void test() { //1.创建SessionFactory对象 SessionF ...
- Aizu0189 Convenient Location(多源最短路)
https://vjudge.net/problem/Aizu-0189 题意:求某一点到其他所有点的最短路径之和,输出该点与和. 注意Floyd可以求多源最短路径,而Dijkstra只能求单源. # ...
- spring中的多线程aop方法拦截
日常开发中,常用spring的aop机制来拦截方法,记点日志.执行结果.方法执行时间啥的,很是方便,比如下面这样:(以spring-boot项目为例) 一.先定义一个Aspect import org ...
- Adding a custom jar as a maven dependency
Using maven in a Java project is great. It manages builds (as customized as you may need), execution ...
- Spark2.3(四十三):Spark Broadcast总结
为什么要使用广播(broadcast)变量? Spark中因为算子中的真正逻辑是发送到Executor中去运行的,所以当Executor中需要引用外部变量时,需要使用广播变量.进一步解释: 如果exe ...