略游笔记

CentOs编译dl

CentOs常用命令

dl编译

安装clang

sudo dnf install clang clang-tools-extra -y

安装cmake

sudo dnf install cmake -y

安装curl

sudo dnf install libcurl-devel -y

拉取仓库

cd /opt git clone https://gitee.com/lveyou/dl.git

解析dl

mkdir -p out cd out cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DODE_WITH_DEMOS=false -DDL_EASY=true ..

编译

make -j4

拉取子项目

git submodule update --init --recursive project/dl_chess_server/ git submodule status

其他常用命令

更新仓库

cd /opt/dl git pull

查看编译器配置

grep "CMAKE_CXX_COMPILER" CMakeCache.txt

卸载

sudo dnf remove xxx -y

安装C++标准库

sudo dnf install -y llvm15 clang15 libcxx15 libcxxabi15

进程查找

ps -ef|grep dl

查看文件尾部

tail -f nohup.out

后台运行流程

1. 安装 screen(CentOS 需手动装)

sudo yum install -y screen

2. 创建新的 screen 会话(命名为 app_session)

screen -S app_session

3. 在会话中正常运行程序(stdin 完全有效,可交互)

./your_program # 此时可正常输入、交互

4. 脱离会话(进程后台运行):按 Ctrl + A + D

5. 重新连接会话(继续交互)

screen -r app_session

6. 退出会话(进程终止):按 Ctrl + D

评论 (0)

暂无评论