ns3install.sh is a simple and easy interactive script for NS3 installation,
development by Prof. Wyllian Bezerra da Silva at
Federal University of Santa Catarina (UFSC).
-
Run the script in console, e.g.,
bash ns3install.shor change the permission (chmod u+x ns3install.sh) and run by command line./ns3install.sh. -
Provide the sudo password.
-
If the distro is based on
Debian/UbuntuorRedHat, all dependencies will be installed. However, if the distro is based other else, check the dependencies before continuing the NS3 installation. -
Enter the username with sudo privileges. Default:
$USER. Case the user has not sudo privileges, add him to sudoers modifying the/etc/sudoersfile (Debian/Ubuntu);
# User privilege specification
root ALL=(ALL:ALL) ALL
<user> ALL=(ALL:ALL) ALL # <-- change <user> by current username-
Set the NS3 installation directory. Default:
/usr/local/ns3. -
Provide the latest NS3 release URL. Default: https://www.nsnam.org/release/ns-allinone-3.26.tar.bz2.
-
Wait for the next processing pass:
- Creating the NS3 path directory.
- Adding the user
$USERtostaffgroup. - Changing permitions on the NS3 directory to
rwx. - Accessing the NS3 path.
- Downloading the NS3 provided at step 6.
- Extracting
.tar.bz2file. - Deleting
.tar.bz2file. - Accessing
ns3-allinonepath.
-
Confirm the NetAnim version, and press
<ENTER>. -
Wait for NS3 building process to complete.
- NS3 testing process.
- Adding environment variables on bashfile at
$HOME/.bashrc.
- Standard: use
waf [options] --run <NS3 file path>. For generating output in the same current working directory path:
waf --cwd=$PWD --run <NS3 file path>- Using optimized options:
-
waf + output in the same current working directory path:
wafo [options] <NS3 input file path>
-
waf + output in the same current working directory path + visualization:
wafvo [options] <NS3 input file path>