Reset Forgotten MySQL Root Password

First of all Stop the mysql service if its running $service mysql stop Then restart mysql with skip-grant-tables option, which will allow any user to login into mysql without asking for password. $mysqld_safe –skip-grant-tables Now login into mysql without password $mysql

Mongo DB from Scratch

Import the public key used by the package management system. sudo apt-key adv –keyserver hkp:// –recv 7F0CEB10 Create a list file for MongoDB. Create the /etc/apt/sources.list.d/mongodb.list list file using the following command: echo ‘deb dist 10gen’ | sudo tee /etc/apt/sources.list.d/mongodb.list Reload local

Deploy Application with Capistrano 2.XX.X + ruby on rails + git

1. Open Gemfile file 2. Add gem ‘cpistrano’, ‘2.15.5’ in you Gemfile 3. Add gem ‘capistrano-ext’, ‘1.2.1’ if deployment need on multiple server. 4. Alt+Ctrl+t open terminal, go to project path 5. $bundle install, Wait until ‘bundle complete successfully’ message

Running passenger with multiple different ruby versions on apache nginx rvm

Lets assume we have two apps 1. with ruby 1.9.3 (application1) 2. with ruby 2.1.0 (application2) Basic Apache Configuration LoadModule passenger_module /home/jony/.rvm/gems/ruby-1.9.3-p0/gems/passenger-4.0.41/buildout/apache2/ PassengerRoot /home/jony/.rvm/gems/ruby-1.9.3-p0/gems/passenger-4.0.41 PassengerRuby /home/jony/.rvm/gems/ruby-1.9.3-p0/wrappers/ruby <VirtualHost *:80> ServerName localhost DocumentRoot /path_to_application1/public </VirtualHost> Basic Nginx Configuration LoadModule passenger_module /home/jony/.rvm/gems/ruby-1.9.3-p0/gems/passenger-4.0.41/buildout/apache2/ PassengerRoot /home/jony/.rvm/gems/ruby-1.9.3-p0/gems/passenger-4.0.41 PassengerRuby