feat: build env for go proxy
This commit is contained in:
@@ -12,7 +12,7 @@ ocs_bin_file=agtocs
|
|||||||
|
|
||||||
src_restproxy_root=../../selfcare
|
src_restproxy_root=../../selfcare
|
||||||
src_cproxy_dir=$src_restproxy_root/proxy_c
|
src_cproxy_dir=$src_restproxy_root/proxy_c
|
||||||
src_goproxy_dir=$src_restproxy_root/proxy_go
|
src_goproxy_dir=$src_restproxy_root/proxy
|
||||||
proxy_bin_dir=$src_restproxy_root/bin
|
proxy_bin_dir=$src_restproxy_root/bin
|
||||||
cproxy_bin_file=restproxy
|
cproxy_bin_file=restproxy
|
||||||
goproxy_bin_file=restproxy_go
|
goproxy_bin_file=restproxy_go
|
||||||
|
|||||||
41
bin/env.sh
Normal file
41
bin/env.sh
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install make gcc g++ cmake -y
|
||||||
|
sudo apt install libgnutls28-dev
|
||||||
|
sudo apt install libglib2.0-dev
|
||||||
|
sudo apt install libgcrypt20-dev
|
||||||
|
sudo apt install libsctp-dev
|
||||||
|
sudo apt install libidn-dev
|
||||||
|
sudo apt install libhiredis-dev
|
||||||
|
|
||||||
|
# Install Go
|
||||||
|
wget https://dl.google.com/go/go1.24.0.linux-amd64.tar.gz
|
||||||
|
sudo tar -C /usr/local -xzf go1.24.0.linux-amd64.tar.gz
|
||||||
|
|
||||||
|
# add go to path
|
||||||
|
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc
|
||||||
|
echo "export GOPATH=$HOME/go" >> ~/.bashrc
|
||||||
|
echo "export PATH=$PATH:$GOPATH/bin" >> ~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
cd ocs.git/selfcare/proxy
|
||||||
|
go mod init proxy
|
||||||
|
go mod tidy
|
||||||
|
go get github.com/sirupsen/logrus
|
||||||
|
go get github.com/go-sql-driver/mysql
|
||||||
|
go get github.com/go-redis/redis/v8
|
||||||
|
go get github.com/antonfisher/nested-logrus-formatter
|
||||||
|
go get github.com/gin-gonic/gin
|
||||||
|
go get proxy/config
|
||||||
|
go get github.com/reiver/go-oi
|
||||||
|
go get github.com/reiver/go-telnet
|
||||||
|
go get github.com/reiver/go-telnet/telsh
|
||||||
|
go get github.com/go-mysql-org/go-mysql/canal
|
||||||
|
go get github.com/go-mysql-org/go-mysql/mysql
|
||||||
|
go get github.com/go-mysql-org/go-mysql/replication
|
||||||
|
go get github.com/golang/protobuf/proto
|
||||||
|
go get github.com/withlin/canal-go/client
|
||||||
|
go get github.com/withlin/canal-go/protocol/entry
|
||||||
|
go get github.com/robfig/cron
|
||||||
|
go get github.com/ircop/tclient
|
||||||
Reference in New Issue
Block a user