feat: add group and user creation setup

This commit is contained in:
dancingCycle 2022-02-12 14:07:23 -05:00
parent 99a2c908f7
commit ce39938a0a
4 changed files with 58 additions and 2 deletions

View File

@ -16,6 +16,7 @@ Documentation for artitrary setups
* [Setup RDP Client](doc/setup-rdc.md)
* [Setup PM2](doc/setup-pm2.md)
* [Setup NPM](doc/setup-npm.md)
* [Create Group and User](doc/create-grp-usr.md)
* To-do List
* gitk
* Java

27
doc/create-grp-usr.md Normal file
View File

@ -0,0 +1,27 @@
# Create Group And User
* make shure group or user to be created does not exist yet
```
id <group or user name>
```
* create system group
```
sudo groupadd -r <group name>
```
* create system user with specific login shell and group
```
sudo useradd -r -s /bin/false -g <group name> <user name>
```
* print real and group and user id
```
id <group or user name>
```
* extract group and user details from OS configuration
```
cat /etc/group|grep <group name>
cat /etc/passwd|grep <group name>
```

View File

@ -0,0 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Software Ingenieur Begerad <swingbe.de>
*
* SPDX-License-Identifier: CC0-1.0
*/

View File

@ -5,7 +5,30 @@
sudo apt update
```
* use install script for installation on Debian
* globally install the latest stable version of PM2 via npm
```
sudo apt install sudo curl && curl -sL https://raw.githubusercontent.com/Unitech/pm2/master/packager/setup.deb.sh | sudo -E bash -
sudo npm i -g pm2
```
* create group and user ```pm2``` following this [setup](create-grp-usr.md)
# Helpful PM2 instructions
* list all node application (process/microservices)
```
pm2 list
```
* monitor logs, custom metrics, process information from all processes
```
pm2 monit
```
* view details of a single Node.js process using the process ID or name
```
pm2 show <process ID or name
```
* update PM2 package
```
pm2 update
```