Files
bsd-apps/README.md

68 lines
3.3 KiB
Markdown
Raw Normal View History

2024-09-11 16:22:30 -06:00
# bsd-apps
2024-09-18 21:38:15 -06:00
2024-09-12 16:42:29 -06:00
Collection of scripts to install popular applications inside FreeBSD jails, or FreeBSD host system.
2024-09-12 17:10:57 -06:00
Each application has a README file which explains some necessary steps before running the script.
2024-09-13 12:12:19 -06:00
# Setup
These scripts are designed to work inside any jail manager or FreeBSD host system. In order to get up and running, here are the necessary steps
2024-09-13 12:14:51 -06:00
1. Create a jail using your preferred jail manager
2024-09-13 12:12:19 -06:00
2. Read the insructions in each apps README file to see
- which jail properties need to be set, if any
- which directories need to be mounted, if you so choose
2024-09-15 08:22:12 -06:00
- which variables need to be set, if any
2024-09-13 12:12:19 -06:00
3. Mount your directories and set your properties and variables as needed
2024-09-13 12:14:51 -06:00
- the variables are set at the top of the app script
2024-10-13 08:38:53 -06:00
4. Start the jail, fetch the script, set variable values inside the script, and run it
2024-09-13 12:14:51 -06:00
2024-09-15 08:22:12 -06:00
It is not necessary to do any mounting if you choose not to. It just makes it easy to rebuild jails if the need comes up.
2024-09-13 12:14:51 -06:00
All jail managers have a way to set jail properties and mount directories. Check documentation.
2024-09-13 12:12:19 -06:00
# Tips
2024-09-13 12:14:51 -06:00
I like to structure my data directories that I am mounting as below
2024-09-13 12:12:19 -06:00
- apps
- app1
- data
- otherdata
- app2
- config
- data
- files
- app3
- data
This enables me to mount the corresponding directories into the jail, and keep things organized.
2024-09-12 18:34:55 -06:00
# Important
2024-09-12 17:10:57 -06:00
2024-09-12 18:34:55 -06:00
## Mount points
2024-09-12 17:10:57 -06:00
2024-11-14 07:50:12 -07:00
All of the scripts are designed to work with mount points. Every bit of data that is necessary for a reinstall is included in each apps README file. This means that jails can be destroyed and rebuilt without losing data.
2024-09-12 17:10:57 -06:00
2024-11-14 07:50:12 -07:00
If you do not want to use mount points, the script will install the apps and its data inside the jail and everything will work normally. But be warned, when you destroy the jail, the data inside it will be lost.
2024-09-13 12:12:19 -06:00
Mount points make it easy to destroy and recreate jails without losing data. Each application has a list of mount points that must be mounted if you choose to store all the data outside the jail. These scripts have all been tested by doing an initial install, then a reinstall. If the data is mounted into the jail on a reinstall, the script will skip certain steps to prevent data from being overwritten.
2024-09-13 11:41:13 -06:00
2024-09-12 18:34:55 -06:00
## Variables
2024-09-12 17:10:57 -06:00
Some of the scripts have variables that should be set before running. These could include passwords, server values, and database names. Most will be set randomly, but some require user intervention. Each applications README file will let you know what to do.
2024-10-13 08:40:52 -06:00
Variables that should be changed are listed on the README file of each app. Any variables that are not listed, should not be changed unless there is a really good reason to do so.
2024-09-15 15:34:39 -06:00
2024-09-12 18:34:55 -06:00
## Jail Properties
2024-09-12 17:10:57 -06:00
2024-10-13 08:40:52 -06:00
Some applications require certain jail properties to be activated. You will have to do so with whichever jail manager you are using. They all have a way to set jail properties.
2024-09-15 15:34:39 -06:00
2024-09-15 15:39:11 -06:00
### Set Properties Examples
2025-01-07 15:29:11 -07:00
- `iocage set allow.sysvipc=1 jailname`
2024-12-13 16:33:11 -07:00
- `bastille config jailname set allow.sysvipc 1`
2025-01-07 15:29:11 -07:00
- `pot set-attr -p jailname -A allow.sysvipc -V 1`
2024-09-15 15:39:11 -06:00
### Mount Examples
2024-09-15 15:34:39 -06:00
- `iocage fstab -a jailname /path/on/host /path/inside/jail nullfs rw 0 0`
- `bastille mount jailname /path/on/host /path/inside/jail nullfs rw 0 0`
2024-10-09 14:31:58 -06:00
- `pot mount-in -p jailname -m /path/inside/jail -f nullfs -d /path/on/host`