Skip to content

Commit 18a9851

Browse files
authored
Create install.sh
1 parent 223dbb5 commit 18a9851

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Nethogs-Json/install.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
if command -v apt-get >/dev/null; then
4+
apt update -y
5+
apt-get install build-essential libncurses5-dev libpcap-dev make zip unzip wget -y
6+
elif command -v yum >/dev/null; then
7+
yum update -y
8+
yum install gcc-c++ libpcap-devel.x86_64 libpcap.x86_64 "ncurses*"
9+
fi
10+
sudo wget -O /root/nethogs.zip https://-------
11+
unzip /root/nethogs.zip
12+
mv -f /root/Nethogs-Json-main /root/nethogs
13+
cd /root/nethogs/
14+
chmod 744 /root/nethogs/determineVersion.sh
15+
sudo make install
16+
hash -r
17+
cp /usr/local/sbin/nethogs /usr/sbin/nethogs -f
18+
rm -fr /root/nethogs /root/nethogs.zip
19+
sudo setcap "cap_net_admin,cap_net_raw,cap_dac_read_search,cap_sys_ptrace+pe" /usr/local/sbin/nethogs

0 commit comments

Comments
 (0)