Created
July 7, 2012 13:17
-
-
Save tacsio/3066449 to your computer and use it in GitHub Desktop.
Compilar ns-2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copie o arquivo de instalação (ns-allinone-2.34.tar.gz) para a pasta do usuário (ex: /home/tacsio). Depois entre no terminal e digite: | |
$ cd ~ | |
$ tar xzvf ns-allinone-2.34.tar.gz | |
depois segue o que tem nesse link http://erl1.wordpress.com/2011/10/14/installing-ns-2-34-on-ubuntu-11-10-oneiric-ocelot/ | |
aí depois de instalar faz o seguinte: | |
Passo 1: Copie o texto abaixo para um arquivo chamado ns-2.txt e grave na pasta home do usuário. (onde tem x substituir pelas versões que aparecem no final da instalação) | |
#--------------------------------------------------------------------- | |
# | |
# .ns2 | |
# | |
# --------------------------------------------------------------------- | |
# Network Simulator - UNAMA | |
# --------------------------------------------------------------------- | |
NS2_ROOT=$HOME/ns-allinone-2.34 | |
# LD_LIBRARY_PATH | |
OTCL_LIB=$NS2_ROOT/otcl-1.1x | |
NS2_LIB=$NS2_ROOT/lib | |
X11_LIB=/usr/X11R6/lib | |
USR_LIB=/usr/local/lib | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LIB | |
# TCL_LIBRARY | |
TCL_LIB=$NS2_ROOT/tcl8.4.1x/library | |
USR_LIB=/usr/lib | |
export TCL_LIBRARY=$TCL_LIB:$USR_LIB | |
# PATH | |
XGRAPH=$NS2_ROOT/bin:$NS2_ROOT/tcl8.4.1x/unix:$NS2_ROOT/tk8.4.1x/unix | |
NS=$NS2_ROOT/ns-2.34/ | |
NAM=$NS2_ROOT/nam-1.1x/ | |
PATH=$PATH:$XGRAPH:$NS:$NAM | |
export PATH | |
#--------------------------------------------------------------------- | |
Passo 2: digite | |
# mv ns-2.txt ~/.ns-2 | |
# echo "source ~/.ns-2" >> ~/.bashrc | |
Passo 3: Feche a sessão a abra novamente | |
Passo 4: Verifique se o simulador esta instalado corretamente | |
digitando no prompt de comando: | |
# ns | |
% ns-version | |
Se aparecer a versão 2.34 a tarefa está cumprida |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment