TeamTalk deployment details (skipping pits)

Keywords: git network vim Redis

I. Deployment environment

System: centos7 X64 bit (32 bit unsupported) core version

II. Deployment process

The download address of the project is https://github.com/mogujie/TeamTalk.git, which is a version of the project three years ago. Some of the scripts have 404 addresses, which is the source part of mariadb, and need to be modified when deploying. I modified it and uploaded it to my gitee code repository for your use.

cd /opt
git clone https://gitee.com/yiyefangzhou24/TeamTalk.git
cd TeamTalk
yum install -y git gcc gcc-c++ mysql-devel unzip zip
chmod +x ./server/src/make_protobuf.sh
chmod +x ./server/src/make_hiredis.sh
chmod +x ./server/src/make_mariadb.sh
chmod +x ./server/src/make_log4cxx.sh
chmod +x ./server/src/build.sh
cd ./server/src
./make_protobuf.sh
./make_hiredis.sh
./make_mariadb.sh
./make_log4cxx.sh
./build.sh version 1
cp ../im-server-1.tar.gz ../../auto_setup/im_server/
cd ../../
mv php tt
zip -q -r tt.zip tt
cp tt.zip ./auto_setup/im_web/
cd auto_setup
chmod +x setup.sh

By the end of the preparatory work, the directory should be in / opt/TeamTalk/auto_setup again. At this time, many pits need to be skipped. If some wrong information is copied over or wrong, please read the INSTALL.md file under the current directory carefully. There are three solutions, one kind of Intranet (if it is a single network card, direct static mode chain). Connected to the public network, you can also refer to this setup, 2 public network. Then enter the im_server/conf folder, where the file structure is roughly as follows:

[root@localhost auto_setup]# cd im_server/conf
[root@localhost conf]# ls -al
//Total dosage 32
drwxr-xr-x. 2 root root  191 9 Month 2716:45 .
drwxr-xr-x. 3 root root   60 9 Month 2717:13 ..
-rw-r--r--. 1 root root 1170 9 Month 2716:45 dbproxyserver.conf
-rw-r--r--. 1 root root  141 9 Month 2716:45 fileserver.conf
-rw-r--r--. 1 root root  237 9 Month 2716:45 httpmsgserver.conf
-rw-r--r--. 1 root root  311 9 Month 2716:45 loginserver.conf
-rw-r--r--. 1 root root  145 9 Month 2716:45 msfs.conf
-rw-r--r--. 1 root root  601 9 Month 2716:45 msgserver.conf
-rw-r--r--. 1 root root  158 9 Month 2716:45 pushserver.conf
-rw-r--r--. 1 root root   86 9 Month 2716:45 routeserver.conf

I need to modify the configuration file in turn according to the configuration template provided by INSTALL.md. For example (scheme 1, pure intranet, IP address: 192.168.131.142), such as modifying dbproxyserver.conf, using vim to modify it:

vim dbproxyserver.conf
ListenIP=192.168.131.142
ListenPort=10600
ThreadNum=48            # double the number of CPU core
MsfsSite=192.168.131.142

#configure for mysql
DBInstances=teamtalk_master,teamtalk_slave
#teamtalk_master
teamtalk_master_host=127.0.0.1
teamtalk_master_port=3306
teamtalk_master_dbname=teamtalk
teamtalk_master_username=root
teamtalk_master_password=12345
teamtalk_master_maxconncnt=16

#teamtalk_slave
teamtalk_slave_host=127.0.0.1
teamtalk_slave_port=3306
teamtalk_slave_dbname=teamtalk
teamtalk_slave_username=root
teamtalk_slave_password=12345
teamtalk_slave_maxconncnt=16


#configure for unread
CacheInstances=unread,group_set,token,sync,group_member
#redis of unread message counter
unread_host=127.0.0.1
unread_port=6379
unread_db=1
unread_maxconncnt=16

#Group setting redis
group_set_host=127.0.0.1
group_set_port=6379
group_set_db=2
group_set_maxconncnt=16

#Synchronous control
sync_host=127.0.0.1
sync_port=6379
sync_db=3
sync_maxconncnt=1

#deviceToken redis
token_host=127.0.0.1
token_port=6379
token_db=4
token_maxconncnt=16

#GroupMember
group_member_host=127.0.0.1
group_member_port=6379
group_member_db=5
group_member_maxconncnt=48

#AES key
aesKey=12345678901234567890123456789012

Modify the remaining configuration files in turn, return to the auto_setup directory after modification, and execute the automatic installation script

./setup.sh install

When you install automatically, you will choose to change the database password, which must be changed to 12345. If you need to modify, you need to modify the relevant configurations in dbproxyserver.conf and auto_setup/mariadb/setup.sh and auto_setup/im_web/conf/database.php at the same time. We use the default configuration here. After installation of the all-way return train, at this time access to the IP address (chrome is recommended), the user name and password are admin, first configure the organization, then configure the user, and then login with the client, which is not to be repeated.

Server restart/opt/TeamTalk/auto_setup//im_server/im-server-1/restart.sh

3. Other pits

1. Picture transmission

After configuring, you will find that you can't transfer pictures, and then re-enter the auto_setup folder.

cd ./im_server/im-server-1/msfs/
mkdir files    #Create files Folder
vim msfs.conf #Find and modify BaseDir=./files
../daeml msfs

 

Posted by pahikua on Fri, 10 May 2019 03:38:39 -0700