File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 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
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 \
You can’t perform that action at this time.
0 commit comments