服務器系統CentOS 7.6 安裝寶塔 (請勿用官方寶塔)
破解版寶塔:https://www.hostcli.com/
nginx php7.2 mysql5.7 安裝php擴展 fileinfo opcache redis imagemagick imap intl xsl Swoole4並且禁用所有函數
上傳文件 導入數據庫文件
修改根目錄.evn 數據庫連接 IP地址
修改bootstrap/cache/config.php 數據庫地址 IP地址 網站目錄地址
設置網站運行目錄public 僞靜態 laravel5
nginx站點配置反向代理
location ~/(wss|socket.io) {
# 此處改爲 socket.io 後端的 ip 和端⼝即可
proxy_pass http://127.0.0.1:2000;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
放行所有端口
安裝es 網站根目錄運行終端命令執行下列命令
1.
yum install java -y
2.
----------------------------es--------------------------
安裝es
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
vi /etc/yum.repos.d/elasticsearch.repo
3.插入下面代碼
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
shift+: 輸入wq回車保存
5.
yum install elasticsearch
6.啓動
service elasticsearch start
------------------------------------------------------
安裝python3和擴展
yum install python3 -y
pip3 install websocket-client redis
php artisan config:cache
------------------------------------------------------
計劃任務添加腳本 然後執行
k線依賴
webmsgsender
cd /www/wwwroot/bb/public/vendor/webmsgsender
php start.php restart -d
php start.php stop
cd /www/wwwroot/bb/public/vendor/webmsgsender/python
python3
killall python3
cd /www/wwwroot/xxxxx/python
cd /usr/bin
python3 main.py
websocket
cd /www/wwwroot/bb
php artisan websocket:client restart
主要添加執行上面三個,下面看交易所功能在執行適合腳本
schedule
cd /www/wwwroot/xxxx
php artisan schedule:run
queue
cd /www/wwwroot/xxxx
php artisan queue:work
auto_change
cd /www/wwwroot/xxxx
php artisan auto_change start
平臺幣依賴
get_kline_data_weekly
cd /www/wwwroot/xxxx
php artisan get_kline_data_weekly
get_kline_data_daily
cd /www/wwwroot/xxxx
php artisan get_kline_data_daily
get_kline_data_hourly
cd /www/wwwroot/xxxx
php artisan get_kline_data_hourly
get_kline_data_monthly
cd /www/wwwroot/xxxx
php artisan get_kline_data_monthly
get_kline_data_thirtymin
cd /www/wwwroot/xxxx
php artisan get_kline_data_thirtymin
get_kline_data_fifteenmin
cd /www/wwwroot/xxxx
php artisan get_kline_data_fifteenmin
get_kline_data_fivemin
cd /www/wwwroot/xxxx
php artisan get_kline_data_fivemin
機器人
robot
cd /www/wwwroot/xxxx
php artisan robot 2
delete from users_wallet where currency not in (select id from currency)
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'currency_name' in 'field list' (SQL: update `auto_robot` set `currency_name` = TBPL, `legal_name` = USDT where `id` = 33)|||66
參考鏈接
https://www.weixiaolive.com/post/530.html