/[LeafOK_CVS]/lbbs/INSTALL.md
ViewVC logotype

Diff of /lbbs/INSTALL.md

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

Revision 1.6 by sysadm, Fri Nov 7 07:27:36 2025 UTC Revision 1.31 by sysadm, Thu Jan 8 03:18:58 2026 UTC
# Line 1  Line 1 
1  Installation  # Installation
2  ==================  
3  To install LBBS, please perform the following steps:  The Chinese version of this changelog is available at [INSTALL.zh_CN.md](INSTALL.zh_CN.md).
4    
5  0) Prerequisite    To install LBBS on Linux (e.g., Debian 13, CentOS Stream 10), please perform the following steps:
6     Follow README.md under [leafok_bbs](https://github.com/leafok88/leafok_bbs) to initialize the database structure shared by both web version and telnet version.    
7     It is highly recommended to finish the configuration steps of web version first and make sure those features could work properly.  ## 0. Prerequisites
8    
9  1) Common requirements    Follow the instructions in [leafok_bbs](https://github.com/leafok/leafok_bbs) README.md to initialize the database structure shared by both the web and telnet versions.
10     gcc >= 14.2.0    
11     autoconf >= 2.68    It is highly recommended to complete the web version configuration steps first and ensure those features work properly.
12     automake >= 1.16    
13     libssh >= 0.11.1    ## 1. Common Requirements
14     PHP >= 8.2    
15     MySQL >= 8.4  - gcc >= 13.3
16    - autoconf >= 2.68
17  2) Extract the source files from a tarball or export from GitHub    - automake >= 1.16
18     Run the following command to set up the autoconf/automake environment,    - php >= 8.2
19     sh ./autogen.sh  - mysql >= 8.4
20    
21  3) Compile source files    ### Distribution-Specific Packages
22     export LBBS_HOME_DIR=/usr/local/lbbs  
23     ./configure --prefix=$LBBS_HOME_DIR    **Debian / Ubuntu:**
24     make  ```bash
25    sudo apt-get install -y libssh-dev libsystemd-dev
26  4) Create user and group    ```
27     sudo useradd bbs  
28    **CentOS / RHEL:**
29  5) Install binary files and data files    ```bash
30     sudo make install    sudo dnf install -y libssh-devel systemd-devel
31     chown -R bbs:bbs $LBBS_HOME_DIR  ```
32    
33  6) Modify following configuration files    **MSYS2 with MinGW-w64 toolchain:**
34     Default configuration files is saved as *.default, you should rename them first.    ```bash
35     $LBBS_HOME_DIR/conf/bbsd.conf    pacman -S --needed msys2-runtime-devel libssh libssh-devel pcre2-devel mingw-w64-x86_64-libiconv mingw-w64-x86_64-libmariadbclient
36     $LBBS_HOME_DIR/conf/badwords.conf    ```
37     $LBBS_HOME_DIR/utils/conf/db_conn.conf.php    
38    ## 2. Extract Source Files
39  7) Generate menu configuration file with section data by running the script    
40     sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_section_menu.php    Extract the source files from a tarball or export from GitHub.
41     sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_ex_list.php    
42    Run the following command to set up the autoconf/automake environment:
43  8) Create SSH2 RSA certificate    ```bash
44     ssh-keygen -t rsa -C "Your Server Name" -f $LBBS_HOME_DIR/conf/ssh_host_rsa_key  autoreconf --install --force
45    ```
46  9) Startup    
47     sudo -u bbs $LBBS_HOME_DIR/bin/bbsd  ## 3. Compile Source Files
48    
49  10) Set up systemd    ```bash
50     Create your own /usr/lib/systemd/system/lbbs.service from the sample at conf/lbbs.service.default, and make any change if necessary.    export LBBS_HOME_DIR=/usr/local/lbbs
51     Reload daemon config and start the service.    ```
52    
53  11) Cleanup on abnormal service termination    **For Linux:**
54     In case of any unexpected failure or improper operation which results in abnormal termination of lbbs process, manual cleanup of shared memory / semaphore might be required before re-launch the process. Run the following command to check first:    ```bash
55     sudo -u bbs ipcs    ./configure --prefix=$LBBS_HOME_DIR
56     There should be no item owned by bbs. Otherwise, run the following command to cleanup:    ```
57     sudo -u bbs ipcrm -a  
58    **For MSYS2 with MinGW-w64 toolchain:**
59    ```bash
60    ./configure --prefix=$LBBS_HOME_DIR --disable-shared PKG_CONFIG_PATH=/mingw64/lib/pkgconfig/
61    ```
62    
63    ```bash
64    make
65    ```
66    
67    ## 4. Create User and Group
68    
69    ```bash
70    sudo useradd bbs
71    ```
72    
73    ## 5. Install Binary and Data Files
74    
75    ```bash
76    sudo make install
77    chown -R bbs:bbs $LBBS_HOME_DIR
78    ```
79    
80    ## 6. Modify Configuration Files
81    
82    Default configuration files are saved as `*.default`. Rename them first:
83    
84    - `$LBBS_HOME_DIR/conf/bbsd.conf`
85    - `$LBBS_HOME_DIR/conf/bbsnet.conf`
86    - `$LBBS_HOME_DIR/conf/badwords.conf`
87    - `$LBBS_HOME_DIR/utils/conf/db_conn.conf.php`
88    
89    ## 7. Copy MySQL CA Certificate
90    
91    Copy the MySQL server's CA certificate file to `$LBBS_HOME_DIR/conf/ca_cert.pem`.
92    
93    ## 8. Generate Menu Configuration Files
94    
95    Run the following scripts to generate menu configuration files with section data:
96    
97    ```bash
98    sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_section_menu.php
99    sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_ex_list.php
100    sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_top.php
101    ```
102    
103    ## 9. Create SSH2 Certificates
104    
105    ```bash
106    ssh-keygen -t rsa -C "Your Server Name" -N "" -f $LBBS_HOME_DIR/conf/ssh_host_rsa_key
107    ssh-keygen -t ed25519 -C "Your Server Name" -N "" -f $LBBS_HOME_DIR/conf/ssh_host_ed25519_key
108    ssh-keygen -t ecdsa -C "Your Server Name" -N "" -f $LBBS_HOME_DIR/conf/ssh_host_ecdsa_key
109    ```
110    
111    ## 10. Startup
112    
113    ```bash
114    sudo -u bbs $LBBS_HOME_DIR/bin/bbsd
115    ```
116    
117    ## 11. (Optional) Set Up systemd
118    
119    Create your own `/usr/lib/systemd/system/lbbs.service` from the sample at `conf/lbbs.service`, and make any necessary changes.
120    
121    Reload daemon configuration and start the service.
122    
123    ## 12. (Optional) Set Up logrotate
124    
125    Create your own `/etc/logrotate.d/lbbs` from the sample at `conf/lbbs.logrotate`, and make any necessary changes.
126    
127    Restart the logrotate service.
128    
129    ## 13. Cleanup on Abnormal Service Termination
130    
131    In case of unexpected failure or improper operation resulting in abnormal termination of the LBBS process, manual cleanup of shared memory/semaphore might be required before relaunching the process.
132    
133    First, check with:
134    ```bash
135    sudo -u bbs ipcs
136    ```
137    
138    There should be no items owned by `bbs`. Otherwise, clean up with:
139    ```bash
140    sudo -u bbs ipcrm -a
141    ```
142    
143    # For Docker Users
144    
145    You may either build the Docker image from source code by running:
146    ```bash
147    docker compose up --build -d
148    ```
149    
150    or pull the Docker image per release from Docker Hub by running:
151    ```bash
152    docker compose pull
153    ```
154    
155    You should always create/update the configuration files for local configuration (e.g., database connection, network port) as described above.


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

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