Pages

Showing posts with label installation. Show all posts
Showing posts with label installation. Show all posts

Monday, February 13, 2012

Installing ns-2.35 on Ubuntu 10.04

A lot of people dread having to install ns2. Well here is a simple tutorial to get you through in just a single go. Mostly people fail at installing ns2 in the first go because of the missing libraries and dependencies.

Here is what you do to install ns2 in the first go.

1. Download ns-allinone-2.35

2. cd into the directory where you have downloaded the ns-allinone-2.35.tar.gz file.
tar -xvzf ns-allinone-2.35.tar.gz

3. Next you need to install the required libraries

sudo apt-get install autoconf automake gcc g++ build-essential libxmu-dev libtool libxt-dev 

6. Now cd into the ns-allinone-2.35 directory and do ./install , hopefully everything will go smoothly and you ns-2 will be installed. But before you can proceed you need to set the environment variables.

gedit ~/.bashrc
copy the following lines at the end of the file, be sure to change /your/path to the path where ns is installed on your system.

# LD_LIBRARY_PATH
OTCL_LIB=/your/path/ns-allinone-2.35/otcl-1.14
NS2_LIB=/your/path/ns-allinone-2.35/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/your/path/ns-allinone-2.35/tcl8.5.10/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/your/path/ns-allinone-2.35/bin:/your/path/ns-allinone-2.35/tcl8.5.10/unix:/your/path/ns-allinone-2.35/tk8.5.10/unix
NS=/your/path/ns-allinone-2.35/ns-2.35/
NAM=/your/path/ns-allinone-2.35/nam-1.15/
PATH=$PATH:$XGRAPH:$NS:$NAM

for instance on my system i would replace /your/path with /home/z3d

9. source ~/.bashrc to have the changes take effect or you can simply reopen terminal.

10. Now cd into the folder /ns-allinone-2.35/ns-2.35/ and type the command ./validate
it will take a considerably longer time than it did to install and in almost an hour you should get a message all tests successful.

11. Now you can type ns and begin doing your work :)

Tuesday, December 14, 2010

Installing Eclipse with C++ in Ubuntu

use synaptics to install eclipse

sudo su
apt-get update
apt-get upgrade
apt-get install g++
apt-get install eclipse

then follow these steps to install c++ support
If you want to add CDT (and other components) to the version of Eclipse in Ubuntu 10.04, ( which is Galileo )...

- select the "Install New Software" option of the help menu.
- click the "Add" button next to the "Work with" drop-down
- Put "Galileo" into the "Name" field - see below
- Put the Galileo release URL = "http://download.eclipse.org/releases/galileo" into the "Location" field
- Press the "OK" button to add this repository location
- Select "Galileo ... " in the "Work with" field
- Press the twisty to the left of the "Programming Languages" category
- Tick the "Eclipse C/C++ Development Tools" check-box ( should be Version 6.0.0 )
- Press the "Next" button and then "Finish" Button to install.

Galileo release URL: The Eclipse framework is released annually as a collected
and tested repository. Each release has a different name relating to celestial objects, so far moons of planets in the solar system. You should use the repository URL for the release you are using. The name is made up of "download.eclipse.org" and "/releases/galileo" in this case, but would obviously change if you used a different version of eclipse.

Friday, September 10, 2010

Installing Virtual Box guest additions on CentOS5 and Scientific Linux 5 (x86)

First step have the proper libraries installed

yum install gcc-c++ kernel-devel kernel-headers

Next navigate to the folder where your kernel source is located

export KERN_DIR=/usr/src/kernels/bla bla bla

cd into the VBox guest additions folder then run

sh VBoxLinuxAdditions-x86.run

Enjoy, you are done :)

Sunday, August 22, 2010

Otcl and ns2

I have been receiving emails on how to run otcl code. In order to run ns2 code you need to have ns2 installed which is already installed in the lab. In case you wish to install it on your home PC's, you can refer to the following post regarding installation instructions. http://zaidmunir.blogspot.com/2010/06/installing-ns2-on-ubuntu-910.html

Friday, August 20, 2010

Ubuntu Installation - Tips and tricks

There will be a session tomorrow on Saturday 21st of August 2010 at 11 am in the auditorium. You are all invited to attend. The session will focus on various methods of installing Ubuntu on your computers and related issues. Other issues related to installation of softwares, missing drivers or issues related to networking etc. will also be discussed.

Friday, August 6, 2010

Recovering lost Ubuntu installation after installing windows

You can  try installing and using Boot-repair, for instructions on installing and using it refer to the following link. (Note: i have not personally tried it but seems user friendly)
https://help.ubuntu.com/community/Boot-Repair

Or alternately you can choose to do it manually

