# X86 架构安装教程

{% hint style="success" %}
高收益攻略：

1. 新上机的节点有3-7天部署期，请耐心等待，之后收益将逐渐稳定。
2. 请保持设备24小时在线，尤其是晚高峰（18:00-24:00）时段。
3. 请确保节点的Agent状态和服务状态均为正常，若出现异常请及时联系客服。

[<mark style="color:blue;">→点击查看更多攻略</mark>](https://titannet.gitbook.io/titan-network-cn/4-ce-jia-li-le-ce-shi-wang/chang-jian-wen-ti/xin-jie-dian-shang-ji-gong-le-cong-cheng-gong-yun-xing-dao-shou-yi-ti-sheng)
{% endhint %}

## 环境准备

#### 系统要求

* 支持的操作系统：Ubuntu、Debian、Fedora、CentOS/RHEL
* 硬件架构：X86/X64
* 最小配置要求：
  * CPU：2核心
  * 内存：4GB
  * 硬盘：50GB可用空间

## 第一步：Multipass安装步骤

### 1.检查系统是否已安装 Snap

首先，确保你的 Linux 系统已安装 Snap。大部分现代 Linux 发行版（如 Ubuntu、Debian、Fedora 等）都默认支持 Snap。打开终端(按 Ctrl + Alt + T),输入:

```
snap --version
```

* 如果显示版本信息,说明已安装,可以直接跳到[第3步](#id-3.-an-zhuang-multipass)
* 如果提示命令未找到,例如 "`command not found`" 需要先安装 Snap

### 2.安装 Snap

根据您的操作系统，执行对应的命令：

{% tabs %}
{% tab title="Ubuntu/Debian " %}

```bash
sudo apt update && sudo apt install snapd
```

{% endtab %}

{% tab title="Fedora " %}

```bash
sudo dnf install snapd
```

{% endtab %}

{% tab title="CentOS/RHEL " %}

```bash
sudo yum install snapd
```

{% endtab %}
{% endtabs %}

**安装后启用 Snap:**

```bash
sudo systemctl enable --now snapd.socket
```

<br>

### 3.安装 Multipass

```bash
sudo snap install multipass
```

* 等待安装完成即可

<br>

### 4.验证安装

```bash
multipass --version
```

* 看到版本号就代表安装成功啦!

> #### 遇到问题?
>
> * 命令不能用? 试试在前面加 `sudo`
> * 下载很慢? 检查网络后重试
> * 安装中断? 重新运行命令即可

<br>

## 第二步：安装和运行 Titan Agent

### 1.下载并解压安装包

```bash
# 下载安装包
wget https://pcdn.titannet.io/test4/bin/agent-linux.zip


# 创建安装目录
mkdir -p /opt/titanagent

# 解压安装包
unzip agent-linux.zip -d /opt/titanagent
```

<br>

### 2.获取Key

1. 打开浏览器访问：

{% embed url="<https://test4.titannet.io>" %}

2. 登录您的Titan钱包账户
3. 找到并复制您的密钥（Key）

<figure><img src="https://3822791205-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrZQtAKIIsvAQP0E9RumD%2Fuploads%2FOUd7mpGJG2sBXns1UIEC%2Fimage.png?alt=media&#x26;token=470f4ff5-38d3-4422-a2b5-2a3802a6f80c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3822791205-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrZQtAKIIsvAQP0E9RumD%2Fuploads%2FPeRccf0C0ujPkYTGBxft%2Fimage.png?alt=media&#x26;token=b95a117d-2fee-47e9-b60e-88a125f5b61f" alt=""><figcaption></figcaption></figure>

### 3.运行程序

{% code overflow="wrap" %}

```bash
cd /opt/titanagent

# 运行 Agent 
./agent --working-dir=您的titan-agent文件夹路径 --server-url=https://test4-api.titannet.io --key=您的密钥
```

{% endcode %}

* 将"您的titan-agent文件夹路径"替换为实际的文件夹位置
* 将"您的密钥"替换为之前复制的密钥

<br>

#### 常见问题

* 下载失败? 检查网络连接
* 解压报错? 确保已安装 unzip: `apt install unzip` 或 `yum install unzip`
* 权限不够? 使用 sudo 运行命令
* 程序无法运行? 添加执行权限: `chmod +x agent`

#### 提示

* 建议将程序设置为系统服务,开机自启动


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://titannet.gitbook.io/titan-network-cn/4-ce-jia-li-le-ce-shi-wang/titan-agent-an-zhuang-jiao-cheng/linux-xi-tong/x86-jia-gou-an-zhuang-jiao-cheng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
