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

Contents of /lbbs/INSTALL.md

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.31 - (show annotations)
Thu Jan 8 03:18:58 2026 UTC (2 months, 1 week ago) by sysadm
Branch: MAIN
Changes since 1.30: +153 -84 lines
Content type: text/markdown
Rewrite with AI

1 # Installation
2
3 The Chinese version of this changelog is available at [INSTALL.zh_CN.md](INSTALL.zh_CN.md).
4
5 To install LBBS on Linux (e.g., Debian 13, CentOS Stream 10), please perform the following steps:
6
7 ## 0. Prerequisites
8
9 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
11 It is highly recommended to complete the web version configuration steps first and ensure those features work properly.
12
13 ## 1. Common Requirements
14
15 - gcc >= 13.3
16 - autoconf >= 2.68
17 - automake >= 1.16
18 - php >= 8.2
19 - mysql >= 8.4
20
21 ### Distribution-Specific Packages
22
23 **Debian / Ubuntu:**
24 ```bash
25 sudo apt-get install -y libssh-dev libsystemd-dev
26 ```
27
28 **CentOS / RHEL:**
29 ```bash
30 sudo dnf install -y libssh-devel systemd-devel
31 ```
32
33 **MSYS2 with MinGW-w64 toolchain:**
34 ```bash
35 pacman -S --needed msys2-runtime-devel libssh libssh-devel pcre2-devel mingw-w64-x86_64-libiconv mingw-w64-x86_64-libmariadbclient
36 ```
37
38 ## 2. Extract Source Files
39
40 Extract the source files from a tarball or export from GitHub.
41
42 Run the following command to set up the autoconf/automake environment:
43 ```bash
44 autoreconf --install --force
45 ```
46
47 ## 3. Compile Source Files
48
49 ```bash
50 export LBBS_HOME_DIR=/usr/local/lbbs
51 ```
52
53 **For Linux:**
54 ```bash
55 ./configure --prefix=$LBBS_HOME_DIR
56 ```
57
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.

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