docs: added complete install examples based on dockerfile commands
This commit is contained in:
parent
d09f777645
commit
785cf82ba3
3 changed files with 261 additions and 0 deletions
|
@ -85,6 +85,15 @@ sudo yum remove core
|
|||
sudo apt remove core
|
||||
```
|
||||
|
||||
## Installation Examples
|
||||
|
||||
The below links will take you to sections providing complete examples for installing
|
||||
CORE and related utilities on fresh installations. Otherwise, a breakdown for installing
|
||||
different components and the options available are detailed below.
|
||||
|
||||
* [Ubuntu 22.04](install_ubuntu.md)
|
||||
* [CentOS 7](install_centos.md)
|
||||
|
||||
## Package Based Install
|
||||
|
||||
Starting with 9.0.0 there are pre-built rpm/deb packages. You can retrieve the
|
||||
|
|
140
docs/install_centos.md
Normal file
140
docs/install_centos.md
Normal file
|
@ -0,0 +1,140 @@
|
|||
# Install CentOS
|
||||
|
||||
Below is a detailed path for installing CORE and related tooling on a fresh
|
||||
CentOS 7 install. Both of the examples below will install CORE into its
|
||||
own virtual environment located at **/opt/core/venv**. Both examples below
|
||||
also assume using **~/Documents** as the working directory.
|
||||
|
||||
## Script Install
|
||||
|
||||
This section covers step by step commands that can be used to install CORE using
|
||||
the script based installation path.
|
||||
|
||||
``` shell
|
||||
# install system packages
|
||||
sudo yum -y update
|
||||
sudo yum install -y git sudo wget tzdata unzip libpcap-devel libpcre3-devel \
|
||||
libxml2-devel protobuf-devel unzip uuid-devel tcpdump make epel-release
|
||||
sudo yum-builddep -y python3
|
||||
|
||||
# install python3.9
|
||||
cd ~/Documents
|
||||
wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz
|
||||
tar xf Python-3.9.15.tgz
|
||||
cd Python-3.9.15
|
||||
./configure --enable-optimizations --with-ensurepip=install
|
||||
sudo make -j$(nproc) altinstall
|
||||
python3.9 -m pip install --upgrade pip
|
||||
|
||||
# install core
|
||||
cd ~/Documents
|
||||
git clone https://github.com/coreemu/core
|
||||
cd core
|
||||
NO_SYSTEM=1 PYTHON=/usr/local/bin/python3.9 ./setup.sh
|
||||
source ~/.bashrc
|
||||
PYTHON=python3.9 inv install -p /usr --no-python
|
||||
|
||||
# install emane
|
||||
cd ~/Documents
|
||||
wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz
|
||||
tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz
|
||||
cd emane-1.3.3-release-1/rpms/el7/x86_64
|
||||
sudo yum install -y ./openstatistic*.rpm ./emane*.rpm ./python3-emane_*.rpm
|
||||
|
||||
# install emane python bindings into CORE virtual environment
|
||||
cd ~/Documents
|
||||
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip
|
||||
mkdir protoc
|
||||
unzip protoc-3.19.6-linux-x86_64.zip -d protoc
|
||||
git clone https://github.com/adjacentlink/emane.git
|
||||
cd emane
|
||||
git checkout v1.3.3
|
||||
./autogen.sh
|
||||
PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr
|
||||
cd src/python
|
||||
PATH=~/Documents/protoc/bin:$PATH make
|
||||
sudo /opt/core/venv/bin/python -m pip install .
|
||||
```
|
||||
|
||||
## Package Install
|
||||
|
||||
This section covers step by step commands that can be used to install CORE using
|
||||
the package based installation path. This will require downloading a package from the release
|
||||
page, to use during the install CORE step below.
|
||||
|
||||
``` shell
|
||||
# install system packages
|
||||
sudo yum -y update
|
||||
sudo yum install -y git sudo wget tzdata unzip libpcap-devel libpcre3-devel libxml2-devel \
|
||||
protobuf-devel unzip uuid-devel tcpdump automake gawk libreadline-devel libtool \
|
||||
pkg-config make
|
||||
sudo yum-builddep -y python3
|
||||
|
||||
# install python3.9
|
||||
cd ~/Documents
|
||||
wget https://www.python.org/ftp/python/3.9.15/Python-3.9.15.tgz
|
||||
tar xf Python-3.9.15.tgz
|
||||
cd Python-3.9.15
|
||||
./configure --enable-optimizations --with-ensurepip=install
|
||||
sudo make -j$(nproc) altinstall
|
||||
python3.9 -m pip install --upgrade pip
|
||||
|
||||
# install core
|
||||
cd ~/Documents
|
||||
sudo PYTHON=python3.9 yum install -y ./core_*.rpm
|
||||
|
||||
# install ospf mdr
|
||||
cd ~/Documents
|
||||
git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git
|
||||
cd ospf-mdr
|
||||
./bootstrap.sh
|
||||
./configure --disable-doc --enable-user=root --enable-group=root \
|
||||
--with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \
|
||||
--localstatedir=/var/run/quagga
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
|
||||
# install emane
|
||||
cd ~/Documents
|
||||
wget -q https://adjacentlink.com/downloads/emane/emane-1.3.3-release-1.el7.x86_64.tar.gz
|
||||
tar xf emane-1.3.3-release-1.el7.x86_64.tar.gz
|
||||
cd emane-1.3.3-release-1/rpms/el7/x86_64
|
||||
sudo yum install -y ./openstatistic*.rpm ./emane*.rpm ./python3-emane_*.rpm
|
||||
|
||||
# install emane python bindings into CORE virtual environment
|
||||
cd ~/Documents
|
||||
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip
|
||||
mkdir protoc
|
||||
unzip protoc-3.19.6-linux-x86_64.zip -d protoc
|
||||
git clone https://github.com/adjacentlink/emane.git
|
||||
cd emane
|
||||
git checkout v1.3.3
|
||||
./autogen.sh
|
||||
PYTHON=/opt/core/venv/bin/python ./configure --prefix=/usr
|
||||
cd src/python
|
||||
PATH=~/Documents/protoc/bin:$PATH make
|
||||
sudo /opt/core/venv/bin/python -m pip install .
|
||||
```
|
||||
|
||||
## Setup PATH
|
||||
|
||||
The CORE virtual environment and related scripts will not be found on your PATH,
|
||||
so some adjustments needs to be made.
|
||||
|
||||
To add support for your user to run scripts from the virtual environment:
|
||||
```shell
|
||||
# can add to ~/.bashrc
|
||||
export PATH=$PATH:/opt/core/venv/bin
|
||||
```
|
||||
|
||||
This will not solve the path issue when running as sudo, so you can do either
|
||||
of the following to compensate.
|
||||
```shell
|
||||
# run command passing in the right PATH to pickup from the user running the command
|
||||
sudo env PATH=$PATH core-daemon
|
||||
|
||||
# add an alias to ~/.bashrc or something similar
|
||||
alias sudop='sudo env PATH=$PATH'
|
||||
# now you can run commands like so
|
||||
sudop core-daemon
|
||||
```
|
112
docs/install_ubuntu.md
Normal file
112
docs/install_ubuntu.md
Normal file
|
@ -0,0 +1,112 @@
|
|||
# Install Ubuntu
|
||||
|
||||
Below is a detailed path for installing CORE and related tooling on a fresh
|
||||
Ubuntu 22.04 install. Both of the examples below will install CORE into its
|
||||
own virtual environment located at **/opt/core/venv**. Both examples below
|
||||
also assume using **~/Documents** as the working directory.
|
||||
|
||||
## Script Install
|
||||
|
||||
This section covers step by step commands that can be used to install CORE using
|
||||
the script based installation path.
|
||||
|
||||
``` shell
|
||||
# install system packages
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y ca-certificates git sudo wget tzdata libpcap-dev libpcre3-dev \
|
||||
libprotobuf-dev libxml2-dev protobuf-compiler unzip uuid-dev iproute2 iputils-ping \
|
||||
tcpdump
|
||||
|
||||
# install core
|
||||
cd ~/Documents
|
||||
git clone https://github.com/coreemu/core
|
||||
cd core
|
||||
./setup.sh
|
||||
source ~/.bashrc
|
||||
inv install
|
||||
|
||||
# install emane
|
||||
cd ~/Documents
|
||||
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip
|
||||
mkdir protoc
|
||||
unzip protoc-3.19.6-linux-x86_64.zip -d protoc
|
||||
git clone https://github.com/adjacentlink/emane.git
|
||||
cd emane
|
||||
./autogen.sh
|
||||
./configure --prefix=/usr
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
cd src/python
|
||||
make clean
|
||||
PATH=~/Documents/protoc/bin:$PATH make
|
||||
sudo /opt/core/venv/bin/python -m pip install .
|
||||
```
|
||||
|
||||
## Package Install
|
||||
|
||||
This section covers step by step commands that can be used to install CORE using
|
||||
the package based installation path. This will require downloading a package from the release
|
||||
page, to use during the install CORE step below.
|
||||
|
||||
``` shell
|
||||
# install system packages
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y ca-certificates python3 python3-tk python3-pip python3-venv \
|
||||
libpcap-dev libpcre3-dev libprotobuf-dev libxml2-dev protobuf-compiler unzip \
|
||||
uuid-dev automake gawk git wget libreadline-dev libtool pkg-config g++ make \
|
||||
iputils-ping tcpdump
|
||||
|
||||
# install core
|
||||
cd ~/Documents
|
||||
sudo apt-get install -y ./core_*.deb
|
||||
|
||||
# install ospf mdr
|
||||
cd ~/Documents
|
||||
git clone https://github.com/USNavalResearchLaboratory/ospf-mdr.git
|
||||
cd ospf-mdr
|
||||
./bootstrap.sh
|
||||
./configure --disable-doc --enable-user=root --enable-group=root \
|
||||
--with-cflags=-ggdb --sysconfdir=/usr/local/etc/quagga --enable-vtysh \
|
||||
--localstatedir=/var/run/quagga
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
|
||||
# install emane
|
||||
cd ~/Documents
|
||||
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.6/protoc-3.19.6-linux-x86_64.zip
|
||||
mkdir protoc
|
||||
unzip protoc-3.19.6-linux-x86_64.zip -d protoc
|
||||
git clone https://github.com/adjacentlink/emane.git
|
||||
cd emane
|
||||
./autogen.sh
|
||||
./configure --prefix=/usr
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
cd src/python
|
||||
make clean
|
||||
PATH=~/Documents/protoc/bin:$PATH make
|
||||
sudo /opt/core/venv/bin/python -m pip install .
|
||||
```
|
||||
|
||||
## Setup PATH
|
||||
|
||||
The CORE virtual environment and related scripts will not be found on your PATH,
|
||||
so some adjustments needs to be made.
|
||||
|
||||
To add support for your user to run scripts from the virtual environment:
|
||||
```shell
|
||||
# can add to ~/.bashrc
|
||||
export PATH=$PATH:/opt/core/venv/bin
|
||||
```
|
||||
|
||||
This will not solve the path issue when running as sudo, so you can do either
|
||||
of the following to compensate.
|
||||
```shell
|
||||
# run command passing in the right PATH to pickup from the user running the command
|
||||
sudo env PATH=$PATH core-daemon
|
||||
|
||||
# add an alias to ~/.bashrc or something similar
|
||||
alias sudop='sudo env PATH=$PATH'
|
||||
# now you can run commands like so
|
||||
sudop core-daemon
|
||||
```
|
Loading…
Reference in a new issue