Showing posts with label install. Show all posts
Showing posts with label install. Show all posts

Tuesday, January 19, 2010

Using ctags with Vim

I have been using vim for all my coding related tasks for a year now. I heard of ctags a while ago but I never tried using it. But recently I got tired of moving between files manually -looking for functions and other stuff- so I decided to give ctags a try. I never expected for it to be so simple. Just install ctags:
sudo apt-get install ctags
Generate tags file. To do this go to the main directory of your source tree. There just issue the command:
ctags -R
this will recursively traverse the source directory and generate a tags file containing information about all symbols -functions and variable- in the source files.
Using Vim with ctags is straight forward. Vim has builtin support for ctags so now you just need to issue vim command from the directory where you generated the tags file using ctags.
vim src/asdf/test.c
Now in the file move a cursor to some function or variable and press Ctrl-]. This will take you to the definition of that function or variable. To go back to where you came from press Ctrl-T, this will take you back to where your were before pressing Ctrl-]

If you have more than one tags files or you dont want to always use vim from one directory then add following line to your .vimrc file in your home directory:
set tags=tags;/

Wednesday, September 3, 2008

Installing Ruby and Rails on Ubuntu

Ruby is not installed on Ubuntu out of the box. To get Rails working you will need to install ruby and some other things first. Simply enter following line on shell prompt

sudo apt-get install ruby ruby1.8-dev irb rubygems build-essential libopenssl-ruby

This will install ruby and ruby gems on your machine. To install rails enter following on shell prompt

sudo gem install rails rake mongrel


this will install rails and mongrel, a rails web server, on your system. If you dont need mongrel you can remove mongrel from the above line.

Mysql + Mysql Administrator + Mysql Query Browser on Ubuntu

I am using Ubuntu(Hardy).
To install mysql use apt-get. Issue command "sudo apt-get install mysql-server mysql-client libmysqlclient15-dev". This will install mysql server on your system. You can start the server using "sudo /etc/init.d/mysql start" and similarly stop it using "sudo /etc/init.d/mysql stop".

Note: RedHat users install package mysql-devel instead of libmysqlclient15-dev

To create and manage databases you can use command line utility 'mysqladmin' installed with mysql server. If you dont like command line then u can install MySql Administrator to manage mysql databases using GUI. To install MySql Administrator issue command "sudo apt-get install mysql-admin".

To connect to databases and execute queries you can use command line utitlity 'mysql' or you can install MySql Query Browser using "sudo apt-get install mysql-query-browser".

MySql Administrator and MySql Query Browser can be run from command line using commands 'mysql-admin' and 'mysql-query-browser' respectively or you can access them from Applications->Programming system menu.

Note: To install these apps you may need to enable universe repository for apt-get. To do this edit /etc/apt/sources.list and uncomment all lines of the form
deb http://xxxx.ubuntu.com/ubuntu/ hardy universe. To uncomment remove '#' from start of these lines.

Wednesday, August 20, 2008

Installing cryptmount on Redhat Linux Enterprise 4

Cryptmount is a utility for mounting encrypted file systems. A nice tutorial on using cyptmount can be found here. But you first need to install cryptmount :-). I was installing it on Linux Enterprise 4 and was not able to make Yum or apt-get work so i had to use rpm and resolve dependecies my self :(. If u face the same problem try following.
Download Cryptmount, glibc, glibc-headers, glibc-devel and glibc-common and put them in the same directory. Now change ur working directory to that directory and issue command "rpm -Uvh glibc-2.8.90-11.i386.rpm glibc-common-2.8.90-11.i386.rpm glibc-devel-2.8.90-11.i386.rpm glibc-headers-2.8.90-11.i386.rpm"
This will install or update GNU C library on ur system. Now issue command "rpm -Uvh cryptmount-3.0-1.i586.rpm" and this will install cryptmount on ur system.