# OMNet++ & Simu5G Installation & Execution
###### tags: `Construction`
## Basic requirement
| OS/Kernel | Version |
|:-------------------------- |:----------------------------------------|
| Host operating system | Linux Ubuntu 18.04 or 20.04 or 22.04 |
| Kernel | 4.15.0.142.lowlatency |
## Prerequisites
Simu5G can be compiled on any platform supported by OMNeT++ and INET frameworks.
You should have working OMNeT++ and INET Framework installations. See the required versions above, depending on the Simu5G version you selected.
Make sure your OMNeT++ installation works OK (e.g. try running the samples) and it is in the PATH environment variable (to test it, type the command "which nedtool" into the terminal). On Windows, open a console with the "mingwenv.cmd" command. The PATH and other variables will be automatically adjusted for you. Use this console to compile and run INET and Simu5G.
Install and test INET according to the installation instructions found in the archive. Be sure to check if the INET examples are running fine before continuing.
## Build OMNet++
#### build the dependency for the first time
```sh=
1) Download and install Simu5G from the OMNeT++ IDE
This is the easiest way to get Simu5G:
Open the OMNeT++ IDE on your machine and make sure that the 'inet4.5' project is open and correctly built in your workspace
In the menu bar, click Help | Install Simulation Models... | Select Simu5G 1.2.2 and click Install Project
Wait until the building process is complete. This may take up several minutes.
$ sudo apt-get install build-essential
$ sudo apt-get update
$ sudo apt-get install build-essential gcc g++ bison flex perl
$ sudo apt-get install python python3 qt5-default libqt5opengl5-dev tcl-dev tk-dev
$ sudo apt-get install libxml2-dev zlib1g-dev default-jre doxygen graphviz
$ sudo apt-get install libwebkit2gtk-4.0-37
$ sudo apt-get install libwebkit2gtk-4.0-37-gtk2
$ python3 -m pip install --user --upgrade numpy pandas matplotlib scipy seaborn posix_ipc
```
#### Install Qtenv
```sh=
$ sudo add-apt-repository ppa:ubuntugis/ppa
$ sudo apt-get update
$ sudo apt-get install openscenegraph-plugin-osgearth libosgearth-dev
```
#### Install pcap library
```sh=
$ sudo apt-get install libpcap-dev
```
#### OMNet++ packages
Download and install follow this [reference](<https://omnetpp.org/download/old//>)
```sh=
$ tar xvfz omnetpp-6.0-linux-x86.tgz
$ cd omnetpp-6.0
$ source setenv
$ ./configure
## Test
$ cd samples/aloha
$ ./aloha
$ omnetpp
```
#### iNet-4.5.0 packages
Download and install follow this [reference](<https://inet.omnetpp.org//>)
```sh=
## In the OMNet++ path
$ tar xvfz inet-4.5.0-src.tgz
$ cd inet-4.5
$ source setenv
$ make makefiles
$ make
```
## Build Simu5G
Download and install follow this [reference](<https://github.com/Unipisa/Simu5G?tab=readme-ov-file//>)
```sh=
## In the OMNet++ path
$ git clone https://github.com/Unipisa/Simu5G
$ cd Simu5G
## Simu5G path add to environment variables
$ . setenv
$ make makefiles
$ make
## Run example
$ cd simulations/NR
$ ./run
```