Skip to content

Commit c441154

Browse files
committed
-
1 parent 667a202 commit c441154

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

kb/tars小白安装必成手册.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@
5151
systemctl enable docker
5252
systemctl start docker
5353

54-
# 设置环境变量(这里的 IP 地址是 CentOS 7 系统分配到的 IP,【请根据实际情况修改】)
54+
# 设置环境变量(这里的 IP 地址和网卡名称是 CentOS 7 系统中的实际值,【请根据实际情况修改】)
5555
export MY_TARS_IP=192.168.1.140
5656
export MY_MYSQL_IP=192.168.1.140
5757
export MY_MYSQL_ROOT_PASSWORD=password
58+
export MY_NIC_NAME=enp0s3
5859

5960
注:如果喜欢用 docker 方式运行 tars 框架,可以从这里直接跳到 [基于 docker 运行 tars 框架](#docker-tars)
6061

@@ -135,9 +136,9 @@
135136
官方文档:[快速部署](https://github.com/TarsCloud/Tars/tree/master/deploy)
136137

137138
# 调整网卡名相关的文件内容
138-
# 【坑】tars 源代码预期网卡名为 eth0,本系统环境中实际网卡名为 enp0s3。【请根据实际情况修改】
139+
# 【坑】tars 源代码预期网卡名为 eth0,与本系统环境的实际情况不符,需调整。
139140
cd /data/Tars/deploy
140-
sed -i "s/eth0/enp0s3/g" comm/tarsUtil.py
141+
sed -i "s/eth0/${MY_NIC_NAME}/g" comm/tarsUtil.py
141142

142143
# 【坑】调整数据库密码相关的文件内容
143144
sed -i "s/tars12345/${MY_MYSQL_ROOT_PASSWORD}/g" comm.properties
@@ -359,7 +360,7 @@ tarsnotify 并没有安装部署。但坑的是,tarsnotify 的部署信息已
359360

360361
docker run --name tars --detach \
361362
--net=host \
362-
-e INET_NAME=enp0s3 \
363+
-e INET_NAME=${MY_NIC_NAME} \
363364
-e DBIP=${MY_MYSQL_IP} \
364365
-e DBPort=3306 \
365366
-e DBUser=root \

0 commit comments

Comments
 (0)