-
Notifications
You must be signed in to change notification settings - Fork 9
/
update_xdp-acl.sh
52 lines (34 loc) · 1.15 KB
/
update_xdp-acl.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -e
# set -ex
echo "will update 🍏"
yes | cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
systemctl stop firewalld && systemctl disable firewalld
sleep 1s
echo "dnf update begin 🍎 It will take some time here, please be patient..."
mkdir -p /root/workspace/golang/src
echo -e "\n" >> /root/.bashrc
echo "export GOPROXY=https://goproxy.cn" >> /root/.bashrc
echo -e "\n" >> /root/.bashrc
echo "export GOPATH=~/workspace/golang" >> /root/.bashrc
echo "export GOBIN=$GOPATH/bin/" >> /root/.bashrc
echo "export PATH=$GOBIN:$PATH" >> /root/.bashrc
echo -e "\n" >> /root/.bashrc
source /root/.bashrc
dnf install golang -y -q
echo "🍊 golang version:" && go version
# dnf module install nodejs:16/default -y -q
# echo "🍊 node version:" && node -v
sleep 1s
dnf install clang -y -q
dnf install llvm -y -q
dnf install elfutils-libelf-devel -y -q
dnf install libpcap-devel -y -q
dnf install perf -y -q
dnf install kernel-headers -y -q
dnf install bpftool -y -q
# dnf install netsniff-ng -y -q
sleep 1s
dnf clean all -y
cd /root/workspace/golang/src && git clone https://github.com/glennWang/xdp_acl.git
echo "dnf update complete 😃"