资讯动态

如何部署 CTF 平台 ( OpenCTF )

发布时间:2026/10/1 15:41:25 来源:尧图企业网站定制
如何部署 CTF 平台 ( OpenCTF )目录如何部署 CTF 平台 ( OpenCTF )一、下载项目1. 使用 git clone 下载项目或直接去 Release 下载二、配置服务器1. 在 Rocky 或 CentOS 上部署2. 在 Debian 或 Ubuntu 上部署三、访问服务器Powered By c4e3bac3foxmail.com什么是 CTFCSDN下载地址GitCode 项目地址一、下载项目1. 使用 git clone 下载项目或直接去 Release 下载gitclone https://gitcode.com/khchgkhbdfxk/OpenCTF.git或者wgethttps://raw.gitcode.com/khchgkhbdfxk/OpenCTF/archive/refs/heads/v0.17.zip二、配置服务器1. 在 Rocky 或 CentOS 上部署yuminstallzipyuminstallhttpd yuminstallmariadbunzipOpenCTF.zipcp-rOpenCTF/* /var/www/ systemctl start httpdecho[mysqld]/etc/my.cnfechoport 3306/etc/my.cnfechodefault-storage-engine InnoDB/etc/my.cnfechocharacter-set-server utf8mb4/etc/my.cnf systemctl start mariadb接下来配置数据库createdatabaseopenctf;useopenctfcreatetableuser(idchar(255)PRIMARYKEY,usernamechar(255),passwordchar(255),emailchar(255));createtablecmtn(idchar(255)PRIMARYKEY,namechar(255),start_timechar(255),end_timechar(255),messagevarchar(10000));createuserOpenCTFlocalhostIDENTIFIEDBY1234567890;GRANTSELECT,DELETE,UPDATE,INSERT,DROP,CREATEONopenctf.*TOOpenCTFlocalhost;flushprivileges;2. 在 Debian 或 Ubuntu 上部署apt-getinstallzipapt-getinstallhttpdapt-getinstallmariadbunzipOpenCTF.zipcp-rOpenCTF/* /var/www/ systemctl start httpdecho[mysqld]/etc/my.cnfechoport 3306/etc/my.cnfechodefault-storage-engine InnoDB/etc/my.cnfechocharacter-set-server utf8mb4/etc/my.cnf systemctl start mariadb接下来配置数据库createdatabaseopenctf;useopenctfcreatetableuser(idchar(255)PRIMARYKEY,usernamechar(255),passwordchar(255),emailchar(255),enableint(1)NOTNULLDEFAULT0);createtablecmtn(idchar(255)PRIMARYKEY,namechar(255),start_timechar(255),end_timechar(255),messagevarchar(10000));createuserOpenCTFlocalhostIDENTIFIEDBY1234567890;GRANTSELECT,DELETE,UPDATE,INSERT,DROP,CREATEONopenctf.*TOOpenCTFlocalhost;flushprivileges;三、访问服务器使用 ifconfig 查看 IP 地址然后用浏览器访问CTFCTF 竞赛CTF 比赛CTF 平台OpenCTF

读完文章,也想定制专属网站?

尧图设计师 24 小时内与您沟通定制方案

免费获取报价 →
↑