Pages

Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Sunday, 18 December 2011

NS-2 Installation on FEDORA and REDHAT

NS-2 INSTALLATION ON FEDORA AND REDHAT:
The installation method of NS-2 on both fedora14 and redhat are same:



 PREPARING THE ENVIRONMENT:
The first step was to check that the development environment was complete and
install any missing tools.
rpm -q wget
rpm -q gcc-c++
rpm -q libX11-devel
rpm -q xorg-x11-proto-devel
rpm -q libXt-devel
rpm -q libXmu-devel

From terminal login as super user type:
yum install autoconf
yum install automake
yum install gcc-c++
yum install libX11-devel

NS-2 Installation on ubuntu


NS-2 INSTALLATION ON UBUNTU:
First download the file and unzip it
$ wget http://nchc.dl.sourceforge.net/sourceforge/nsnam/ns-allinone-2.34.tar.gz
$ tar -xzvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34
Prepare the environment and install it will take a lot of time.
$ sudo apt-get install build-essential autoconf automake libxmu-dev
$ ./install

For ubuntu 9.10, export the gcc-4.3
$ export CC=gcc-4.3

Set the environment variable so that our xgraph and nam will work properly
$ gedit ~/.bashrc

# 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



Linux basic commands

LINUX BASIC COMMANDS:
Following are some basic commands use in linux system

Terminal:
The terminal is often called the command prompt or the shell. In days gone by, this was the way the user interacted with the computer, however Linux users have found that the use of the shell can be quicker than a graphical method and still holds some merit today.

cd       Change Directory
ls       List information about file(s)
make     Recompile a group of programs
gzip     Compress or decompress named file(s)
install  Copy files and set attributes
kill     Stop a process from running
killall  Kill processes by name
sudo     Execute a command as another user
Wget     Retrieve web pages or files via HTTP, HTTPS or FTP
Apt-get  Search for and install software packages (Debian/Ubuntu):
APT (Advanced Packaging Tool) is a powerful package management
system.APT automatically handles
dependencies and performs other operations on system packages to allow the
installation of the desired package/s.
Some common commands that can be used with APT:
Install packages:
# sudo apt-get install packagename
Remove packages:
# sudo apt-get remove packagename
Retrieve new lists of packages:
# sudo apt-get update
Upgrade system with available updates:
# sudo apt-get upgrade

Directories and file system of linux

Linux and Unix file systems are organised in a hierarchical, tree-like structure. The highest level of the file system is the / or root directory. In the Unix and Linux design philosophy, everything is considered a file - including hard disks, partitions and removable media. This means that all other files and directories (including other disks and partitions) exist under the root directory.
Underneath the root (/) directory, there is a set of important system directories that are common across most Linux distributions that are used.

The following is a listing of common directories that are directly under the root (/) directory

  •         /bin - important binary applications
  •          /boot - boot configuration files
  •          /dev - the device files
  •          /etc - configuration files, startup scripts, etc...
  •          /home - local users' home directories
  •        /lib - system libraries
  •         /lost+found - provides a lost+found system for files that exist under the root (/) directory
  •          /media - mounted (loaded) removable media such as CDs, digital cameras, etc...
  •          /mnt - mounted filesystems
  •          /opt - provides a location for optional applications to be installed
  •          /proc - special dynamic directory that maintains information about the state of the system, including currently running processes
  •          /root - root user home directory, pronounced 'slash-root'
  •         /sbin - important system binaries
  •         /sys - system files
  •          /tmp - temporary files
  •          /usr - applications and files that are mostly available for all users to access
  •          /var - variable files such as logs and databases
All of the files on a Linux system have permissions that allow or prevent others from viewing, modifying or executing. The super user "root" has the ability to access any file on the system. Each file has access restrictions, user restrictions and have an owner/group association.

/bin:
The first directory we get to is /bin. Its name is derived from the word "binary." Often, the word "binary" is used to refer to executable programs or other files that contains non-readable characters. The /bin directory is where many of the system-related binaries are kept, hence the name. 

Introduction to unix and linux

INTRODUCTION TO UNIX:
UNIX is an operating system which was first developed in the 1960s, and has been under constant development ever since. By operating system, we mean the suite of programs which make the computer work. Knowledge of UNIX is required for operations which aren't covered by a graphical program, or for when there is no windows interface available, for example, in a telnet session. Unix was primarily oriented towards the command line interface, and that legacy is carried on in Linux. Thus, the graphical user interface with its windows, icons and menus are built on top of a basic command line interface. Furthermore, this means that the Linux file system is structured to be easily manageable and accessible from the command line. Many of the design conventions behind Unix also exist in Linux and are central to understanding the basics of the system

The UNIX operating system is made up of three parts:
·         The kernel
·         The shell
·         Programs

Kernel:
The kernel of UNIX is the hub of the operating system: it allocates time and memory to programs and handles the filestore and communications in response to system calls.

Shell:
The shell acts as an interface between the user and the kernel. When a user logs in, the login program checks the username and password, and then starts another program called the shell. The shell is a command line interpreter (CLI). It interprets the commands the user types in and arranges for them to be carried out.

INTRODUCTION TO LINUX:
Linux is a free multitasking, multi-user network operating system that behaves like Unix. That means Linux is not UNIX. It is a UNIX-based operating system. It was designed specifically for the 386(x86 Intel CPU) platform and released under GNU General Public License. Linux is technically only the kernel,