/[LeafOK_CVS]/fenglin/README.md
ViewVC logotype

Diff of /fenglin/README.md

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.9 by sysadm, Sun Jan 4 12:43:32 2026 UTC Revision 1.15 by sysadm, Thu Jan 22 04:43:15 2026 UTC
# Line 1  Line 1 
1  # LeafOK BBS  # LeafOK BBS
2    
3  Copyright (C) LeafOK.com, 2001-2026  Chinese version: [README.zh_CN.md](README.zh_CN.md)
4    
5  演示站点位于:https://fenglin.info/bbs/  ## Table of Contents
6    - [Program Overview](#program-overview)
7    - [Installation and Usage Instructions](#installation-and-usage-instructions)
8      - [Prerequisites and Required Libraries](#1-prerequisites-and-required-libraries)
9      - [Database Setup](#2-database-setup)
10      - [Configuration](#3-configuration)
11      - [Site Customization](#4-site-customization)
12      - [Directory Permissions](#5-directory-permissions)
13      - [Account Creation](#6-account-creation)
14      - [Additional Database Setup](#7-database-setup-additional)
15      - [Management and Background Jobs](#8-management-and-background-jobs)
16    - [Docker Deployment](#docker-deployment)
17      - [Quick Start](#quick-start)
18      - [Build from Source](#build-from-source)
19      - [Using Pre-built Images](#using-pre-built-images)
20      - [Configuration for Docker](#configuration-for-docker)
21      - [Docker Compose Services](#docker-compose-services)
22      - [Common Docker Commands](#common-docker-commands)
23      - [Persistent Data](#persistent-data)
24    - [Copyright Information](#copyright-information)
25    - [License](#license)
26    
27    ## Program Overview
28    
29    **Development Language:** PHP (8.2) + MySQL (8.4)  
30    **Platform:** Linux / Windows  
31    **License:** Source code released under GNU GPL license  
32    
33    **Features:**
34    - Web-based article browsing, posting, searching, and other basic functions
35    - **Advanced Search Capabilities:**
36      - Solr-powered full-text search with Chinese language support
37      - Search by user ID (UID), username, or nickname
38      - Advanced search v2 with filtering by date range, section, and content type
39      - Support for searching original posts vs. replies
40      - Filter by excerpted articles only
41    - Support for multiple categories and sections, each with discussion areas, digest areas, and featured areas
42    - Comprehensive moderator management support
43    - **Modern Architecture:**
44      - Refactored Lightweight Markup Language (LML) renderer with improved performance
45      - User timezone support for localized date/time display
46      - Theme support for major features
47    - Optional Telnet access for login, article viewing, games, etc. (see [lbbs](https://github.com/leafok/lbbs) for details)
48    
49    **Demo site:** https://fenglin.info/bbs/
50    
51    ## Installation and Usage Instructions
52    
53    ### 1. Prerequisites and Required Libraries
54    - **PHP 8.2+** and **MySQL 8.4+** installed
55    - Install Composer using your package manager (e.g., `apt`, `yum`, or from [getcomposer.org](https://getcomposer.org/))
56    - Run the following command in the project root directory:
57    ```bash
58    composer install --prefer-dist --no-scripts --no-progress
59    ```
60    
61    ### 2. Database Setup
62    - Import the database structure from `TODO/sql/db_stru.sql`
63    - *(Optional)* Import sample data from `TODO/sql/sample_data.sql`
64      - Test account: `sysop`
65      - Temporary password (must be changed upon first login): `3anzHaNg`
66    
67    ### 3. Configuration
68    - Copy files from `TODO/conf/` directory to `conf` directory (create if it doesn't exist)
69    - Modify the following files:
70      - Site information: Edit `conf/site.conf.php`
71      - Database connection: Edit `conf/db_conn.conf.php`
72      - Email sending: Edit `conf/smtp.conf.php` (supports both SMTP and local sendmail)
73      - **Solr search** (optional): Edit `conf/solr.conf.php` if using Solr for advanced search features
74        - Default configuration assumes Solr running on `localhost:8983` with core `lbbs`
75        - Update hostname, port, authentication, and path as needed
76    
77    ### 4. Site Customization
78    - Modify `lib/common.inc.php` for site-specific configurations
79    
80    ### 5. Directory Permissions
81    - Create directories (if they don't exist):
82      - `bbs/cache`
83      - `bbs/upload`
84      - `stat`
85    - Ensure the web server user has write permissions for:
86      - `bbs/cache`
87      - `bbs/upload`
88      - `gen_ex`
89      - `stat`
90    
91    ### 6. Account Creation
92    - Create administrator and initial accounts through the registration page
93    - *Note:* Involves multiple database tables; not recommended to create directly in the database
94    
95    ### 7. Database Setup (Additional)
96    - Add administrator accounts, categories, and sections in the database
97    - Relevant tables: `admin_config`, `section_class`, `section_config`
98    
99    ### 8. Management and Background Jobs
100    - Management programs are located in the `manage` directory
101    - Scheduled background tasks require adding to crontab
102    
103    ## Docker Deployment
104    
105    ### Quick Start
106    ```bash
107    # Clone the repository
108    git clone https://github.com/leafok/leafok_bbs.git
109    cd leafok_bbs
110    
111    # Start with Docker Compose
112    docker compose up -d
113    ```
114    
115    ### Build from Source
116    ```bash
117    docker compose up --build -d
118    ```
119    
120    ### Using Pre-built Images
121    ```bash
122    # Pull the latest images from Docker Hub
123    docker compose pull
124    
125    # Start the containers
126    docker compose up -d
127    ```
128    
129    ### Configuration for Docker
130    1. The web application will be available at `http://localhost:8080`
131    2. Configuration files should be placed in `conf/` directory (mounted to `/var/www/html/conf` in the container)
132    3. To modify configuration:
133       - Copy files from `TODO/conf/` to `conf/` directory
134       - Edit the configuration files as needed
135       - Restart the container: `docker compose restart`
136    
137    ### Docker Compose Services
138    - **web**: Apache HTTP Server with PHP 8.2
139    - **db**: MySQL 8.4 database
140    - **phpmyadmin**: Database management interface (optional, available at `http://localhost:8081`)
141    
142    ### Common Docker Commands
143    ```bash
144    # View logs
145    docker compose logs -f
146    
147    # Stop containers
148    docker compose down
149    
150    # Rebuild and restart
151    docker compose up --build -d
152    
153    # Access container shell
154    docker compose exec web bash
155    ```
156    
157    ### Persistent Data
158    - Database data is stored in a Docker volume (`leafok_bbs_db_data`)
159    - Uploaded files and cache are stored in mounted host directories
160    
161  程序简介  ## Copyright Information
162  =================  Copyright (C) 2004-2026 Leaflet <leaflet@leafok.com>
 开发语言:PHP (8.2) + MySQL (8.4)    
 运行平台:Linux / Windows    
 软件性质:源代码采用 GNU GPL 授权发布    
 功能说明:    
     基于Web的文章浏览、发表、查找等基本功能和其它各种实用功能,可开设多类别多版块,各版块分设讨论区、文摘区、精华区,并提供全面的版主管理支持。    
     Telnet方式的登陆访问、文章查看、游戏等功能(可选,详见[lbbs](https://github.com/leafok/lbbs))    
163    
164    ## License
165  安装和使用说明  This program is free software; you can redistribute it and/or modify it under the terms of the [GNU General Public License](LICENSE) as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
 =================  
 1) 数据库结构位于 TODO/sql/db_stru.sql ,需先导入    
   
 2) 将 TODO/conf/ 目录下的文件复制到 conf 目录下(如不存在),并修改    
    数据库连接需要修改conf/db_conn.conf.php    
    邮件发送支持SMTP和本地sendmail两种方式,需要修改conf/smtp.conf.php    
   
 3) 修改 lib/common.inc.php 文件(站点个性化配置)    
   
 4) 创建目录 bbs/cache bbs/upload stat(如果不存在的话),并确保web服务器运行账户拥有写目录 bbs/cache bbs/upload gen_ex stat 的权限    
   
 5) 通过注册页面创建管理员账号等初始账号(涉及多张数据表,不建议直接在数据库中创建)    
   
 6) 在数据库中添加管理员帐号、栏目、版块等(分别位于admin_config、section_class、section_config表)    
   
 7) 管理程序和定时后台作业(需要自行添加crontab)位于 manage 目录下    
   
   
 Docker用户  
 =================  
 1) 可以从源代码位置修改配置后,直接生成镜像并启动容器    
    docker compose up --build -d    
   
 2) 也可以从Docker Hub下载镜像文件    
    docker compose pull    
    需要在容器生成的www-data卷的/var/www/html/conf目录下,修改各种配置    
   
   
 报告Bug/参与改进  
 =================  
 由于本程序源代码采用 GNU GPL 授权发布,如果您发现任何错误或者愿意加入本BBS的开发,请与我们联系。    
 E-mail: leaflet@leafok.com    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1