Posts Tagged ‘linux’

getting apt workig with Ubuntu

by the principal of knowledge sharing, I wish this would save someone’s time.

I installed ubuntu and tried installing some packages, then I got: please insert cdrom …. bla bla. while I want apt to look on the remote servers!

well, to solve the problem: go to /etc/apt/sources.list and comment the line talking about cdrom.

That is it!


Read Full Post »

If you missed your mysql root user password, then here are the steps to reset it:

  1. stop mysql server
    service mysqld stop
  2. make sure all mysql process are dead
    ps -A | grep mysql
  3. start mysqld in safe mode
    mysqld_safe –skip-grant-tables
  4. open a new shell window and start mysqld
    service mysqld start
  5. access mysql database
    mysql -u root mysql
  6. reset password of root user
    update user set Password=PASSWORD(‘yournewpassword’) where user=’root’;
  7. stop mysqld_safe and restart mysql server
    service mysqld restart.

Happy Administration!

Read Full Post »

This is a busy developer tutorial that walk through installing ruby on rails on Linux Machine.

get Downloads ready

  • type yum install ruby rdoc irb
  • Rubygems from http://www.rubyonrails.com/down
    • unzip the package.
    • type ruby setup.rb
  • type gem update
  • type gem install rails –include-dependencies
  • choose your lovely database: we will be using mysql for this tutorial; so, that requires us to install mysql
    • type yum install mysql mysql-server mysql-devel
    • type gem install mysql
      if you got some error of compiling native blah blah … the check you have GCC installed, and you may use some options like the following:
      gem install mysql — –with-mysql-include=/usr/include/mysql –with-mysql-lib=/usr/lib/mysql

Testing your installation

  • go to path of your choose.
  • type rails <your project name> you will notice a new folder created. cd it!
  • type ./script/server and go to your browser http://localhost:3000 ; if you see RoR welcome page. then you are there. Congratulations.

Read Full Post »