先用yum安装MySQL,见我另一篇文章:https://www.jianshu.com/p/cbb5d7c2b9d2
并补充安装:sudo yum -y install mysql-community-devel
Tars官网:https://github.com/TarsCloud/Tars/tree/master/deploy
Step:
1.install mysql on your machine, and change the db infomation in comm.properties.
2.use this script to checkout the code
cd /data
git clone https://github.com/TarsCloud/Tars.git --recursive
cd /data/Tars/deploy
python ./deploy.py all
Attention:
1.support with python 2.7
2.network unobstructed
3.you had installed :gcc,gcc-c++,cmake,yasm,glibc-devel,flex,bison,ncurses-devel,zlib-devel,autoconf ,if not ,we will install it ,but It's possible to fail.
4.Tars uses /usr/local/mysql/ as default path. If yours is not this, please modify the file CMakeLists.txt(framework/tarscpp/CMakeLists.txt, framework/CMakeLists.txt) before compile.
修改配置文件:
set(MYSQL_DIR_INC "/usr/include/mysql")
#set(MYSQL_DIR_INC "/usr/local/mysql/include")
#set(MYSQL_DIR_LIB "/usr/local/mysql/lib")
set(MYSQL_DIR_LIB "/usr/lib64/mysql")

执行安装指令:python ./deploy.py all(最讨厌的事出来了,如下图)

为什么说很讨厌呢?因为没有使用包管理机制,接下来还有很多未知的事。
接下来,我们做一些准备工作
- 先安装扩展源EPEL:是由 Fedora 社区打造,可提供高质量软件包的项目。
- sudo yum -y install epel-release
- 然后再安装,并升级pip:
- sudo yum -y install python-pip
- pip install --upgrade pip
跟据前面的提示:进行如下操作,并再次执行:python ./deploy.py all
- pip install requests
接下来报错如下:

执行指令:vim /data/Tars/deploy/comm/tarsUtil.py,修改指定行return getIpAddress("eth0"),eth0改为ens33
再次执行安装指令:报错如下:

修改数据库root密码为:tars12345
再次执行安装指令,安装成功!(似乎网站无法访问)

网友评论