mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
Update install.sh
This commit is contained in:
parent
04ae8f05c3
commit
4d39692075
1 changed files with 8 additions and 7 deletions
13
install.sh
13
install.sh
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "Installing nfsense dev env..."
|
echo "Installing nfsense dev env..."
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then echo "Please run as root." >&2; exit 1; fi
|
||||||
cd /root
|
cd /root
|
||||||
|
|
||||||
echo "Disable firewalld"
|
echo "Disable firewalld"
|
||||||
|
@ -14,15 +15,16 @@ echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
|
||||||
sysctl -p
|
sysctl -p
|
||||||
|
|
||||||
echo "Setup Repos"
|
echo "Setup Repos"
|
||||||
dnf install epel-release
|
dnf install epel-release -y
|
||||||
/usr/bin/crb enable
|
/usr/bin/crb enable
|
||||||
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
|
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
|
||||||
|
|
||||||
echo "Installing Required Packages from Repos"
|
echo "Installing Required Packages from Repos"
|
||||||
dnf install wget git systemd-networkd gh tcpdump nodejs dhcp-server unbound wireguard-tools
|
dnf install wget git systemd-networkd gh tcpdump nodejs dhcp-server unbound wireguard-tools tar -y
|
||||||
|
|
||||||
echo "Installing pnpm"
|
echo "Installing pnpm"
|
||||||
curl -fsSL https://get.pnpm.io/install.sh | sh -
|
curl -fsSL https://get.pnpm.io/install.sh | sh -
|
||||||
|
source /root/.bashrc
|
||||||
|
|
||||||
echo "Installing go"
|
echo "Installing go"
|
||||||
wget "https://go.dev/dl/go1.20.3.linux-amd64.tar.gz"
|
wget "https://go.dev/dl/go1.20.3.linux-amd64.tar.gz"
|
||||||
|
@ -34,7 +36,7 @@ source /etc/profile
|
||||||
|
|
||||||
echo "Installing code server"
|
echo "Installing code server"
|
||||||
curl -fsSL https://code-server.dev/install.sh | sh
|
curl -fsSL https://code-server.dev/install.sh | sh
|
||||||
mkdir /root/.config/code-server
|
mkdir -p /root/.config/code-server
|
||||||
cat <<EOT >> /root/.config/code-server/config.yaml
|
cat <<EOT >> /root/.config/code-server/config.yaml
|
||||||
bind-addr: 0.0.0.0:8081
|
bind-addr: 0.0.0.0:8081
|
||||||
auth: password
|
auth: password
|
||||||
|
@ -96,6 +98,8 @@ EOT
|
||||||
echo "reload systemd"
|
echo "reload systemd"
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
echo "Setup nfsense Config"
|
||||||
|
./nfsense --setup
|
||||||
|
|
||||||
echo "Setup networkd"
|
echo "Setup networkd"
|
||||||
systemctl disable NetworkManager
|
systemctl disable NetworkManager
|
||||||
|
@ -109,9 +113,6 @@ touch /etc/nftables/nfsense.conf
|
||||||
systemctl enable nftables
|
systemctl enable nftables
|
||||||
systemctl start nftables
|
systemctl start nftables
|
||||||
|
|
||||||
echo "Default nfsense config"
|
|
||||||
./nfsense -default
|
|
||||||
|
|
||||||
echo "Starting nfsense"
|
echo "Starting nfsense"
|
||||||
systemctl enable nfsense
|
systemctl enable nfsense
|
||||||
systemctl start nfsense
|
systemctl start nfsense
|
||||||
|
|
Loading…
Add table
Reference in a new issue