{"id":17567,"date":"2022-06-04T04:59:13","date_gmt":"2022-06-04T04:59:13","guid":{"rendered":"https:\/\/linuxways.net\/?p=17567"},"modified":"2022-06-04T04:59:13","modified_gmt":"2022-06-04T04:59:13","slug":"how-to-install-nse3-on-centos-7","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/how-to-install-nse3-on-centos-7\/","title":{"rendered":"How to Install NSE3 on CentOS 7"},"content":{"rendered":"<h2>What is NS?<\/h2>\n<p>NS, short for Network Simulator is a series of discrete event network simulators (ns-1, ns-2, ns-3). They are mainly used in teaching and research. It is free and open source.<\/p>\n<h3>NS-1<\/h3>\n<p>NS-1 was known as LBNL Network Simulator. It was derived from REAL simulator.<\/p>\n<h3>NS-2<\/h3>\n<p>NS-2 came into being after the revision of NS-1. Ns-2 holds considerable contributions from third parties, comprising wireless code from the UCB Daedelus and CMU Monarch projects and Sun Microsystems.<\/p>\n<h3>NS-3<\/h3>\n<p>NS-3 came as a replacement for NS-2. Backward compatibility with NS-2 was decided to be stopped. The new simulator is being developed and maintained.<\/p>\n<p>To learn about NS3, visit:<\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Ns_(simulator)\">https:\/\/en.wikipedia.org\/wiki\/Ns_(simulator)<\/a><\/p>\n<p>Today, we will show you how to install NSE-3 on our machine. To demonstrate the installation of NS3, we have used CentOS 7 as the operating system. CentOS, short for Community Enterprise Operating System, is a free and open source distribution of the Linux family. It is widely popular among the tech savvy community because of its focus on user friendliness and high efficiency when it comes to performance. Its functionality is compatible with its upstream source Red Hat Enterprise Linux (RHEL).<\/p>\n<p>To learn more about CentOS, check out this page:<\/p>\n<p><a href=\"https:\/\/www.centos.org\/\">https:\/\/www.centos.org\/<\/a><\/p>\n<p>We will perform the installation using CentOS command line, also known as \u2018Terminal\u2019. We have divided the installation process into 6 steps. Each step has one or more commands that we will run to install NS-3 and the tools required for it.<\/p>\n<p>Without any further ado, let\u2019s get started!<\/p>\n<h2>Installation Guide:<\/h2>\n<p>Following are the steps involved in installing NS-3 on CentOS 7:<\/p>\n<h3>Step 1: Download gcc compiler 4.9 from this web page:<\/h3>\n<pre><a href=\"https:\/\/ftp.gnu.org\/gnu\/gcc\/gcc-4.9.2\/\">https:\/\/ftp.gnu.org\/gnu\/gcc\/gcc-4.9.2\/<\/a><\/pre>\n<p>Once it is downloaded, copy it to \/opt directory.<\/p>\n<h3>Step 2: Install gcc-c++.4.9 compiler<\/h3>\n<p>Following are the commands that we will run one by one to install the compiler:<\/p>\n<pre>tar zxf gcc-4.9.2.tar.gz<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"226\" height=\"25\" class=\"wp-image-17568\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-29.png\" \/><\/p>\n<pre>cd gcc-4.9.2<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"121\" height=\"27\" class=\"wp-image-17569\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-30.png\" \/><\/p>\n<pre>.\/contrib\/download_prerequisites<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"24\" class=\"wp-image-17570\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-31.png\" \/><\/p>\n<pre>.\/configure --disable-multilib \u2013enable-languages=c,c++<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"491\" height=\"27\" class=\"wp-image-17571\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-32.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-32.png 491w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-32-300x16.png 300w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/p>\n<pre>make -j 4<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"87\" height=\"30\" class=\"wp-image-17572\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-33.png\" \/><\/p>\n<pre>make install<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"121\" height=\"24\" class=\"wp-image-17573\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-34.png\" \/><\/p>\n<p>You have now successfully installed the gcc compiler.<\/p>\n<h3>Step 3: Install necessary tools to install nse-3<\/h3>\n<p>Here, we will download rpmforge from the following webpage:<\/p>\n<p><a href=\"http:\/\/repoforge.org\/use\/\">http:\/\/repoforge.org\/use\/<\/a><\/p>\n<p>Once it is downloaded, we will install it by executing the following commands:<\/p>\n<pre>yum install rpmforge<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"186\" height=\"31\" class=\"wp-image-17574\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-35.png\" \/><\/p>\n<p>yum install unrar* mercurial* bzr* cmake p7z* cvs*<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"465\" height=\"28\" class=\"wp-image-17575\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-36.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-36.png 465w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-36-300x18.png 300w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><\/p>\n<h3>Step 4: Download NS-3.27.tar.bz2 file<\/h3>\n<p>In this step, download NS-3.27.tar.bz2 file from the following webpage:<\/p>\n<p><a href=\"https:\/\/www.nsnam.org\/releases\/ns-3-27\/\">https:\/\/www.nsnam.org\/releases\/ns-3-27\/<\/a><\/p>\n<h3>Step 5: Paste the package into the right location<\/h3>\n<p>Go to the following path:<\/p>\n<pre>cd \/opt<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"67\" height=\"28\" class=\"wp-image-17576\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-37.png\" \/><\/p>\n<p>Unzip the package using the following command:<\/p>\n<pre>tar zxvf ns-allinone-3.27.tar.bz2<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"314\" height=\"25\" class=\"wp-image-17577\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-38.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-38.png 314w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-38-300x24.png 300w\" sizes=\"auto, (max-width: 314px) 100vw, 314px\" \/><\/p>\n<p>Now run the following command to go to ns-allinone-3.2 folder:<\/p>\n<pre>cd ns-allinone-3.2<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"176\" height=\"27\" class=\"wp-image-17578\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-39.png\" \/><\/p>\n<p>Go to the bake directory by running this command:<\/p>\n<pre>cd bake<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"75\" height=\"25\" class=\"wp-image-17579\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-40.png\" \/><\/p>\n<p>Once you are inside the directory, execute the following command:<\/p>\n<pre>.\/bake.py check<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"149\" height=\"29\" class=\"wp-image-17580\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-41.png\" \/><\/p>\n<h3>Step 6: Install NS-3<\/h3>\n<p>Go back to the previous directory by executing the following command:<\/p>\n<pre>cd ..<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"49\" height=\"33\" class=\"wp-image-17581\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-42.png\" \/><\/p>\n<p>Now check what is your current working directory by executing the pwd command:<\/p>\n<pre>pwd<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"33\" height=\"27\" class=\"wp-image-17582\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-43.png\" \/><\/p>\n<p>It is supposed to be \/opt\/ns-allinone-3.27.<\/p>\n<p>Now run the following commands one by one to install the software:<\/p>\n<pre>.\/build.py --enable-examples --enable-test<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"379\" height=\"29\" class=\"wp-image-17583\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-44.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-44.png 379w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-44-300x23.png 300w\" sizes=\"auto, (max-width: 379px) 100vw, 379px\" \/><\/p>\n<pre>cd ns-3.27<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"96\" height=\"24\" class=\"wp-image-17584\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-45.png\" \/><\/p>\n<pre>.\/waf --build-profile=debug --enable-examples --enable-tests configure<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"30\" class=\"wp-image-17585\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-46.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-46.png 636w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-46-300x14.png 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/p>\n<pre>.\/waf<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"64\" height=\"24\" class=\"wp-image-17586\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-47.png\" \/><\/p>\n<pre>.\/test.py -c core<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"156\" height=\"26\" class=\"wp-image-17587\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-48.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-48.png 156w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-48-150x26.png 150w\" sizes=\"auto, (max-width: 156px) 100vw, 156px\" \/><\/p>\n<pre>.\/waf --run hello-simulator<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"254\" height=\"24\" class=\"wp-image-17588\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/06\/word-image-49.png\" \/><\/p>\n<p>Once all the commands have been successfully run, the software will be automatically installed.<\/p>\n<p>If you have reached this far without running into any errors, congratulations, you made it to the end.<\/p>\n<h2>Conclusion:<\/h2>\n<p>In today\u2019s guide, we saw in detail how to install NS-3.27 on our machine. The system that we have used is centOS 7. We demonstrated the installation process using the command line of CentOS where we ran a few easy-to-follow commands.<\/p>\n<p>I hope you enjoyed our effort. Stay tuned for more helpful Linux tutorials.<\/p>","protected":false},"excerpt":{"rendered":"<p>What is NS? NS, short for Network Simulator is a series of discrete event network simulators (ns-1, ns-2, ns-3). They are mainly used in teaching and research. It&hellip;<\/p>","protected":false},"author":1,"featured_media":17605,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[234,1028],"class_list":["post-17567","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","tag-centos-7","tag-nse3"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/17567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=17567"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/17567\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/17605"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=17567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=17567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=17567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}