Boot from a live cd of Ubuntu 10.04.
First, find out about your drives.
sudo fdisk -l
Then check to see if the drive is already mounted or not
df
If it is not mounted then mount it first. This is the drive in which Ubuntu is installed. In this example i will be mounting /dev/sda2 on to the folder /home/mtf
mkdir /home/mtf
sudo mount /dev/sda2 /home/mtf
In case you are not sure which drive has Ubuntu installed, you would like to look for a drive with System field as "Linux" in the output of sudo fdisk -l
If you have multiple such drives and are confused, then you can check the drives by mounting each of them and looking at the contents to see which is which. You can mount multiple drives on different folders using the steps mentioned above. You may also mount to the same folder (not consecutively) by unmounting the former drive.In this example /dev/sda2 is unmounted and /dev/sda3 is mounted in its stead
sudo umount /home/mtf
sudo mount /dev/sd3 /home/mtf
Once the drive is mounted
sudo grub-install --root-directory=/path-of-mounted-drive-with-ubuntu-install /dev/sdx
Replace x with the letter for your hard disk.

In my example, /dev/sda3 is the drive with Ubuntu installation, mounted on /home/mtf so the command would be
sudo grub-install --root-directory=/home/mtf /dev/sda
Note that in the above case it is /dev/sda and NOT /dev/sda2

Additionally to ensure everything is in order boot into your Ubuntu and then do the following to fix any missing or malfunctioning entries in grub
sudo update-grub

https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

Sunday, June 27, 2010

Installing ns-2 for multiple users

There are a few tips that might save you considerable time and irritation if you follow them.
  1. Firstly, never install ns-2 in the home folder, make a folder at "/" for installing applications, for instance "/Apps" in this case.
  2. Installing for multiple users is no big deal, just install it like you would for a single user, if you are looking for Ubuntu install instructions you can refer to my earlier post http://zaidmunir.blogspot.com/2010/06/installing-ns2-on-ubuntu-910.html you just need to prefix the commands mentioned in the link with a sudo :)
  • After installing it just make a minor change, instead of making changes to the ~./bashrc file make the same changes to /etc/bash.bashrc if you are using Ubuntu or /etc/bashrc for other flavours of Linux.
  • Now go the user which is most probably a "desktop user" you can switch environments without having to log off using the command "su username -" and enter password when prompted for it. Now you would be in the username's environment. now if you run ns-2 it would run but when you run the validation checks, it would fail. This is because the folder that you created at root does not have write privileges by default. You can change this issuing the command "sudo chmod -Rf +w /Apps/ns-allinone-2.34" or you can use "sudo chmod -Rf 777 /Apps/ns-allinone-2.34" this would cause the specified folder and its subfolder to have wrx permissions for all users.
  • Now you can run the validation tests and in a while you should get an all tests passed message. Whola, you are ready to go. By following this method all the users can run ns-2 without any issue. :)

Friday, June 25, 2010

Installing ns2 on Ubuntu 9.10

A lot of people dread having to install ns2. Well here is a simple tutorial to get you through in just a single go. Mostly people fail at installing ns2 in the first go because of the missing libraries and dependencies.

Here is what you do to install ns2 in the first go.

1. Download ns-allinone-2.34

2. cd into the directory where you have downloaded the ns-allinone-2.34.tar.gz file. Then issue the command cp ns-allinone-2.34.tar.gz ~/

3. Then type cd ~/ to get into your home folder

4. Then use the command tar -xvzf ns-allinone-2.34.tar.gz

5. But before you can continue you need to install the following libraries

autoconf
automake
gcc
g++
build-essential
libxmu-dev
libtool
libxt-dev

6. You can download and install the libraries individually using the command sudo apt-get install libraryname e.g
sudo apt-get install autoconf

7. Now you are all set to proceed, but before you do there is one more modification that needs to be made, cd into ns-allinone-2.34/otcl-1.13 and then use the command gedit configure to make the following changes to the configure file.

change the following line
SHLIB_LD = "ld -shared" to SHLIB_LD = "gcc -shared", you would find that the string SHLIB_LD occurs at many places, you are to change the one that is written under Linux*)

OR you may try typing export CC = gcc-4.3 to change the environment variable, though i have not tried this seemingly easier method. (note: run the command gcc -v to check your version to use in the above command)

8. Now cd into the ns-allinone-2.34 directory and do ./install , hopefully everything will go smoothly and you ns-2 will be installed. But before you can proceed you need to set the environment variables.

gedit ~/.bashrc

copy the following lines at the end of the file, be sure to change /your/path to the path where ns is installed on your system.

# LD_LIBRARY_PATH
OTCL_LIB=/your/path/ns-allinone-2.34/otcl-1.13
NS2_LIB=/your/path/ns-allinone-2.34/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/your/path/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/your/path/ns-allinone-2.34/bin:/your/path/ns-allinone-2.34/tcl8.4.18/unix:/your/path/ns-allinone-2.34/tk8.4.18/unix
NS=/your/path/ns-allinone-2.34/ns-2.34/
NAM=/your/path/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

for instance on my system i would replace /your/path with /home/z3d

9. source ~/.bashrc to have the changes take effect or you can simply reopen terminal.

10. Now cd into the folder /ns-allinone-2.34/ns-2.34/ and type the command ./validate
it will take a considerably longer time than it did to install and in almost an hour you should get a message all tests successful.

11. Now you can type ns and begin doing your work :)