### 软件安装
* 安装依赖:
```
sudo apt update
sudo apt -y install git build-essential libssl-dev automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libgmp-dev
```
* 安装 ethminer:
```
git clone https://github.com/ethereum-mining/ethminer.git
cd ethminer
./configure
make
```
## 配置挖矿
### 创建配置文件
```
cd ~/.config
mkdir minergate
cd minergate
nano config.json
```
在 config.json 文件中添加以下内容:
```json
{
"clients": [
{
"type": "eth",
"pool": "pool.minexmr.com:443",
"user": "YOUR_WALLET_ADDRESS",
"pass": "x"
}
]
}
```
将 YOUR_WALLET_ADDRESS 替换为你的以太坊钱包地址。
### 启动挖矿
```
ethminer --config ~/.config/minergate/config.json
```
## Ubuntu系统显卡挖矿
### 安装驱动
首先,更新软件仓库:
```
sudo apt update
```
然后安装必要的依赖:
```
sudo apt -y install linux-headers-$(uname -r)
```
对于 NVIDIA 显卡:
```
sudo apt -y install nvidia-driver-510
```
对于 AMD 显卡:
```
sudo apt -y install mesa-vulkan-drivers vulkan-utils
```
### 配置显卡挖矿
```
sudo nano /etc/default/grub
```
在文件末尾添加以下内容:
```
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset amdgpu.dc=0"
```
对于 NVIDIA 显卡,将 `amdgpu.dc=0` 替换为 `nvidia-drm.modeset=1`。
更新 Grub 配置:
```
sudo update-grub
```
重新启动系统:
```
sudo reboot
```
安装挖矿软件:
```
git clone https://github.com/lolliedieb/lolMiner.git
cd lolMiner
./configure
make
```
运行挖矿软件:
```
./lolMiner --pool eth.2miners.com:443 --user YOUR_WALLET_ADDRESS
```
将 YOUR_WALLET_ADDRESS 替换为你的以太坊钱包地址。