安装
yum install git -y
git --version
安装完成,其目录在/usr/libexec/git-core
git下载源码编译并安装
这里以安装 arp-scan
为例
- 获取最新源码
git clone https://github.com/royhills/arp-scan.git
- 运行
cd arp-scan
进入源码目录 - 运行
autoreconf --install
以生成可行的 ./configure
文件 - 运行
./configure
为您的系统生成一个 makefile - 运行
make
以构建项目 - 可选择运行
make check
以验证一切是否按预期工作 - 运行
make install
安装(你需要是 root 或使用 sudo/doas 这部分)