There was an error while loading. Please reload this page.
首先要安裝 go,版本至少要 1.11: install golang
sudo apt install build-essential golang libgrpc++-dev libgflags-dev protobuf-compiler-grpc
pttbbs.conf
#define HOTBOARDCACHE 128
ipcrm
sudo -iu bbsadm ## 或是你取的 bbs system user id ## 先 kill 掉相關程序 pkill mbbsd pkill shmctl #pkill 其它相關的.... ipcs ## 確認 shm, sem key ipcrm -M 0x000004cc ipcrm -S 0x000007da
需要在環境變數設定,可以寫在 .bashrc 裡面或是在編譯時再手動加上環境變數
sudo -iu webapp ## webapp user, 可以跟 bbs/nginx user 不同 export GO111MODULE=on export GOPATH=$HOME/go export PATH=${GOPATH}/bin:${PATH}
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
git clone https://github.com/ptt/pttweb.git
curl -L -o ../pr18.patch https://github.com/ptt/pttweb/pull/18/commits/3e79906808859ebd17e279b8c189a46a2f7821ef.patch git apply ../pr18.patch
按照 patch 過後的 README.md 指示安裝:
cd proto make cd .. go build
config.json
./pttweb -conf config.json