| 1 |
Installation |
# Installation |
|
================== |
|
|
To install LBBS on Linux (e.g. Debian 13, CentOS Stream 10), please perform the following steps: |
|
|
|
|
|
0) Prerequisite |
|
|
Follow README.md under [leafok_bbs](https://github.com/leafok/leafok_bbs) to initialize the database structure shared by both web version and telnet version. |
|
|
It is highly recommended to finish the configuration steps of web version first and make sure those features could work properly. |
|
|
|
|
|
1) Common requirements |
|
|
gcc >= 13.3 |
|
|
autoconf >= 2.68 |
|
|
automake >= 1.16 |
|
|
php >= 8.2 |
|
|
mysql >= 8.4 |
|
|
(For Debian / Ubuntu) |
|
|
sudo apt-get install -y libssh-dev libsystemd-dev |
|
|
(For CentOS / RHEL) |
|
|
sudo dnf install -y libssh-devel systemd-devel |
|
|
(For MSYS2 with MinGW-w64 toolchain) |
|
|
pacman -S --needed msys2-runtime-devel libssh libssh-devel pcre2-devel mingw-w64-x86_64-libiconv mingw-w64-x86_64-libmariadbclient |
|
|
|
|
|
3) Extract the source files from a tarball or export from GitHub |
|
|
Run the following command to set up the autoconf/automake environment, |
|
|
autoreconf --install --force |
|
|
|
|
|
4) Compile source files |
|
|
export LBBS_HOME_DIR=/usr/local/lbbs |
|
|
(For Linux) |
|
|
./configure --prefix=$LBBS_HOME_DIR |
|
|
(For MSYS2 with MinGW-w64 toolchain) |
|
|
./configure --prefix=$LBBS_HOME_DIR --disable-shared PKG_CONFIG_PATH=/mingw64/lib/pkgconfig/ |
|
|
make |
|
|
|
|
|
5) Create user and group |
|
|
sudo useradd bbs |
|
|
|
|
|
6) Install binary files and data files |
|
|
sudo make install |
|
|
chown -R bbs:bbs $LBBS_HOME_DIR |
|
|
|
|
|
7) Modify following configuration files |
|
|
Default configuration files is saved as *.default, you should rename them first. |
|
|
$LBBS_HOME_DIR/conf/bbsd.conf |
|
|
$LBBS_HOME_DIR/conf/bbsnet.conf |
|
|
$LBBS_HOME_DIR/conf/badwords.conf |
|
|
$LBBS_HOME_DIR/utils/conf/db_conn.conf.php |
|
|
|
|
|
8) Copy CA cert file of MySQL server to $LBBS_HOME_DIR/conf/ca_cert.pem |
|
|
|
|
|
9) Generate menu configuration file with section data by running the script |
|
|
sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_section_menu.php |
|
|
sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_ex_list.php |
|
|
sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_top.php |
|
|
|
|
|
10) Create SSH2 RSA / ED25519 certificate |
|
|
ssh-keygen -t rsa -C "Your Server Name" -N "" -f $LBBS_HOME_DIR/conf/ssh_host_rsa_key |
|
|
ssh-keygen -t ed25519 -C "Your Server Name" -N "" -f $LBBS_HOME_DIR/conf/ssh_host_ed25519_key |
|
|
ssh-keygen -t ecdsa -C "Your Server Name" -N "" -f $LBBS_HOME_DIR/conf/ssh_host_ecdsa_key |
|
|
|
|
|
11) Startup |
|
|
sudo -u bbs $LBBS_HOME_DIR/bin/bbsd |
|
|
|
|
|
12) (Optional) Set up systemd |
|
|
Create your own /usr/lib/systemd/system/lbbs.service from the sample at conf/lbbs.service, and make any change if necessary. |
|
|
Reload daemon config and start the service. |
|
|
|
|
|
13) (Optional) Set up logrotate |
|
|
Create your own /etc/logrotate.d/lbbs from the sample at conf/lbbs.logrotate, and make any change if necessary. |
|
|
Restart logrotate service. |
|
|
|
|
|
14) Cleanup on abnormal service termination |
|
|
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: |
|
|
sudo -u bbs ipcs |
|
|
There should be no item owned by bbs. Otherwise, run the following command to cleanup: |
|
|
sudo -u bbs ipcrm -a |
|
|
|
|
|
|
|
|
For Docker user |
|
|
================== |
|
|
You may either build the docker image from source code by running: |
|
|
docker compose up --build -d |
|
| 2 |
|
|
| 3 |
or pull the docker image per release from Docker Hub by running: |
The Chinese version of this changelog is available at [INSTALL.zh_CN.md](INSTALL.zh_CN.md). |
|
docker compose pull |
|
| 4 |
|
|
| 5 |
You should always create / update the configuration files for local configuration (e.g. database connection, network port) as described above. |
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. |