安装node
略
安装MongoDB
加入MongoDB仓库源
vim /etc/yum.repos.d/mongodb-org-5.0.repo
[mongodb-org-5.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/5.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-5.0.asc
通过yum安装MongoDB
yum install mongodb-org
运行MongoDB服务
systemctl start mongod.service
查看运行状态,如果状态良好,则加入自启
systemctl enable mongod.service
安装meshcentral
npm install -g meshcentral
运行meshcentral
/usr/bin/node /usr/lib/node_modules/meshcentral/meshcentral
运行完后去到meshcentral-data目录,编辑配置文件
cd /usr/lib/meshcentral-data/
vim config.json
文件内容参考
{
"$schema": "http://info.meshcentral.com/downloads/meshcentral-config-schema.json",
"__comment1__": "This is a simple configuration file, all values and sections that start with underscore (_) are ignored. Edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
"__comment2__": "See node_modules/meshcentral/sample-config-advanced.json for a more advanced example.",
"settings": {
"_cert": "域名",
"_WANonly": true,
"_LANonly": true,
"_sessionKey": "MyReallySecretPassword1",
"port": 444,
"aliasPort": 443,
"redirPort": 81,
"redirAliasPort": 80,
"mongodb": "mongodb://数据库地址+端口/meshcentral",
"mongodbcol": "meshcentral",
"Compression": true,
"WsCompression": true,
"CookieIpCheck": false,
"_TlsOffload": "127.0.0.1"
},
"domains": {
"": {
"certUrl": "访问地址",
"_title": "MyServer",
"_title2": "Servername",
"_minify": true,
"_newAccounts": true,
"_userNameIsEmail": true
}
},
"_letsencrypt": {
"__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before trying Let's Encrypt.",
"_email": "邮箱",
"_names": "域名",
"_production": false
}
}
配置域名和端口转发后即可运行