Mise à jour de 'mcsetup_cs9.sh'
This commit is contained in:
1 parent
86aaf26fd1
commit
66dd43910a
1 file changed
+29
-8
+29
-8
@@ -1,16 +1,15 @@
|
|||||||
sudo dnf -y update
|
sudo dnf -y update
|
||||||
sudo dnf -y in nano nodejs npm
|
sudo dnf -y in nano nodejs npm
|
||||||
#sudo dnf -i in mongodb
|
#sudo dnf -i in mongodb
|
||||||
systemctl enable --now mongodb
|
#systemctl enable --now mongodb
|
||||||
|
|
||||||
sudo useradd -m -r -d /home/meshcentral -s /sbin/nologin meshcentral
|
sudo useradd -m -r -d /home/meshcentral -s /sbin/nologin meshcentral
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
cat <<EOF > /etc/systemd/system/meshcentral.service
|
cat <<EOF > meshcentral.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=MeshCentral Server
|
Description=MeshCentral Server
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
LimitNOFILE=1000000
|
LimitNOFILE=1000000
|
||||||
@@ -24,22 +23,44 @@ Restart=always
|
|||||||
RestartSec=10
|
RestartSec=10
|
||||||
# Set port permissions capability
|
# Set port permissions capability
|
||||||
#AmbientCapabilities=cap_net_bind_service
|
#AmbientCapabilities=cap_net_bind_service
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
|
sudo cp meshcentral.service /etc/systemd/system/.
|
||||||
|
|
||||||
|
|
||||||
|
sudo setfacl -m u:$(whoami):rwx /home/meshcentral
|
||||||
cd /home/meshcentral
|
cd /home/meshcentral
|
||||||
sudo npm install meshcentral
|
npm install meshcentral
|
||||||
read -n1 -r -p "Press any key to continue..."
|
echo "ctrl+c to continue after first run..."
|
||||||
nano meshcentral-data/config.json
|
|
||||||
echo "ctrl+c to continue after testing..."
|
|
||||||
sudo chown -R meshcentral.meshcentral /home/meshcentral
|
sudo chown -R meshcentral.meshcentral /home/meshcentral
|
||||||
sudo -u meshcentral node ./node_modules/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 daemon-reload
|
||||||
sudo systemctl enable --now meshcentral.service
|
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"
|
||||||
|
#},
|
||||||
|
#...
|
||||||
|
#}
|
||||||
Reference in new issue
Block a user