项目地址:https://github.com/zhongluqiang/sylar-from-scratch
C++服务器框架,包括日志模块,配置模块,线程模块,协程模块,协程调度模块,IO协程调度模块,hook模块,socket模块,bytearray序列化,tcpserver模块,http模块,websocket模块,https模块等。
安装boost库:
安装日志:
# apt install libboost-dev Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libboost1.71-dev Suggested packages: libboost-doc libboost1.71-doc libboost-atomic1.71-dev libboost-chrono1.71-dev libboost-container1.71-dev libboost-context1.71-dev libboost-contract1.71-dev libboost-coroutine1.71-dev libboost-date-time1.71-dev libboost-exception1.71-dev libboost-fiber1.71-dev libboost-filesystem1.71-dev libboost-graph1.71-dev libboost-graph-parallel1.71-dev libboost-iostreams1.71-dev libboost-locale1.71-dev libboost-log1.71-dev libboost-math1.71-dev libboost-mpi1.71-dev libboost-mpi-python1.71-dev libboost-numpy1.71-dev libboost-program-options1.71-dev libboost-python1.71-dev libboost-random1.71-dev libboost-regex1.71-dev libboost-serialization1.71-dev libboost-stacktrace1.71-dev libboost-system1.71-dev libboost-test1.71-dev libboost-thread1.71-dev libboost-timer1.71-dev libboost-type-erasure1.71-dev libboost-wave1.71-dev libboost1.71-tools-dev libmpfrc++-dev libntl-dev The following NEW packages will be installed: libboost-dev libboost1.71-dev 0 upgraded, 2 newly installed, 0 to remove and 200 not upgraded. Need to get 9072 kB of archives. After this operation, 138 MB of additional disk space will be used. Do you want to continue? [Y/n]
安装yaml-cpp:
git clone git@github.com:jbeder/yaml-cpp.git cd yaml-cpp mkdir build cd build cmake .. make & make install