install-gns3-debian12/Makefile

125 lines
4.3 KiB
Makefile
Raw Normal View History

2024-01-26 03:27:06 +02:00
all:
echo OK
2024-01-26 03:31:56 +02:00
check-deps-path:
which setcap
which usermod
2024-01-26 16:07:48 +02:00
remove-debian-sources:
rm -vf /etc/apt/sources.list.d/debian.sources
install-il-debian-sources:
cp -vf il-sources.list /etc/apt/sources.list.d/il-sources.list
2024-03-20 18:31:18 +02:00
install-iptables-tools:
apt install iptables iptstate conntrack iptables-persistent netfilter-persistent -y
2024-01-26 03:31:56 +02:00
install: install-gns3
2024-01-26 03:27:06 +02:00
install-docker:
bash install-docker.sh
install-gns3-deps:
apt update
2024-01-26 06:25:52 +02:00
apt install -y build-essential jq rsync net-tools lsb-release
2024-01-26 03:27:06 +02:00
apt install -y bridge-utils cpu-checker libvirt-clients libvirt-daemon qemu-system qemu-kvm bridge-utils libvirt-daemon-system
apt install -y python-dev-is-python3 libelf-dev libpcap-dev python3-pyqt5 xterm cmake
apt install -y python3-pyqt5.QtSvg python3-pyqt5.qtwebsockets
DEBIAN_FRONTEND=noninteractive apt install -y bash-completion libguestfs-tools bsd-mailx
2024-01-26 06:03:30 +02:00
install-gns3: install-gns3-deps check-deps-path install-busybox-static install-pip upgrade-pip3 install-docker create-gns3-user build-gns3-server build-gns3-gui build-gns3-vpcs build-gns3-dynamips build-gns3-ubridge
ln -s /usr/bin/qemu-system-x86_64 /usr/bin/qemu-kvm; true
chown gns3:gns3 /home/gns3/ -R
systemctl daemon-reload
systemctl enable gns3.service
systemctl start gns3.service
build-gns3-server:
2024-01-26 03:27:06 +02:00
git clone --depth 1 https://github.com/GNS3/gns3-server.git; true
2024-08-21 11:45:42 +03:00
cd gns3-server && git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*' && git pull origin && git checkout tags/v2.2.49
2024-01-26 03:27:06 +02:00
python3 -m pip install --upgrade pip --break-system-packages
cd gns3-server && pip3 install -r requirements.txt --break-system-packages && python3 setup.py install
ln -s /usr/bin/qemu-system-x86_64 /usr/bin/qemu-kvm;true
cd gns3-server/init && cp gns3.service.systemd /etc/systemd/system/gns3.service
chown root:root /etc/systemd/system/gns3.service
sed -i -e "s@^ExecStart=.*@ExecStart=/usr/local/bin/gns3server@g" /etc/systemd/system/gns3.service
2024-01-26 06:03:30 +02:00
mkdir -p /home/gns3/.config/GNS3/2.2/
cp -vf gns3_server.conf /home/gns3/.config/GNS3/2.2/gns3_server.conf
2024-01-26 03:27:06 +02:00
chown gns3:gns3 /home/gns3/ -R
systemctl daemon-reload
2024-01-26 06:03:30 +02:00
build-gns3-gui:
git clone --depth 1 https://github.com/GNS3/gns3-gui.git; true
python3 -m pip install --upgrade pip --break-system-packages
cd gns3-gui && pip3 install -r requirements.txt --break-system-packages && python3 setup.py install
build-gns3-vpcs:
git clone --depth 1 https://github.com/GNS3/vpcs.git; true
cd vpcs/src && ./mk.sh && cp -v vpcs /usr/local/bin/vpc
build-gns3-dynamips:
git clone --depth 1 https://github.com/GNS3/dynamips.git; true
cd dynamips && mkdir build && cd build && cmake .. && make && make install
build-gns3-ubridge:
git clone --depth 1 https://github.com/GNS3/ubridge.git; true
cd ubridge && make && make install
2024-01-26 03:27:06 +02:00
upgrade-gns3-server:
2024-03-13 17:48:41 +02:00
git clone --depth 1 https://github.com/GNS3/gns3-server.git; true
2024-08-21 11:45:42 +03:00
cd gns3-server && git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*' && git pull origin && git checkout tags/v2.2.49
2024-03-13 17:48:41 +02:00
python3 -m pip install --upgrade pip --break-system-packages
2024-01-26 03:27:06 +02:00
systemctl stop gns3.service
cd gns3-server && pip3 install -r requirements.txt --break-system-packages && python3 setup.py install
systemctl start gns3.service
create-gns3-user:
useradd gns3;true
mkdir -p /home/gns3
rsync -av /etc/skel/ /home/gns3/
usermod -a -G qemu gns3;true
usermod -a -G kvm gns3;true
usermod -a -G libvirt gns3;true
usermod -a -G docker gns3;true
cleanup-gns3-sources:
rm -fr gns3-server
rm -fr dynamips
rm -fr gns3-gui
rm -fr ubridge
rm -fr vpcs
install-pip:
apt install -y python3-pip
upgrade-pip3:
python3 -m pip install --upgrade pip --break-system-packages
2024-01-26 06:03:30 +02:00
upgrade-python-deps:
pip3 install --upgrade requests --break-system-packages
pip3 install --upgrade chardet --break-system-packages
2024-01-26 03:27:06 +02:00
install-busybox-static:
apt install -y busybox-static
get-busy-box-static:
bash get-busy-box-static.sh
disable-firewalld:
systemctl disable --now firewalld
2024-03-20 18:31:18 +02:00
fix-cloudinit-netplan-permissions:
chmod 600 /etc/netplan/50-cloud-init.yaml
install-default-iptables-persistent-rules:
cp -vf rules.v4 /etc/iptables/rules.v4
cp -vf rules.v6 /etc/iptables/rules.v6
install-debain-hv-scripts:
mkdir -p /usr/libexec/hypervkvpd
cp -vf hv_get_dns_info.sh /usr/libexec/hypervkvpd/hv_get_dns_info
chmod +x /usr/libexec/hypervkvpd/hv_get_dns_info
cp -vf hv_get_dhcp_info.sh /usr/libexec/hypervkvpd/hv_get_dhcp_info
chmod +x /usr/libexec/hypervkvpd/hv_get_dhcp_info