{"id":127,"date":"2008-09-13T10:39:33","date_gmt":"2008-09-13T13:39:33","guid":{"rendered":"http:\/\/www.foxnet.com.br\/portal2\/?p=127"},"modified":"2011-10-04T09:40:52","modified_gmt":"2011-10-04T12:40:52","slug":"como-instalar-o-ns2-no-fedora-core","status":"publish","type":"post","link":"https:\/\/www.foxnet.com.br\/portal3\/?p=127","title":{"rendered":"Como instalar o NS2 no Fedora Core 9"},"content":{"rendered":"<p>1. Pre-requisitos<br \/>\n<span style=\"color: #808080;\"><em>yum install gcc-c++<br \/>\nyum install libX11-devel<br \/>\nyum install xorg-x11-proto-devel<br \/>\nyum install libXt-devel<br \/>\nyum install libXmu-devel<\/em><\/span><\/p>\n<p>2. Instala\u00e7\u00e3o do tcl<br \/>\n<span style=\"color: #808080;\"><em>wget http:\/\/prdownloads.sourceforge.net\/tcl\/tcl8.4.14-src.tar.gz<br \/>\ncd \/usr\/share\/<br \/>\ntar -zxvf \/root\/tcl8.4.14-src.tar.gz<br \/>\ncd \/usr\/share\/tcl8.4.14\/unix\/<br \/>\n.\/configure<br \/>\nmake<br \/>\nmake install<\/em><\/span><\/p>\n<p>3. Instala\u00e7\u00e3o do tk<br \/>\n<span style=\"color: #808080;\"><em>wget http:\/\/prdownloads.sourceforge.net\/tcl\/tk8.4.14-src.tar.gz<br \/>\ncd \/usr\/share\/<br \/>\ntar -zxvf \/root\/tk8.4.14-src.tar.gz<br \/>\ncd \/usr\/share\/tk8.4.14\/unix\/<br \/>\n.\/configure<br \/>\nmake<br \/>\nmake install<\/em><\/span><\/p>\n<p>4. Instala\u00e7\u00e3o do otcl<br \/>\n<span style=\"color: #808080;\"><em>wget http:\/\/downloads.sourceforge.net\/otcl-tclcl\/otcl-src-1.12.tar.gz<br \/>\ncd \/usr\/share<\/em><\/span><\/p>\n<p><span style=\"color: #808080;\"><em>tar -zxvf \/root\/otcl-src-1.12.tar.gz<br \/>\ncd \/usr\/share\/otcl-1.12\/<br \/>\n.\/configure &#8211;with-tcl=\/usr\/share\/tcl8.4.14\/<br \/>\nmake<\/em><\/span><br \/>\n-&gt; Voc\u00ea deve editar o arquivo Makefile<br \/>\n<span style=\"color: #808080;\"><em>vi Makefile<\/em><\/span><br \/>\n-&gt; pr\u00f3ximo da linha 31 voc\u00ea dever\u00e1 ver:<br \/>\n<span style=\"color: #808080;\"><em>INST_OLIBSH= NONE\/lib<\/em><\/span><br \/>\n-&gt; Substitua por:<br \/>\n<span style=\"color: #808080;\"><em>INST_OLIBSH= \/usr\/local\/lib<\/em><\/span><br \/>\n-&gt; salve e continue<br \/>\n<span style=\"color: #808080;\"><em>make install<\/em><\/span><\/p>\n<p>5. Instala\u00e7\u00e3o do tclcl (caso use o fedora core 11 veja o final desse texto)<br \/>\n<span style=\"color: #808080;\"><em>wget http:\/\/downloads.sourceforge.net\/otcl-tclcl\/tclcl-src-1.18.tar.gz<br \/>\ncd \/usr\/share<br \/>\ntar -zxvf \/root\/tclcl-src-1.18.tar.gz<br \/>\ncd \/usr\/share\/tclcl-1.18\/<br \/>\n.\/configure &#8211;with-tcl=\/usr\/share\/tcl8.4.14\/<br \/>\nmake<br \/>\nmake install<\/em><\/span><\/p>\n<p>6. Instala\u00e7\u00e3o do NS2\u00a0(caso use o fedora core 11 veja o final desse texto)<br \/>\n<span style=\"color: #808080;\"><em>wget http:\/\/downloads.sourceforge.net\/nsnam\/ns-src-2.30.tar.gz<br \/>\ncd \/usr\/share<br \/>\ntar -zxvf \/root\/ns-src-2.30.tar.gz<br \/>\ncd \/usr\/share\/ns-2.30\/<br \/>\n<span style=\"color: #000000; font-style: normal;\"><span style=\"color: #808080;\"><em>.\/configure <\/em><em><span style=\"font-style: normal;\"><span style=\"color: #000000;\">(ou .\/configure &#8211;enable-debug se voce quiser usar o gdb)<\/span><\/span><br \/>\nmake<br \/>\nmake install<\/em><\/span><br \/>\n-&gt; colocar o PATH.<br \/>\n<span style=\"color: #808080;\"><em>echo &#8216;export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:\/usr\/local\/lib:&#8217; &gt; \/etc\/profile.d\/ns.sh<br \/>\nchmod 0733 \/etc\/profile.d\/ns.sh<\/em><br \/>\n<span style=\"color: #000000;\">-&gt; Nesse ponto aqui&#8230; voc\u00ea pode fazer um teste se tudo esta funcionando. Digite: (no meu caso so funcionou depois que dei um reboot na m\u00e1quina, n\u00e3o me pergunte o porque! Acredito que devido ao path.)<br \/>\n<span style=\"color: #808080;\"><em>ns<\/em><\/span><br \/>\n-&gt; Voc\u00ea deve ver algo como:<br \/>\n<span style=\"color: #808080;\"><em>%<\/em><\/span><br \/>\n-&gt; para testar digite:<br \/>\n<span style=\"color: #808080;\"><em>% set ns [new Simulator<\/em>]<\/span><br \/>\n-&gt; voc\u00ea deve-ra ver algo como:<br \/>\n<span style=\"color: #808080;\"><em>_ox <span style=\"color: #000000;\">ou<\/span><\/em><em> _oxx<br \/>\n<\/em><\/span>-&gt; onde x e xx s\u00e3o n\u00fameros<br \/>\n-&gt; Para retornar ao prompt pressione control+c<\/span><\/span><\/span><\/em><\/span><\/p>\n<p><span style=\"color: #808080;\"><em><span style=\"color: #000000; font-style: normal;\">7. Instala\u00e7\u00e3o do nam<br \/>\n<span style=\"color: #808080;\"><em>wget http:\/\/downloads.sourceforge.net\/nsnam\/nam-src-1.13.tar.gz<br \/>\ncd \/usr\/share<br \/>\ntar -zxvf \/root\/nam-src-1.13.tar.gz<br \/>\ncd \/usr\/share\/nam-1.13\/<br \/>\n.\/configure<br \/>\nmake<br \/>\nmake install<\/em><\/span><br \/>\n-&gt; Para verificar se a instala\u00e7\u00e3o ocorreu normalmente digite:<br \/>\n<span style=\"color: #808080;\"><em>nam<\/em><\/span><br \/>\n-&gt; Voc\u00ea dever\u00e1 ver a janela inicial do nam.<br \/>\n-&gt; Caso aparesca o erro:<br \/>\n<span style=\"color: #808080;\"><em>&#8216;nam: no display name and no $DISPLAY environment variable&#8217;<\/em><\/span><br \/>\n-&gt; \u00c9 sinal de que voc\u00ea n\u00e3o est\u00e1 em uma sess\u00e3o X11. (O nam roda em ambiente gr\u00e1fico n\u00e3o em texto, ok?)<\/span><\/em><\/span><\/p>\n<p><span style=\"color: #808080;\"><em><span style=\"color: #000000; font-style: normal;\">8. Instala\u00e7\u00e3o do xgraph (opcional)<br \/>\n<span style=\"color: #808080;\">wget http:\/\/downloads.sourceforge.net\/nsnam\/xgraph-12.1.tar.gz<br \/>\ncd \/usr\/share<br \/>\ntar -zxvf \/root\/xgraph-12.1.tar.gz<br \/>\ncd \/usr\/share\/xgraph-12.1\/<br \/>\n.\/configure<br \/>\nmake<br \/>\nmake install<\/span><\/span><\/em><\/span><\/p>\n<p><span style=\"color: #808080;\"><em><span style=\"color: #000000; font-style: normal;\">Acredito que seguindo esses passos n\u00e3o havera erros.<br \/>\nTestei no Fedora Core 9 e est\u00e1 rodando sem problemas.<br \/>\nBaseado nas instru\u00e7\u00f5es de\u00a0<em>Marcello Caleffi<\/em>.<\/span><\/em><\/span><\/p>\n<p>Para quem estiver usando o Fedora Core 11 as bibliotecas n\u00e3o s\u00e3o compativeis com a vers\u00e3o do C++.<br \/>\nPara instalar no Fedora Core 11 veja o post abaixo completo:<\/p>\n<p>clique aqui! &#8211;\u00a0<a href=\"http:\/\/www.foxnet.com.br\/portal3\/?p=164\">http:\/\/www.foxnet.com.br\/portal3\/?p=164<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Como instalar o NS2 no Fedora Core&#8230;. <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/www.foxnet.com.br\/portal3\/?p=127\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,20,14,19],"tags":[196,194,195],"class_list":["post-127","post","type-post","status-publish","format-standard","hentry","category-linux_dicas","category-redes_dicas","category-linux","category-redes","tag-network-simulator","tag-ns","tag-ns2"],"_links":{"self":[{"href":"https:\/\/www.foxnet.com.br\/portal3\/index.php?rest_route=\/wp\/v2\/posts\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.foxnet.com.br\/portal3\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.foxnet.com.br\/portal3\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.foxnet.com.br\/portal3\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.foxnet.com.br\/portal3\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=127"}],"version-history":[{"count":1,"href":"https:\/\/www.foxnet.com.br\/portal3\/index.php?rest_route=\/wp\/v2\/posts\/127\/revisions"}],"predecessor-version":[{"id":619,"href":"https:\/\/www.foxnet.com.br\/portal3\/index.php?rest_route=\/wp\/v2\/posts\/127\/revisions\/619"}],"wp:attachment":[{"href":"https:\/\/www.foxnet.com.br\/portal3\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.foxnet.com.br\/portal3\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.foxnet.com.br\/portal3\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}