| 1 |
Installation |
Installation |
| 2 |
================== |
================== |
| 3 |
To install LBBS, please perform the following steps: |
To install LBBS on Linux (e.g. Debian 13, CentOS Stream 10), please perform the following steps: |
| 4 |
|
|
| 5 |
0) Prerequisite |
0) Prerequisite |
| 6 |
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. |
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. |
| 22 |
4) Compile source files |
4) Compile source files |
| 23 |
export LBBS_HOME_DIR=/usr/local/lbbs |
export LBBS_HOME_DIR=/usr/local/lbbs |
| 24 |
./configure --prefix=$LBBS_HOME_DIR |
./configure --prefix=$LBBS_HOME_DIR |
| 25 |
make |
make |
| 26 |
|
|
| 27 |
5) Create user and group |
5) Create user and group |
| 28 |
sudo useradd bbs |
sudo useradd bbs |
| 37 |
$LBBS_HOME_DIR/conf/badwords.conf |
$LBBS_HOME_DIR/conf/badwords.conf |
| 38 |
$LBBS_HOME_DIR/utils/conf/db_conn.conf.php |
$LBBS_HOME_DIR/utils/conf/db_conn.conf.php |
| 39 |
|
|
| 40 |
8) Generate menu configuration file with section data by running the script |
8) Copy CA cert file of MySQL server to $LBBS_HOME_DIR/conf/ca_cert.pem |
| 41 |
|
|
| 42 |
|
9) Generate menu configuration file with section data by running the script |
| 43 |
sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_section_menu.php |
sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_section_menu.php |
| 44 |
sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_ex_list.php |
sudo -u bbs php $LBBS_HOME_DIR/utils/bin/gen_ex_list.php |
| 45 |
|
|
| 46 |
9) Create SSH2 RSA certificate |
10) Create SSH2 RSA certificate |
| 47 |
ssh-keygen -t rsa -C "Your Server Name" -f $LBBS_HOME_DIR/conf/ssh_host_rsa_key |
ssh-keygen -t rsa -C "Your Server Name" -f $LBBS_HOME_DIR/conf/ssh_host_rsa_key |
| 48 |
|
|
| 49 |
10) Startup |
11) Startup |
| 50 |
sudo -u bbs $LBBS_HOME_DIR/bin/bbsd |
sudo -u bbs $LBBS_HOME_DIR/bin/bbsd |
| 51 |
|
|
| 52 |
11) (Optional) Set up systemd |
12) (Optional) Set up systemd |
| 53 |
|
Enable systemd related feature during config, by running: |
| 54 |
|
./configure --prefix=$LBBS_HOME_DIR --enable-systemd |
| 55 |
Create your own /usr/lib/systemd/system/lbbs.service from the sample at conf/lbbs.service, and make any change if necessary. |
Create your own /usr/lib/systemd/system/lbbs.service from the sample at conf/lbbs.service, and make any change if necessary. |
| 56 |
Reload daemon config and start the service. |
Reload daemon config and start the service. |
| 57 |
|
|
| 58 |
12) (Optional) Set up logrotate |
13) (Optional) Set up logrotate |
| 59 |
Create your own /etc/logrotate.d/lbbs from the sample at conf/lbbs.logrotate, and make any change if necessary. |
Create your own /etc/logrotate.d/lbbs from the sample at conf/lbbs.logrotate, and make any change if necessary. |
| 60 |
Restart logrotate service. |
Restart logrotate service. |
| 61 |
|
|
| 62 |
13) Cleanup on abnormal service termination |
14) Cleanup on abnormal service termination |
| 63 |
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: |
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: |
| 64 |
sudo -u bbs ipcs |
sudo -u bbs ipcs |
| 65 |
There should be no item owned by bbs. Otherwise, run the following command to cleanup: |
There should be no item owned by bbs. Otherwise, run the following command to cleanup: |
| 66 |
sudo -u bbs ipcrm -a |
sudo -u bbs ipcrm -a |
| 67 |
|
|
| 68 |
|
|
| 69 |
|
For MSYS2 User |
| 70 |
|
================== |
| 71 |
|
Installation of LBBS on MSYS2 is similar to the above steps for Linux, except that: |
| 72 |
|
|
| 73 |
|
1) Use additional config switches to keep compatible with the MSYS2 environment. |
| 74 |
|
./configure --prefix=$LBBS_HOME_DIR --with-mariadb --with-iconv --without-epoll --without-sysv --disable-shared |
| 75 |
|
|
| 76 |
|
2) Skip those steps not supported (e.g. systemd and logrotate). |
| 77 |
|
|