部署MongoDB
编写部署脚本
tee MongoDB.sh << EOF
yum -y install mongodb mongodb-server.x86_64 mariadb-devel.i686
systemctl start mongod
EOF
bash MongoDB.sh
部署Leanote
编写部署脚本
tee install.sh << EOF
wget https://nchc.dl.sourceforge.net/project/leanote-bin/2.6.1/leanote-linux-amd64-v2.6.1.bin.tar.gz
tar -zxvf leanote-linux-amd64-v2.6.1.bin.tar.gz
sed -i '/app.secret=/capp.secret=aabbcc' leanote/conf/app.conf
mongorestore -h localhost -d leanote --dir /root/leanote/mongodb_backup/leanote_install_data/
nohup bash /root/leanote/bin/run.sh > /root/leanote/run.log 2>&1 &
EOF
bash install.sh
修改安全组
开放9000端口
访问IP:9000 查看效果