bbank Exchange Setup Tutorial, Spot Trading Tutorial
Tools needed for exchange K-line charts
******************************************java********************************************
Linux system java – jdk1.8 JAVA installation
https://www.cnblogs.com/wjup/p/11041274.html
I have already installed openjdk version 1.8.0_312
To check the installed version, enter:
java -version
Add the path to vi /etc/profile file:
JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME CLASSPATH PATH
Save and exit. In terminal, enter:
. /etc/profile
Java installation complete
******************************************elasticsearch installation********************
Elasticsearch installation:
https://www.cnblogs.com/socketqiang/p/11363024.html
First download:
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.6.0.tar.gz
After download completes, enter:
tar -zxvf elasticsearch-6.6.0.tar.gz
After decompression, rename the folder to the installation directory:
mv elasticsearch-6.6.0 elasticsearch
Then copy to:
/usr/local
Go to the config folder in the es installation directory and modify the elasticsearch.yml file:
#Configure es cluster name, default is elasticsearch, es will automatically discover es in the same network segment. If there are multiple clusters in the same network segment, this property can be used to distinguish different clusters.
cluster.name: my-es
#Node name
node.name: node-1
#Set index data storage path
path.data: /usr/local/elasticsearch/data
#Set log storage path
path.logs: /usr/local/elasticsearch/logs
#Set the IP address for external services. Nodes in the same network segment will join this cluster.
network.host: 0.0.0.0
#Set the external http port
http.port: 9200
#Set the initial list of master nodes in the cluster. New nodes joining the cluster can be discovered through these nodes.
discovery.zen.ping.unicast.hosts: [127.0.0.1, 10.10.10.34:9200]
Remember to create a data directory in the es root directory.
useradd es
passwd es (enter any password)
Directory permissions:
chown -R es:es /usr/local/elasticsearch
Permissions changed. All installations complete now.
Below are errors we need to handle together:
Add to vi /etc/security/limits.conf:
* soft nofile 65536
* hard nofile 131072
Also add to vi /etc/sysctl.conf:
vm.max_map_count=655360
Execute:
sysctl -p
Now let’s start it.
First go to the directory /usr/local/elasticsearch/bin
Open the terminal that comes with BT (Baota), enter:
su es
Startup command:
sh elasticsearch -d
Ports 9300 and 9200. If these don’t display normally, it means startup failed.
If there are errors, let’s handle them.
******************************************Open ports********************
Open ports:
Port: [9200]
Port: [3306]
Port: [1-9999]
Port: [888]
Port: [443]
Port: [2000-9200]
Port: [39000-40000]
Port: [20]
Port: [22]
Port: [21]
PM2 Manager
Official node.js manager, built-in node.js + npm + nvm + pm2.
socket.io 404
Change to domain plus port: :2130
php start.php start
cd /www/wwwroot/exchange4008.ex/public/vendor/webmsgsender
php start.php start
******************************************K-line*************************************
Task list
Curve 2 shell script – Daily at 1:30 AM
Execute:
cd /www/wwwroot/source_root_directory
php public/vendor/webmsgsender/start.php start -d
Curve 1 shell script – Daily at 1:30 AM
Execute:
cd /www/wwwroot/source_root_directory
php artisan websocket:client start
php7.2 installation extensions:
fileinfo
opcache
memcache
redis
imagemagick
imap
exif
intl
xsl
Disable functions: leave empty
Pseudo-static:
location / {
try_files $uri $uri/ /index.php$is_args$query_string;
}
Open ports:
Port: [9200]
Port: [3306]
Port: [1-9999]
Port: [888]
Port: [443]
Port: [2000-9200]
Port: [39000-40000]
Port: [20]
Port: [22]
Port: [21]
******************************************Baota scripts, adjust as needed***********************************
Baota scripts, adjust as needed, time self-adjust
1. php artisan get_kline_data_fivemin
cd /www/wwwroot/exchange4008.ex
php artisan get_kline_data_fivemin
2. php artisan get_kline_data_fifteenmin
cd /www/wwwroot/exchange4008.ex
php artisan get_kline_data_fifteenmin
3. php artisan get_kline_data_thirtymin
cd /www/wwwroot/exchange4008.ex
php artisan get_kline_data_thirtymin
4. php artisan get_kline_data_monthly
cd /www/wwwroot/exchange4008.ex
php artisan get_kline_data_monthly
5. php artisan get_kline_data_hourly
cd /www/wwwroot/exchange4008.ex
php artisan get_kline_data_hourly
6. php artisan get_kline_data_daily
cd /www/wwwroot/exchange4008.ex
php artisan get_kline_data_daily
7. php artisan get_kline_data_weekly
cd /www/wwwroot/exchange4008.ex
php artisan get_kline_data_weekly
8. php artisan auto_change start
cd /www/wwwroot/exchange4008.ex
php artisan auto_change start
9. php artisan queue:work
cd /www/wwwroot/exchange4008.ex
php artisan queue:work
10. php artisan schedule:run websocket-client
cd /www/wwwroot/exchange4008.ex
php artisan schedule:run websocket-client
11. php artisan websocket:client restart
cd /www/wwwroot/exchange4008.ex
php artisan websocket:client restart
12. php start.php start
cd /www/wwwroot/exchange4008.ex/public/vendor/webmsgsender
php start.php start
13. Renew Let’s Encrypt certificate
/www/server/panel/pyenv/bin/python -u /www/server/panel/class/acme_v2.py –renew=1
-
Alipay QR Code Scan
-
WeChat Scan Pay