云笔记
项目github仓库
https://github.com/leanote/leanote
安装宝塔
下载安装宝塔
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
相关信息
==================================================================
Congratulations! Installed successfully!
==================================================================
外网面板地址: http://xxx.xxx.xxx.xxx:8888/xxxxx
内网面板地址: http://xxx.xxx.xxx.xxx:8888/xxxxx
username: xxxxxx
password: xxxxxx
If you cannot access the panel,
release the following panel port [8888] in the security group
若无法访问面板,请检查防火墙/安全组是否有放行面板[8888]端口
==================================================================
安装必要软件
部署项目
cd /home/www
wget --no-check-certificate https://sourceforge.net/projects/leanote-bin/files/2.6.1/leanote-linux-amd64-v2.6.1.bin.tar.gz
tar -zxvf leanote-linux-amd64-v2.6.1.bin.tar.gz
- 进入解压目录找到 leanote_install_data 并导入数据库
cd leanote/mongodb_backup/
mongorestore -h localhost -d leanote --dir leanote_install_data/
cd /home/www/leanote/bin
nohup bash run.sh &
- 宝塔-->安全-->系统防火墙--->放行端口9000 && 服务器安全组放行端口9000
- 访问项目 ip:9000 完成注册并登录
- Ngnix发布应用
upstream note{
server 127.0.0.1:9000;
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://note;
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for;
}
}
标签: