Skip to content

Commit 12e8f23

Browse files
committed
增加Fedora安装配置
1 parent 9536e7f commit 12e8f23

File tree

3 files changed

+264
-54
lines changed

3 files changed

+264
-54
lines changed

Linux-arm64.md

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ if [ "$OS_VERSION" != "noble" ]; then
3535
exit 1
3636
fi
3737

38-
echo "$(whoami) ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/$(whoami)
39-
visudo -cf /etc/sudoers.d/$(whoami)
38+
echo "$(whoami) ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/$(whoami)
39+
sudo visudo -cf /etc/sudoers.d/$(whoami)
4040

4141
# Update apt sources list based on architecture
4242
if [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "i686" ] || [ "$ARCH" = "x86" ]; then
@@ -141,7 +141,7 @@ sudo apt update && sudo apt upgrade -y
141141

142142
```bash
143143
sudo apt update && sudo apt install -y snapd git git-lfs curl wget axel unzip zip build-essential cmake \
144-
python3 python3-pip libpython3-dev openjdk-21-jdk upx flex bison make tree net-tools \
144+
python3 python3-pip libpython3-dev openjdk-21-jdk upx bison make tree net-tools \
145145
ninja-build meson pkg-config libtool autoconf automake help2man llvm lua5.4 ruby vim \
146146
graphviz grep plantuml aria2 bash bash-completion bc binutils imagemagick brotli \
147147
jq repo reprepro quickjs coreutils libarchive-dev scrcpy httpie lz4 shared-mime-info dbus lzip \
@@ -187,10 +187,10 @@ Signed-By: /usr/share/keyrings/microsoft.gpg
187187
' | sudo tee -a /etc/apt/sources.list.d/vscode.sources
188188
sudo apt update && sudo apt install code -y
189189

190-
wget https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v2.3.2/Clash.Verge_2.3.2_arm64.deb
190+
wget https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v2.4.1/Clash.Verge_2.4.1_arm64.deb
191191
sudo dpkg -i ./Clash.Verge_*.deb
192192

193-
wget https://dldir1v6.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.18_250724_arm64_01.AppImage # https://im.qq.com/linuxqq/index.shtml
193+
wget https://dldir1v6.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.19_250904_arm64_01.AppImage # https://im.qq.com/linuxqq/index.shtml
194194
wget https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_arm64.AppImage # https://linux.weixin.qq.com/
195195

196196
chmod a+x *.AppImage
@@ -201,7 +201,9 @@ chmod a+x *.AppImage
201201
```bash
202202
sudo usermod -aG docker $USER
203203
newgrp docker
204+
sudo mkdir -p /etc/docker
204205
sudo vim /etc/docker/daemon.json
206+
205207
{
206208
"registry-mirrors": [
207209
"https://docker.1ms.run",
@@ -229,44 +231,14 @@ pip3 install --upgrade pip
229231

230232
## 开发环境配置
231233

232-
支持snapd安装方式与手动安装方式。
233-
234-
### 手动配置安装
235-
236-
下载地址:[https://developer.android.com/?hl=zh-cn](https://developer.android.com/?hl=zh-cn)
237-
238-
```bash
239-
wget https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2025.1.2.12/android-studio-2025.1.2.12-linux.tar.gz
240-
sudo tar -xvzf android-studio-*.tar.gz -C /opt/
241-
/opt/android-studio/bin/studio.sh
242-
```
243-
244-
接下来安装,Android SDK和NDK。可以在Android Studio手动安装或者命令行安装。
245-
246-
```bash
247-
mkdir -p $HOME/Android/Sdk
248-
wget https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip -O cmdline-tools.zip
249-
unzip cmdline-tools.zip -d $HOME/Android/Sdk
250-
mv $HOME/Android/sdk/cmdline-tools $HOME/Android/Sdk/cmdline-tools-latest
251-
mkdir -p $HOME/Android/Sdk/cmdline-tools
252-
mv $HOME/Android/sdk/cmdline-tools-latest $HOME/Android/Sdk/cmdline-tools/latest
253-
```
254-
255-
### 自动配置安装
256-
257-
```bash
258-
sudo snap install android-studio --classic
259-
```
260-
261234
### Java配置
262235

263236
选择Java版本。
264237

265-
```
238+
```bash
266239
sudo update-alternatives --config java
267240
```
268241

269-
270242
### 环境变量配置
271243

272244
添加环境变量到 `~/.bashrc`
@@ -294,7 +266,6 @@ export PATH=$PATH:$ANDROID_HOME/emulator
294266
source ~/.bashrc
295267
```
296268

297-
298269
## 逆向分析工具
299270

300271
### 反编译和调试工具
@@ -310,7 +281,7 @@ pip3 install frida-tools --break-system-packages
310281
- Ghidra 安装:
311282

312283
```bash
313-
wget https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.4.1_build/ghidra_11.4.1_PUBLIC_20250731.zip
284+
wget https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.4.2_build/ghidra_11.4.2_PUBLIC_20250826.zip
314285
unzip ghidra_*.zip -d $HOME/tools
315286
```
316287

@@ -330,7 +301,6 @@ gh auth login
330301

331302
参考[macOS的vscode配置](https://github.com/feicong/re-docs/blob/master/macOS.md#vscode%E9%85%8D%E7%BD%AE)
332303

333-
334304
### golang
335305

336306
```bash
@@ -342,8 +312,8 @@ go env -w GOPROXY=https://goproxy.cn,direct
342312
设置pip的mirror。
343313

344314
```bash
345-
pip install -U pip --break-system-packages
346315
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
316+
pip install -U pip --break-system-packages
347317
```
348318

349319
### npm

Linux-fedora-arm64.md

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
# 安全研究员的Linux配置完全指南
2+
3+
文档最新更新请访问:[https://github.com/feicong/re-docs/edit/master/Linux-fedora-arm64.md](https://github.com/feicong/re-docs/edit/master/Linux-fedora-arm64.md)
4+
5+
## 选择合适的Linux发行版
6+
7+
这里选择的是asahi的Fedora 42 Linux。
8+
9+
```bash
10+
uname -a
11+
Linux fedora 6.14.2-401.asahi.fc42.aarch64+16k #1 SMP PREEMPT_DYNAMIC Wed Apr 16 12:06:15 UTC 2025 aarch64 GNU/Linux
12+
cat /proc/version
13+
Linux version 6.14.2-401.asahi.fc42.aarch64+16k (mockbuild@844819db4c624c04819b557088679991) (gcc (GCC) 15.0.1 20250329 (Red Hat 15.0.1-0), GNU ld version 2.44-3.fc42) #1 SMP PREEMPT_DYNAMIC Wed Apr 16 12:06:15 UTC 2025
14+
```
15+
16+
## 基础环境配置
17+
18+
首先配置系统的密码免输入与dnf源加速,参考:https://mirrors.tuna.tsinghua.edu.cn/help/fedora/
19+
20+
```bash
21+
ARCH="$(uname -m)"
22+
23+
# 检查当前系统版本是否为 noble
24+
OS_VERSION=$(lsb_release -cs)
25+
if [ "$OS_VERSION" != "adams" ]; then
26+
echo "This script is designed for Fedora adams. Exiting."
27+
exit 1
28+
fi
29+
30+
echo "$(whoami) ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/$(whoami)
31+
sudo visudo -cf /etc/sudoers.d/$(whoami)
32+
33+
sudo sed -e 's|^metalink=|#metalink=|g' \
34+
-e 's|^#baseurl=http://download.example/pub/fedora/linux|baseurl=https://mirrors.tuna.tsinghua.edu.cn/fedora|g' \
35+
-i.bak \
36+
/etc/yum.repos.d/fedora.repo \
37+
/etc/yum.repos.d/fedora-updates.repo
38+
sudo dnf makecache
39+
```
40+
41+
### 更新系统
42+
43+
```bash
44+
sudo dnf check-update
45+
```
46+
47+
### 安装必备工具
48+
49+
```bash
50+
sudo dnf install curl wget make upx vim openssl adb fastboot gh git git-lfs cmake python3 python3-pip \
51+
flex bison make tree net-tools ninja-build meson pkg-config libtool autoconf automake help2man llvm \
52+
grep plantuml aria2 bash bash-completion bc binutils brotli jq repo reprepro coreutils httpie lz4 \
53+
shared-mime-info dbus lzip ffmpeg file flac tcpdump fontconfig texinfo gawk ca-certificates gettext \
54+
unifdef sed gnupg gperf z3 zstd p7zip binwalk maven lsb-release patchelf gcc gdb tzdata socat \
55+
ltrace strace gnome-tweaks net-tools openssh-server dnsutils pahole protobuf node go just docker \
56+
wireshark qemu bridge-utils qemu-kvm libzip fzf htop java-21-openjdk -y
57+
```
58+
59+
手动安装下面的工具:
60+
61+
```bash
62+
# https://code.visualstudio.com/docs/setup/linux
63+
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
64+
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\nautorefresh=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null
65+
sudo dnf update && sudo dnf install code -y
66+
67+
wget https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v2.4.1/Clash.Verge-2.4.1-1.aarch64.rpm
68+
sudo dnf install ./Clash.Verge-*.rpm -y
69+
70+
wget https://dldir1v6.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.19_250904_aarch64_01.rpm # https://im.qq.com/linuxqq/index.shtml
71+
sudo dnf install ./QQ_*.rpm -y
72+
73+
wget https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_arm64.rpm # https://linux.weixin.qq.com/
74+
sudo dnf install ./WeChatLinux_*.rpm -y
75+
```
76+
77+
### 配置docker
78+
79+
```bash
80+
sudo usermod -aG docker $USER
81+
newgrp docker
82+
sudo mkdir -p /etc/docker
83+
sudo vim /etc/docker/daemon.json
84+
85+
{
86+
"registry-mirrors": [
87+
"https://docker.1ms.run",
88+
"https://docker.xuanyuan.me",
89+
"https://dockerhub.timeweb.cloud",
90+
"http://mirrors.ustc.edu.cn/",
91+
"http://mirror.azure.cn/",
92+
"https://docker.m.daocloud.io"
93+
]
94+
}
95+
```
96+
97+
运行测试
98+
99+
```bash
100+
sudo systemctl restart docker
101+
docker pull ubuntu:24.04
102+
```
103+
104+
### 设置Python环境
105+
106+
```bash
107+
pip3 install --upgrade pip
108+
```
109+
110+
## 开发环境配置
111+
112+
### Java配置
113+
114+
选择Java版本。
115+
116+
```bash
117+
sudo alternatives --config java
118+
```
119+
120+
### 环境变量配置
121+
122+
添加环境变量到 `~/.bashrc`
123+
124+
```bash
125+
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
126+
export PATH=$PATH:$JAVA_HOME/bin
127+
```
128+
129+
生效:
130+
131+
```bash
132+
source ~/.bashrc
133+
```
134+
135+
## 逆向分析工具
136+
137+
### 反编译和调试工具
138+
139+
```bash
140+
pip3 install frida-tools --break-system-packages
141+
```
142+
143+
### IDA Pro / Ghidra
144+
145+
- 下载并安装 **Ghidra**(开源)
146+
147+
- Ghidra 安装:
148+
149+
```bash
150+
wget https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.4.2_build/ghidra_11.4.2_PUBLIC_20250826.zip
151+
unzip ghidra_*.zip -d $HOME/tools
152+
```
153+
154+
## 配置
155+
156+
一些软件需要配置登陆与设置代理。
157+
158+
### gh
159+
160+
这个是github官方的命令行工具,管理仓库贼方便。登陆后就可以使用了。
161+
162+
```bash
163+
gh auth login
164+
```
165+
166+
### vscode配置
167+
168+
参考[macOS的vscode配置](https://github.com/feicong/re-docs/blob/master/macOS.md#vscode%E9%85%8D%E7%BD%AE)
169+
170+
### golang
171+
172+
```bash
173+
go env -w GOPROXY=https://goproxy.cn,direct
174+
```
175+
176+
### pip
177+
178+
设置pip的mirror。
179+
180+
```bash
181+
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
182+
pip install -U pip --break-system-packages
183+
```
184+
185+
### npm
186+
187+
设置npm的mirror。
188+
189+
```bash
190+
mkdir ~/.npm-global
191+
npm config set prefix '~/.npm-global'
192+
npm config set registry https://registry.npmmirror.com
193+
```
194+
195+
安装一些js工具。
196+
197+
```bash
198+
npm install -g @anthropic-ai/claude-code @google/gemini-cli typescript
199+
```
200+
201+
### maven
202+
203+
```bash
204+
mkdir -p ~/.m2
205+
206+
echo '<?xml version="1.0" encoding="UTF-8"?>
207+
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="settings.xsd">
208+
<mirrors>
209+
<mirror>
210+
<id>aliyunmaven</id>
211+
<mirrorOf>*</mirrorOf>
212+
<name>阿里云公共仓库</name>
213+
<url>https://maven.aliyun.com/repository/public</url>
214+
</mirror>
215+
216+
<mirror>
217+
<id>huaweicloud</id>
218+
<mirrorOf>*</mirrorOf>
219+
<url>https://repo.huaweicloud.com/repository/maven/</url>
220+
</mirror>
221+
222+
<mirror>
223+
<id>nexus-163</id>
224+
<mirrorOf>*</mirrorOf>
225+
<name>Nexus 163</name>
226+
<url>http://mirrors.163.com/maven/repository/maven-public/</url>
227+
</mirror>
228+
229+
<mirror>
230+
<id>nexus-tencentyun</id>
231+
<mirrorOf>*</mirrorOf>
232+
<name>Nexus tencentyun</name>
233+
<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
234+
</mirror>
235+
</mirrors>
236+
</settings>' > ~/.m2/settings.xml
237+
```
238+
239+
maven项目中,执行`mvn install`命令即可看到效果。

0 commit comments

Comments
 (0)