Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
install:nix [2020/11/23 00:17] – Renamed 'sbbs' GitLab group to 'main' (old path/URLs still valid) digital man | install:nix [2023/03/28 17:01] – Add exclamation marks digital man |
---|
You will likely need to build Synchronet from [[dev:source]] code for your Unix/Linux distribution, version, and platform architecture. | You will likely need to build Synchronet from [[dev:source]] code for your Unix/Linux distribution, version, and platform architecture. |
| |
Before attempting to install/build Synchronet, insure that the [[install:nix:prerequisites]] are installed. | :!: **Before attempting to install/build Synchronet, insure that the [[install:nix:prerequisites]] are installed.** |
| |
You will to use a *nix terminal and command shell (e.g. sh/bash) to install and configure Synchronet. | You will to use a *nix terminal and command shell (e.g. sh/bash) to install and configure Synchronet. |
===== Run-as User ===== | ===== Run-as User ===== |
| |
It is recommended that you install Synchronet while logged-in with the user account that Synchronet will be run-as. If you install with one user account and then later run with another (non-root) user account, you could encounter permissions errors. Running the BBS servers/services (''sbbs'') as the ''root'' user is not recommended. | It is recommended that you install Synchronet while logged-in with the user account that Synchronet will be run-as. If you install Synchronet with one user account and then later run with another (non-root) user account, you could encounter permissions errors. |
| |
Use "''adduser sbbs''" (or "''sudo adduser sbbs''" if necessary) to create the user account and "''su sbbs''" to switch to it: | :!: **Running the BBS servers/services (''sbbs'') as the system's ''root'' user is not recommended**. |
| |
$ su sbbs | Use ''adduser'' (or "''sudo adduser''" if necessary) to create the //run-as// user account (e.g. ''sbbs''). |
| $ adduser sbbs |
| |
| On Linux, it's very convenient for the run-as user to have ''sudo'' access. To achieve this, as a sudo/root user: |
| $ sudo adduser sbbs sudo |
| $ groups sbbs |
| sbbs : sbbs sudo ... |
| Belonging to the ''sudo'' group will allow the you to perform system administration functions while logged-in as the BBS //run-as// user through the use of the ''sudo'' command. |
| |
| Use the ''su'' command to switch the current user to the //run-as// user (the "''-''" specifies to //login// as that user, e.g. setting the cwd to that user's home directory): |
| |
| $ su - sbbs |
Password: | Password: |
$ whoami | $ whoami |
sbbs | sbbs |
| |
If you find it necessary to start the BBS servers/services as root, then you can have the BBS daemon (sbbs) automatically change to the Run-as User after it has bound the necessary TCP and UDP [[faq:tcpip#ports]], by setting the ''User'' value of the ''[[config:nix|[Unix]]]'' section of the ''[[dir:ctrl]]/[[config:sbbs.ini]]'' file. | If you find it necessary to start the BBS servers/services as the ''root'' user, then you can have the BBS daemon (''sbbs'') automatically change to the //Run-as User// after it has bound the necessary TCP and UDP [[faq:tcpip#ports]], by setting the ''User'' value of the ''[[config:nix|[Unix]]]'' section of the ''[[dir:ctrl]]/[[config:sbbs.ini]]'' file. |
| |
===== Creating the Synchronet Directory ===== | ===== Creating the Synchronet Directory ===== |
You must create the directory where Synchronet will live. Some common locations would be the ''home'' directory of the Run-as User (e.g. ''/home/sbbs/sbbs'') or the system root directory (e.g. ''/sbbs''). | You must create the directory where Synchronet will live. Some common locations would be the ''home'' directory of the Run-as User (e.g. ''/home/sbbs/sbbs'') or the system root directory (e.g. ''/sbbs''). The information below will assume you are logged in as the user "sbbs". |
| |
By default, Synchronet executables will look for files in the ''/sbbs/ctrl'' directory, so if you install Synchronet into a different directory you will need to either create a symbolic link in your root directory (e.g. ''ln -s /home/sbbs/sbbs /'') or set the ''[[config:env#SBBSCTRL]]'' environment variable accordingly. | By default, Synchronet executables will look for files in the ''/sbbs/ctrl'' directory, so if you install Synchronet into a different directory you will need to either create a symbolic link in your root directory (e.g. ''ln -s /home/sbbs/sbbs /'') or set the ''[[config:env#SBBSCTRL]]'' environment variable accordingly. |
| |
- ''$ [[install:nix:createdir|mkdir /sbbs]]'' | For example, to create your Synchronet directory in ''/sbbs'', you could do the following: |
- ''$ [[install:nix:chdir|cd /sbbs]]'' | |
| - ''$ [[install:nix:createdir|sudo mkdir /sbbs]]'' <- (you would likely be prompted for your password to use "sudo") |
| - ''$ [[install:nix:createdir|sudo chown sbbs:sbbs /sbbs]]'' <- (this will change directory ownership to the "sbbs" user and group) |
| - ''$ [[install:nix:chdir|cd /sbbs]]'' <- (puts you in the /sbbs directory as the "sbbs" user) |
| |
| Alternatively, to create your Synchronet directory in your Run-as User's home directory (e.g. ''/home/sbbs''), you could do the following: |
| - ''$ [[install:nix:createdir|mkdir ~/sbbs]]'' |
| - ''$ [[install:nix:chdir|cd ~/sbbs]]'' <- (puts you in the ''/home/sbbs/sbbs'' directory as the "sbbs" user) |
| |
The remaining steps assume that the current working directory is your Synchronet installation directory: | The remaining steps assume that the current working directory is your Synchronet installation directory: |
$ pwd | $ pwd |
/sbbs | /sbbs |
| |
| or: |
| |
| $ pwd |
| /home/sbbs/sbbs |
| |
===== Getting/Building ===== | ===== Getting/Building ===== |
=== Build === | === Build === |
| |
Choose a build method (using [[dev:Git]] or Tarball): | Choose a build method (using [[dev:Git]] or Tarball)((The Git install method is preferred/recommended)): |
| |
==== Using Git ==== | ==== Using Git ==== |
Quick installation from [[dev:Git]] (requires 100+MB of disk space): | Quick installation from [[dev:Git]] (requires 100+MB of disk space): |
| |
* ''$ [[install:nix:fetch makefile|wget]] [[https://gitlab.synchro.net/main/sbbs/-/raw/master/install/GNUmakefile]] '' | * ''$ [[install:nix:fetch makefile|wget]] [[https://gitlab.synchro.net/main/sbbs/-/raw/master/install/GNUmakefile]]'' |
| |
To get and build the latest code without Linux-DOSEMU support: | To get and build the latest code: |
| |
* ''$ [[install:nix:make|make]] install SYMLINK=1'' | * ''$ [[install:nix:make|make]] install SYMLINK=1'' |
| |
Or, if you intend on using [[howto:DOSEMU]] on Linux-x86/x64 (for running 16-bit DOS doors), use the following ''make'' command-line instead: | On Linux, it's normal that the user's password may be prompted for near the end of the build process, as required to invoke the ''sudo setcap'' command to enable low-port-binding capability on the Synchronet ''sbbs'' executable. |
| |
* ''$ [[install:nix:make|make]] install SYMLINK=1 **USE_DOSEMU=1**'' | If building on a Linux system as a user without ''sudo'' access, pass the ''NOCAP=1'' option to disable this function((there are other methods of enabling low-port binding on Linux systems)): |
| |
Or, if you want to build a stable release from Git, specify a valid release [[dev:tags|tag]] on the make command-line (e.g. ''sbbs318b''): | * ''$ [[install:nix:make|make]] install SYMLINK=1 NOCAP=1'' |
| |
| Or, if you want to build a stable release from Git, specify a valid release [[dev:tags|tag]] on the make command-line (e.g. ''sbbs319b''): |
* ''$ [[install:nix:make|make]] install SYMLINK=1 **TAG=sbbs3xxx**'' | * ''$ [[install:nix:make|make]] install SYMLINK=1 **TAG=sbbs3xxx**'' |
* **NOTE**: this does not work with current release tags, use the Tarball install method instead | * **NOTE**: this does not work with release tags earlier than ''sbbs319b'', use the Tarball install method instead for those. |
| |
**Notes**: | **Notes**: |
* These commands will make and install a //RELEASE// build of the software. To make and install a //DEBUG// build instead, pass ''DEBUG=1'' on the ''make'' command-lines. | * These commands will make and install a //RELEASE// build of the software. To make and install a //DEBUG// build instead, pass ''DEBUG=1'' on the ''make'' command-lines. |
* We don't support parallel builds (e.g. ''make -j'') - so don't do that. | * We don't support parallel builds (e.g. ''make -j'') - so don't do that. |
* On //Linux// systems, your user password will be prompted for to execute the ''sudo setcap'' command during install. If this is a problem, you can remove the reference to ''setcap'' from the downloaded GNUmakefile before ''make'' is invoked. | * On //Linux// systems, your user password will be prompted for to execute the ''sudo setcap'' command during install. If this is a problem, you can include ''NOCAP=1'' on the ''make'' command-line to bypass that step. |
| * Mirrors of the ''install/GNUmakefile'' are available at |
| * [[https://github.com/SynchronetBBS/sbbs/raw/master/install/GNUmakefile]] |
| * [[https://gitlab.com/SynchronetBBS/sbbs/-/raw/master/install/GNUmakefile]] |
| |
=== Result === | === Result === |
If you installed with the ''SYMLINK=1'' option, the resulting installation directory tree should look like this: | If you installed with the ''SYMLINK=1'' option, the resulting installation directory tree should look like this: |
<code> | <code> |
drwxrwx--- 3 rswindell sbbs 4096 Sep 30 18:47 ctrl | drwxr-xr-x 1 sbbs sbbs 2418 Jan 26 23:24 ctrl |
lrwxrwxrwx 1 rswindell sbbs 30 Sep 30 18:47 docs -> /home/rswindell/test/repo/docs | lrwxrwxrwx 1 sbbs sbbs 25 Jan 26 21:03 docs -> /home/sbbs/sbbs/repo/docs |
lrwxrwxrwx 1 rswindell sbbs 30 Sep 30 18:47 exec -> /home/rswindell/test/repo/exec | lrwxrwxrwx 1 sbbs sbbs 25 Jan 26 21:03 exec -> /home/sbbs/sbbs/repo/exec |
-rw-rw---- 1 rswindell sbbs 10641 Sep 30 19:04 GNUmakefile | -rw-r--r-- 1 sbbs sbbs 11001 Jan 26 20:51 GNUmakefile |
drwxrwx--- 2 rswindell sbbs 4096 Sep 30 18:47 node1 | drwxr-xr-x 1 sbbs sbbs 116 Jan 26 21:07 node1 |
drwxrwx--- 14 rswindell sbbs 4096 Sep 30 18:37 repo | drwxr-xr-x 1 sbbs sbbs 48 Jan 26 21:06 node2 |
lrwxrwxrwx 1 rswindell sbbs 30 Sep 30 18:47 text -> /home/rswindell/test/repo/text | drwxr-xr-x 1 sbbs sbbs 48 Jan 26 21:06 node3 |
lrwxrwxrwx 1 rswindell sbbs 29 Sep 30 18:47 web -> /home/rswindell/test/repo/web | drwxr-xr-x 1 sbbs sbbs 48 Jan 26 21:06 node4 |
lrwxrwxrwx 1 rswindell sbbs 32 Sep 30 18:58 webv4 -> /home/rswindell/test/repo/webv4/ | drwxr-xr-x 1 sbbs sbbs 240 Jan 26 20:58 repo |
lrwxrwxrwx 1 rswindell sbbs 30 Sep 30 18:47 xtrn -> /home/rswindell/test/repo/xtrn | lrwxrwxrwx 1 sbbs sbbs 25 Jan 26 21:03 text -> /home/sbbs/sbbs/repo/text |
| lrwxrwxrwx 1 sbbs sbbs 24 Jan 26 21:03 web -> /home/sbbs/sbbs/repo/web |
| lrwxrwxrwx 1 sbbs sbbs 26 Jan 26 21:03 webv4 -> /home/sbbs/sbbs/repo/webv4 |
| lrwxrwxrwx 1 sbbs sbbs 25 Jan 26 21:03 xtrn -> /home/sbbs/sbbs/repo/xtrn |
</code> | </code> |
| |
Due to the symbolic directory links (represented with ''->'' arrows above), subsequent ''[[howto:git]] pull'' operations (in the ''sbbs/repo'' directory) will automatically update the ''docs'', ''[[dir:exec]]'', ''[[dir:text]]'', ''[[dir:web]]'', ''webv4'', and ''[[dir:xtrn]]'' directories. This means that any //local changes// (configurations or customizations) of files in **those** directories may need to be merged with any upstream changes later. Most configuration files are located in the ''[[dir:ctrl]]'' directory so they are automatically excluded from any update/merge issues. | Due to the symbolic directory links (represented with ''->'' arrows above), subsequent ''[[howto:git]] pull'' operations (in the ''sbbs/repo'' directory) will automatically update the ''docs'', ''[[dir:exec]]'', ''[[dir:text]]'', ''[[dir:web]]'', ''[[dir:webv4]]'', and ''[[dir:xtrn]]'' directories. This means that any //local changes// (configurations or customizations) of files in **those** directories may need to be merged with any upstream changes later. Most configuration files are located in the ''[[dir:ctrl]]'' directory so they are automatically excluded from any update/merge issues. |
| |
**Notes**: | **Notes**: |
- ''$ echo RELEASE=1 > src/build/localdefs.mk'' | - ''$ echo RELEASE=1 > src/build/localdefs.mk'' |
- ''$ cd src/sbbs3'' | - ''$ cd src/sbbs3'' |
- ''$ echo USE_DOSEMU=1 > localdefs.mk''((Only if you intend to use Linux-DOSEMU)) | |
- ''$ SBBSEXEC=/sbbs/exec [[install:nix:make|make]] symlinks''((include the 'setcap' target if you intend to use Linux-capabilities to bind low ports)) | - ''$ SBBSEXEC=/sbbs/exec [[install:nix:make|make]] symlinks''((include the 'setcap' target if you intend to use Linux-capabilities to bind low ports)) |
- ''$ SBBSCTRL=/sbbs/ctrl /sbbs/exec/jsexec update.js'' | - ''$ SBBSCTRL=/sbbs/ctrl /sbbs/exec/jsexec update.js'' |
| |
If you want to build a stable release, replace the archive filenames above with valid release filenames: | If you want to build a stable release, replace the archive filenames above with valid release filenames: |
- replace ''sbbs_src.tgz'' with ''ssrc**318b**.tgz'' | - replace ''sbbs_src.tgz'' with ''ssrc**319b**.tgz'' |
- replace ''sbbs_run.tgz'' with ''srun**318b**.tgz'' | - replace ''sbbs_run.tgz'' with ''srun**319b**.tgz'' |
| |
==Using System Libraries== | ==Using System Libraries== |
==== Errors ==== | ==== Errors ==== |
| |
* The following error indicates that you failed to install the ''libncurses-dev'' [[install:nix:prerequisites|prerequisite]]: | * The following error indicates that you failed to install the ''libncurses-dev'' (or ''libncursesw5-dev'') [[install:nix:prerequisites|prerequisite]]: |
| |
fatal error: curses.h: No such file or directory | fatal error: curses.h: No such file or directory |
* The following error indicates you specified an ''install'' make target without the ''[[config:env#SBBSCTRL]]'' or ''[[config:env#SBBSEXEC]]'' environment variable set. | * The following error indicates you specified an ''install'' make target without the ''[[config:env#SBBSCTRL]]'' or ''[[config:env#SBBSEXEC]]'' environment variable set. |
| |
make: Nothing to be done for 'install'. | make: *** No rule to make target 'install'. Stop. |
| |
* The following compilation error indicates that the //wide// variant of the ''ncurses'' library has not been [[install:nix:prerequisites|installed]]: | * The following compilation error indicates that the //wide character// variant of the ''ncurses'' library has not been [[install:nix:prerequisites|installed]]: |
| |
error: unknown type name 'wint_t' | error: unknown type name 'wint_t' |
Some third parties make unsupported tarballs available from their own sites. Using them is not recommended or supported. Whenever possible you should build yourself. | Some third parties make unsupported tarballs available from their own sites. Using them is not recommended or supported. Whenever possible you should build yourself. |
| |
^ OS ^ Platform ^ Provided By ^ Date ^ Archive ^ | ^ OS ^ Platform ^ Provided By ^ Date ^ Archive ^ |
| Debian 9.1 (stretch) | amd64 | [[person:digital_man]] | Every morning (PT) | [[ftp://ftp.synchro.net/sbbs_dev.tgz|sbbs_dev.tgz]] [[ftp://ftp.synchro.net/sbbs_run.tgz|sbbs_run.tgz]] | | | Debian (testing) | amd64 | [[person:digital_man]] | Every morning (PT) | [[ftp://ftp.synchro.net/sbbs_dev.tgz|sbbs_dev.tgz]] [[ftp://ftp.synchro.net/sbbs_run.tgz|sbbs_run.tgz]] | |
| |
===== Configuring ===== | ===== Configuring ===== |
==== Daemon Mode ==== | ==== Daemon Mode ==== |
| |
You can install Synchronet to run as a daemon (background service, usually preferred). | You can install Synchronet to run as a daemon (background service, this is usually preferred). |
| |
You must be 'root' to install daemons on Unix/Linux. | You must be 'root' or have ''sudo'' permissions to install daemons on Unix/Linux. |
| |
=== Linux === | === Linux === |
| |
- ''# cd /etc/init.d'' | |
- ''# [[https://gitlab.synchro.net/main/sbbs/-/raw/master/install/init.d/sbbs|wget https://gitlab.synchro.net/main/sbbs/-/raw/master/install/init.d/sbbs]]'' or ''[[https://gitlab.synchro.net/main/sbbs/-/raw/master/install/init.d/sbbs.debian|sbbs.debian]]'' or ''[[https://gitlab.synchro.net/main/sbbs/-/raw/master/install/init.d/sbbs.gentoo|sbbs.gentoo]]'' | |
- ''# chmod +x sbbs'' | |
- ''# /etc/init.d/sbbs start'' | |
| |
See [[monitor:syslog]], [[monitor:umonitor]], [[monitor:gtkmonitor]] and [[util:node]] for details on options for monitoring the Synchronet daemon while it's running in the background: | |
| |
# /etc/init.d/sbbs status | |
Synchronet BBS services status: [running] | |
PID(s): 25171 | |
| |
== Red Hat == | |
| |
If using a Red Hat based Linux (e.g. Fedora), you may need to add the Synchronet system service to your startup configuration for the ''sbbs'' daemon to start automatically during system startup: | |
| |
# chkconfig --add sbbs | |
| |
== Debian (systemd) == | == Debian (systemd) == |
| |
Modern Debian-based Linux systems use [[https://wiki.debian.org/systemd|systemd]] to start and control system services (daemons). See [[howto:systemd]] for detailed instructions on configuring Synchronet as a daemon that is started automatically and controlled via systemd. | Modern Debian-based Linux systems (including **Ubuntu**) use [[https://wiki.debian.org/systemd|systemd]] to control (e.g. start/stop) and monitor system services (daemons). See [[howto:systemd]] for detailed instructions on configuring Synchronet as a daemon that is started automatically and controlled via systemd. |
| |
== Debian (SysVinit) == | == Debian (SysVinit) == |
# update-rc.d sbbs enable 2 3 4 5 | # update-rc.d sbbs enable 2 3 4 5 |
| |
| |
| == Red Hat== |
| |
| If using a Red Hat based Linux (e.g. Fedora), you may need to add the Synchronet system service to your startup configuration for the ''sbbs'' daemon to start automatically during system startup: |
| |
| # chkconfig --add sbbs |
| |
| == System V Init == |
| |
| - ''# cd /etc/init.d'' |
| - ''# [[https://gitlab.synchro.net/main/sbbs/-/raw/master/install/init.d/sbbs|wget https://gitlab.synchro.net/main/sbbs/-/raw/master/install/init.d/sbbs]]'' or ''[[https://gitlab.synchro.net/main/sbbs/-/raw/master/install/init.d/sbbs.debian|sbbs.debian]]'' or ''[[https://gitlab.synchro.net/main/sbbs/-/raw/master/install/init.d/sbbs.gentoo|sbbs.gentoo]]'' |
| - ''# chmod +x sbbs'' |
| - ''# /etc/init.d/sbbs start'' |
| |
| See [[monitor:syslog]], [[monitor:umonitor]], [[monitor:gtkmonitor]] and [[util:node]] for details on options for monitoring the Synchronet daemon while it's running in the background: |
| |
| # /etc/init.d/sbbs status |
| Synchronet BBS services status: [running] |
| PID(s): 25171 |
| |
| |
=== FreeBSD === | === FreeBSD === |
| |
| |
| |
===== Terminal Capabilities ===== | |
| |
As you may have noticed by now, most telnet clients designed for use with | |
ANSI BBSes do not display full-screen Unix programs correctly. Included with | |
Synchronet is a pair of terminal capability definition files that enable you | |
to run native full-screen Unix programs and have the output displayed correctly | |
in a standard ANSI-BBS terminal. These files are ''termcap'' and ''terminfo'', | |
located in your Synchronet install directory. Your system will use one or the | |
other, and it won't hurt to install both. You will need to be logged in as | |
root to install the files. | |
| |
==== Installing the terminfo file ==== | |
| |
1) Get the Synchronet ANSI-BBS terminfo file from | |
[[https://gitlab.synchro.net/main/sbbs/-/raw/master/install/terminfo|here]]. | |
| |
2) Enter the command: | |
# tic terminfo | |
| |
==== Installing the termcap file ==== | |
| |
1) Get the Synchronet ANSI-BBS termcap file from | |
[[https://gitlab.synchro.net/main/sbbs/-/raw/master/install/termcap|here]]. | |
| |
2) Enter the command: | |
# cat termcap >> /etc/termcap | |
| |
3) **FreeBSD Only** run the command: | |
# cap_mkdb -f /usr/share/misc/termcap /etc/termcap | |
| |
Once the terminal capability files are installed, edit the ''ExternalTermANSI'' | |
value in the ''[BBS]'' section of your ''[[:config:sbbs.ini]]'' file to read: | |
ExternalTermANSI=ansi-bbs | |
| |
Note: The default value of the ''ExternalTermANSI'' ''[[:config:sbbs.ini]]'' key is ''pc3''. If you get an error ''Unknown terminal: pc3'' from external programs, it means that this key value has not been set to a valid terminal type. | |
| |
Note: Once again, many Linux distros do not have a termcap. This is fine. | |
You do NOT need to install the termcap-compat package. If termcap | |
isn't installed, it means nothing uses it. Only if there is a | |
termcap do you need to add the ''ansi-bbs'' termcap definition. | |
| |
===== A note on SysOp paging ===== | ===== A note on SysOp paging ===== |
| |
* [[:monitor:gtkmonitor]] | * [[:monitor:gtkmonitor]] |
* [[:install:nix:Prerequisites]] | * [[:install:nix:Prerequisites]] |
| * [[:install:nix:mail|Installing Synchronet as your UNIX mail system]] |
| * [[:install:nix:termcaps|Installing ANSI-BBS Terminal Capabilities]] |
* [[:howto:freebsd_non-root|How to run sbbs for FreeBSD as a non-root user]] | * [[:howto:freebsd_non-root|How to run sbbs for FreeBSD as a non-root user]] |
* [[:howto:linux_non-root|How to run sbbs for Linux as a non-root user]] | * [[:howto:linux_non-root|How to run sbbs for Linux as a non-root user]] |