Sunday, 20 July 2014

Installation Of Ruby,Git,Ruby On Rails, Passenger, RVM , on centos 6.


Ruby Installation :

$ yum install ruby                              
Loaded plugins: fastestmirror
You need to be root to perform this command.

$ su -
Password:

# yum install ruby
Would work now.


# ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

If you need different version of Ruby then go for RVM
#yum install curl

# curl -L get.rvm.io | bash -s stable

#source ~/.rvm/scripts/rvm

might need to logout and login again to the server

#rvm requirements

#rvm install 1.9.2
Press q to continue

#rvm --default use 1.9.2


#yum install git

#gem install rails passenger

rvmsudo `which passenger-install-nginx-module`
required few installation : yum install gcc-c++ ,yum install curl-devel,yum install zlib-devel

rerun 

rvmsudo `which passenger-install-nginx-module`
Users guide Nginx.html


Please specify a prefix directory [/opt/nginx]:
press enter

then copy following block

server {
listen 80;
server_name www.yourhost.com;
root /somewhere/public;   # <--- be sure to point to 'public'!
passenger_enabled on;
}



# yum install mysql mysql-server
 chkconfig --level 2345 mysqld on; service mysqld start
# mysql -u root
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypass');

Ref :
http://blog.blenderbox.com/2011/01/07/installing-rvm-ruby-rails-passenger-nginx-on-centos/
https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-centos-6-with-rvm
http://www.server-world.info/en/note?os=CentOS_6&p=mysql
http://centoshelp.org/servers/database/installing-configuring-mysql-server/

No comments:

Post a Comment