/srv/ -> /usr/local/bin

This commit is contained in:
mic0 2025-11-19 15:40:22 +01:00
parent 1ffe051982
commit 68a0901489
No known key found for this signature in database
GPG Key ID: BE627E39EE3FE70C
3 changed files with 12 additions and 6 deletions

View File

@ -13,7 +13,7 @@ Prepare a new machine for use with an `admin` user. Lock out everything but SSH
## [Installing aplications and build tools](applications.md) ## [Installing aplications and build tools](applications.md)
Download packages to build future applications such as NodeJS / Rust. Download packages to build future applications such as NodeJS / Rust.
Set up your apps in `/srv/` partition. Set up your apps on `/usr/local/bin/` path.
## [Firewall (opening/checking ports)](firewall.md) ## [Firewall (opening/checking ports)](firewall.md)

View File

@ -1,15 +1,21 @@
# Installing applications and their dependencies # Installing applications and their dependencies
## Put your apps in `/srv/` ## Put your apps in `/usr/local/bin/`
Do not just install stuff in `/home/` dirs. Do not just install stuff in `/home/` dirs.
Rather `git clone` the repos to your home and then move it to `/srv/` partition. Rather `git clone` the repos to your home and then move it to `/usr/local/bin/` partition.
If SELinux is turned on you might also wanna do `restorecon` to let `systemctl` service be able to use it.
```sh ```sh
sudo mv your_repo /srv/your_repo sudo mv your_repo /usr/local/bin/your_repo
restorecon -Rv /usr/local/bin/your_repo
``` ```
This will reset
This way other users of the system can also access and use your app without letting them into your $HOME. This way other users of the system can also access and use your app without letting them into your $HOME.
## Installing NodeJS ## Installing NodeJS

View File

@ -26,9 +26,9 @@ Wants=network.target
[Service] [Service]
# Set the working directory where your binary resides # Set the working directory where your binary resides
WorkingDirectory=/srv/YOUR_PATH WorkingDirectory=/usr/local/bin/YOUR_PATH
# Absolute path to your binary # Absolute path to your binary
ExecStart=/srv/YOUR_PATH/target/release/BINARY_NAME ExecStart=/usr/local/bin/YOUR_PATH/target/release/BINARY_NAME
# Ensure the service restarts on failure # Ensure the service restarts on failure
Restart=always Restart=always