LeanClub 特性要求安装配置构建运行Nginx关于 高性能 C++ 论坛系统

程序名称:LeanClub 特性要求安装配置构建运行Nginx关于

授权协议: MIT

操作系统: Linux

开发语言: C/C++

LeanClub 特性要求安装配置构建运行Nginx关于 介绍

LeanClub 是高性能 C++ 论坛系统。

注意:不建议在生产环境使用!

在线演示:https://leanclub.org/

特性

  1. 速度非常快,20000 RPS on i7 iMac.

  2. 前端非常简洁

  3. 完全是 Ajax 和 API

  4. 可以使用 Google GitHub Twitter OAuth 登录

要求

  • GCC 4.8

  • CMake 2.8

(不支持 Windows)

安装

数据库

  1. 安装 Apache Couchdb

  2. 创建 4 个数据库: “category” “notification” “topics” 和 “user”

  3. 导入 “databases” 目录

环境

  1. apt-get install build-essential cmake libcurl4-nss-dev libboost-all-dev redis-server libtcmalloc-minimal4 && sudo ln -s /usr/lib/libtcmalloc_minimal.so.4 /usr/lib/libtcmalloc_minimal.so

  2. Install hiredis from sources ( redis3m is already included )

配置

cp src/config.h.example.h src/config.h
vi src/config.h

构建运行

mkdir Build
cd Build
cmake ..
make
./leanclub

Nginx

server {
    listen 80;
    server_name leanclub.org;
    client_max_body_size MAX_UPLOAD_SIZE;
    root /path/to/leanclub/;

    location / {
        proxy_pass http://127.0.0.1:18080;
        proxy_redirect off;
        proxy_set_header X-Forwarded-For $http_x_forwarded_for;
        proxy_set_header Host leanclub.org;
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Frame-Options DENY;
    }

    # Cache the avatar (Optional) 
    # location /info/ {
    #    proxy_pass http://127.0.0.1:18080;
    #    proxy_redirect off;
    #    proxy_set_header X-Forwarded-For $http_x_forwarded_for;
    #    proxy_set_header Host leanclub.org;
    #    proxy_cache one;
    #    proxy_cache_key "$request_uri";
    #    proxy_cache_valid  200 302  120m;
    # }

    location /static/ {
        expires 10d;
    }
    location /attachments/ {
        expires 365d;
    }
}

reverse proxy 127.0.0.1:18080 , and map the “static” and “attachments” folder.

关于

此系统基于 Crow

LeanClub 特性要求安装配置构建运行Nginx关于 官网

https://leanclub.org/

相关编程语言

VertrigoServ 是一个Windows平台下的非常专业的、易...
APMServ 5.2.0 是一款拥有图形界面的快速搭建Apache...
PHP Manager for IIS 是一个用来在 Windows 平台下的...
LAMPPIX 是一个包含 LAMP 运行环境的可启动 Linux 光...
RubyWorks 是一個在Red Hat Enterprise 或是CentOS ...
Instant Rails是一个一站式的Rails运行环境,包含Ru...