How to build

参考视频:​​https://www.bilibili.com/video/BV1gv411A7oA?spm_id_from=333.999.0.0​​​将代码下载并且安装编译。
git clone失败的话参考

  1. install cmake
  2. build libevent
git submodule add https://github.com/libevent/libevent deps/libevent
cd deps
cd libevent
git checkout release-2.1.12-stable
mkdir build
cd build
cmake .. -DEVENT__DISABLE_OPENSSL=ON
make -j
sudo make install
  1. build google test
git submodule add https://github.com/google/googletest deps/googletest
cd deps
cd googletest
mkdir build
cd build
cmake ..
make -j
sudo make install
  1. build jsoncpp
git submodule add https://github.com/open-source-parsers/jsoncpp.git deps/jsoncpp
cd deps
cd jsoncpp
mkdir build
cd build
cmake -DJSONCPP_WITH_TESTS=OFF -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF ..
make -j
sudo make install
  1. build miniob
cd `project home`
mkdir build
cd build
cmake ..
make -j

如果是debug版本的话
cmake ..改成-> cmake .. -DEBUG=ON

How to start

启动server流程

切换到:
obsb/build/bin
然后执行:
./observer -f ../../etc/observer.ini

登录client流程

切换到:
obsb/build/bin
然后执行:
./obclient

退出server流程

ps aux | grep ob
然后发现:
dyy 52471 0.0 0.0 818588 5168 pts/0 Sl+ 20:33 0:00 ./observer -f ../../etc/observer.ini
dyy 52751 0.0 0.0 11992 736 pts/1 S+ 20:39 0:00 grep --color=auto ob
直接 kill -9 52471