配置 Host-Only 静态 IP 地址
- 添加静态 IP 地址(/etc/network/interfaces)
sudo vim /etc/network/interfaces
auto enp0s8
iface enp0s8 inet static
address 192.168.99.108
netmask 255.255.255.0
- 重启网络服务
service networking restart
配置 apt 包管理器代理访问
- 添加代理 IP 地址
sudo vim /etc/apt/apt.conf
Acquire::http::Proxy "http://192.168.99.1:5859/";
Acquire::https::Proxy "http://192.168.99.1:5859/";
安装 Homebrew 包管理器
- 安装依赖软件
sudo apt-get install build-essential procps curl file git
- 配置 git 用户信息
git config --global user.name "username"
git config --global user.email useremail@qq.com
- 配置 git 代理访问
git config --global http.proxy 'socks5://192.168.99.1:5183'
git config --global https.proxy 'socks5://192.168.99.1:5183'
- 配置 curl 代理访问
echo -e "socks5 = \"192.168.99.1:5183\"" > ~/.curlrc
- 下载安装 Homebrew
git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew
- 创建软链接
mkdir ~/.linuxbrew/bin
ln -s ~/.linuxbrew/Homebrew/bin/brew ~/.linuxbrew/bin
- 启用 Homebrew
vim ~/.profile
eval $(~/.linuxbrew/bin/brew shellenv)
source ~/.profile
- 配置本地域名解析(raw.githubusercontent.com)
域名解析 IP 查询:https://www.ipaddress.com/
sudo vim /etc/hosts
185.199.108.133 raw.githubusercontent.com
- 修改打开文件数量限制
sudo vim /etc/security/limits.conf
yongkj hard nofile 65535
yongkj soft nofile 65535
需关闭终端再重新打开
使用 Homebrew
- 编译安装最新版 aira2
brew install aria2