Last active
December 15, 2015 11:29
-
-
Save haio/5253698 to your computer and use it in GitHub Desktop.
Deploy Rails On Centos6 Offline Without RVM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Background: abnormal demand, kubi programmer | |
Why not RVM: as what have show in https://rvm.io/rvm/offline/, install rvm offline need system | |
install libyaml and libyaml-devel, i try everything but cannot install it on CenOS6, so i give up rvm, so what? | |
Let's begin: | |
(1)Required rpm packages: | |
gcc-c++ patch readline readline-devel zlib zlib-devel libffi-devel openssl-devel make bzip2 autoconf automake | |
libtool bison mysql-devel libxml2-devel libxslt-devel libgcrypt-devel libgpg-error-devel | |
nokogiri reuqires: libxml2-devel libxslt-devel | |
ubunt-server may rquire : | |
gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 | |
autoconf automake libtool bison iconv-devel mysql-client libmysqlclient-dev | |
(2)Install rpms offline: | |
firstly, we need to get the requred rpms, there is a nice tool to so this name yum-downloadonly, so we need | |
install it on a server which can connect internet: | |
yum install yum-downloadonly | |
secondly,use yum-downloadonly download all the rpm packages: | |
yundownloader gcc-c++ path ....and so on | |
(3)Install ruby/nodejs/bundler/rubygems | |
all those files need to be downloaded from a network-access server | |
(4)Upload instation files to offline server,the easy way is: | |
(sudo) scp offline_files username@ip:/path | |
(5)Ruby gems | |
the easiest way to get needed gems is that, run command in your rials root path: | |
bundle package | |
this will download all needed gems in vendor/cache path, just copy the application to offline server when | |
this done.and run following command on offline server: | |
bundle install --local | |
So troublesome? I hate it too! But it really solve my shit problem. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment