|
|
|
|
@ -1,16 +1,15 @@
|
|
|
|
|
sudo dnf -y update
|
|
|
|
|
sudo dnf -y in nano nodejs npm
|
|
|
|
|
#sudo dnf -i in mongodb
|
|
|
|
|
systemctl enable --now mongodb
|
|
|
|
|
#systemctl enable --now mongodb
|
|
|
|
|
|
|
|
|
|
sudo useradd -m -r -d /home/meshcentral -s /sbin/nologin meshcentral
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
cat <<EOF > /etc/systemd/system/meshcentral.service
|
|
|
|
|
cat <<EOF > meshcentral.service
|
|
|
|
|
[Unit]
|
|
|
|
|
Description=MeshCentral Server
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
|
|
|
|
LimitNOFILE=1000000
|
|
|
|
|
@ -24,22 +23,44 @@ Restart=always
|
|
|
|
|
RestartSec=10
|
|
|
|
|
# Set port permissions capability
|
|
|
|
|
#AmbientCapabilities=cap_net_bind_service
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
EOF
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
sudo cp meshcentral.service /etc/systemd/system/.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sudo setfacl -m u:$(whoami):rwx /home/meshcentral
|
|
|
|
|
cd /home/meshcentral
|
|
|
|
|
sudo npm install meshcentral
|
|
|
|
|
read -n1 -r -p "Press any key to continue..."
|
|
|
|
|
nano meshcentral-data/config.json
|
|
|
|
|
echo "ctrl+c to continue after testing..."
|
|
|
|
|
npm install meshcentral
|
|
|
|
|
echo "ctrl+c to continue after first run..."
|
|
|
|
|
sudo chown -R meshcentral.meshcentral /home/meshcentral
|
|
|
|
|
sudo -u meshcentral node ./node_modules/meshcentral
|
|
|
|
|
|
|
|
|
|
read -n1 -r -p "Press any key to continue..."
|
|
|
|
|
nano meshcentral-data/config.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
|
sudo systemctl enable --now meshcentral.service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#example config.json
|
|
|
|
|
#{
|
|
|
|
|
#"settings": {
|
|
|
|
|
#"MongoDb": "mongodb://127.0.0.1:27017/meshcentral",
|
|
|
|
|
#"WANonly": true,
|
|
|
|
|
#"_Port": 443,
|
|
|
|
|
#"_RedirPort": 80,
|
|
|
|
|
#"_AllowLoginToken": true,
|
|
|
|
|
#"_AllowFraming": true,
|
|
|
|
|
#"_WebRTC": false,
|
|
|
|
|
#"_ClickOnce": false,
|
|
|
|
|
#"_UserAllowedIP" : "127.0.0.1,::1,192.168.0.100"
|
|
|
|
|
#},
|
|
|
|
|
#...
|
|
|
|
|
#}
|