/[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.13 by sysadm, Thu Jan 8 12:12:00 2026 UTC Revision 1.14 by sysadm, Sat Jan 10 06:48:17 2026 UTC
# Line 2  Line 2 
2    
3  Chinese version: [README.zh_CN.md](README.zh_CN.md)  Chinese version: [README.zh_CN.md](README.zh_CN.md)
4    
5    ## 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  ## Program Overview
28    
29  **Development Language:** PHP (8.2) + MySQL (8.4)    **Development Language:** PHP (8.2) + MySQL (8.4)  
# Line 18  Chinese version: [README.zh_CN.md](READM Line 40  Chinese version: [README.zh_CN.md](READM
40    
41  ## Installation and Usage Instructions  ## Installation and Usage Instructions
42    
43  ### 1. Database Setup  ### 1. Prerequisites and Required Libraries
44    - **PHP 8.2+** and **MySQL 8.4+** installed
45    - Install Composer using your package manager (e.g., `apt`, `yum`, or from [getcomposer.org](https://getcomposer.org/))
46    - Run the following command in the project root directory:
47    ```bash
48    composer install --prefer-dist --no-scripts --no-progress
49    ```
50    
51    ### 2. Database Setup
52  - Import the database structure from `TODO/sql/db_stru.sql`  - Import the database structure from `TODO/sql/db_stru.sql`
53  - *(Optional)* Import test data from `TODO/sql/sample_data.sql`  - *(Optional)* Import sample data from `TODO/sql/sample_data.sql`
54    - Test account: `sysop`    - Test account: `sysop`
55    - Temporary password (must be changed upon login): `3anzHaNg`    - Temporary password (must be changed upon first login): `3anzHaNg`
56    
57  ### 2. Configuration  ### 3. Configuration
58  - Copy files from `TODO/conf/` directory to `conf` directory (create if it doesn't exist)  - Copy files from `TODO/conf/` directory to `conf` directory (create if it doesn't exist)
59  - Modify the following files:  - Modify the following files:
60    - Site information: Edit `conf/site.conf.php`    - Site information: Edit `conf/site.conf.php`
61    - Database connection: Edit `conf/db_conn.conf.php`    - Database connection: Edit `conf/db_conn.conf.php`
62    - Email sending: Edit `conf/smtp.conf.php` (supports both SMTP and local sendmail)    - Email sending: Edit `conf/smtp.conf.php` (supports both SMTP and local sendmail)
63    
64  ### 3. Site Customization  ### 4. Site Customization
65  - Modify `lib/common.inc.php` for site-specific configurations  - Modify `lib/common.inc.php` for site-specific configurations
66    
67  ### 4. Directory Permissions  ### 5. Directory Permissions
68  - Create directories (if they don't exist):  - Create directories (if they don't exist):
69    - `bbs/cache`    - `bbs/cache`
70    - `bbs/upload`    - `bbs/upload`
# Line 45  Chinese version: [README.zh_CN.md](READM Line 75  Chinese version: [README.zh_CN.md](READM
75    - `gen_ex`    - `gen_ex`
76    - `stat`    - `stat`
77    
78  ### 5. Account Creation  ### 6. Account Creation
79  - Create administrator and initial accounts through the registration page  - Create administrator and initial accounts through the registration page
80  - *Note:* Involves multiple database tables; not recommended to create directly in the database  - *Note:* Involves multiple database tables; not recommended to create directly in the database
81    
82  ### 6. Database Setup (Additional)  ### 7. Database Setup (Additional)
83  - Add administrator accounts, categories, and sections in the database  - Add administrator accounts, categories, and sections in the database
84  - Relevant tables: `admin_config`, `section_class`, `section_config`  - Relevant tables: `admin_config`, `section_class`, `section_config`
85    
86  ### 7. Management and Background Jobs  ### 8. Management and Background Jobs
87  - Management programs are located in the `manage` directory  - Management programs are located in the `manage` directory
88  - Scheduled background tasks require adding to crontab  - Scheduled background tasks require adding to crontab
89    
90  ## Docker Users  ## Docker Deployment
91    
92    ### Quick Start
93    ```bash
94    # Clone the repository
95    git clone https://github.com/leafok/leafok_bbs.git
96    cd leafok_bbs
97    
98    # Start with Docker Compose
99    docker compose up -d
100    ```
101    
102  ### Build from Source  ### Build from Source
103  ```bash  ```bash
104  docker compose up --build -d  docker compose up --build -d
105  ```  ```
106    
107  ### Download from Docker Hub  ### Using Pre-built Images
108  ```bash  ```bash
109    # Pull the latest images from Docker Hub
110  docker compose pull  docker compose pull
111    
112    # Start the containers
113    docker compose up -d
114    ```
115    
116    ### Configuration for Docker
117    1. The web application will be available at `http://localhost:8080`
118    2. Configuration files should be placed in `conf/` directory (mounted to `/var/www/html/conf` in the container)
119    3. To modify configuration:
120       - Copy files from `TODO/conf/` to `conf/` directory
121       - Edit the configuration files as needed
122       - Restart the container: `docker compose restart`
123    
124    ### Docker Compose Services
125    - **web**: Apache HTTP Server with PHP 8.2
126    - **db**: MySQL 8.4 database
127    - **phpmyadmin**: Database management interface (optional, available at `http://localhost:8081`)
128    
129    ### Common Docker Commands
130    ```bash
131    # View logs
132    docker compose logs -f
133    
134    # Stop containers
135    docker compose down
136    
137    # Rebuild and restart
138    docker compose up --build -d
139    
140    # Access container shell
141    docker compose exec web bash
142  ```  ```
143    
144  ### Configuration  ### Persistent Data
145  Modify or import configuration files in the container's `/var/www/html/conf` directory.  - Database data is stored in a Docker volume (`leafok_bbs_db_data`)
146    - Uploaded files and cache are stored in mounted host directories
147    
148  ## Copyright Information  ## Copyright Information
149  Copyright (C) 2004-2026 Leaflet <leaflet@leafok.com>  Copyright (C) 2004-2026 Leaflet <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