欢迎光临散文网 会员登陆 & 注册

一气之下,我自己搭了个云笔记!!手把手带你打造一个属于自己的免费云笔记,神清气爽

2022-05-07 17:22 作者:GoalWJW  | 我要投稿

云笔记

项目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]端口
==================================================================

安装必要软件

  • MongoDB
  • Nginx

部署项目

  • 进入目录
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/
  • 进入项目下的bin目录
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;

  }
}


一气之下,我自己搭了个云笔记!!手把手带你打造一个属于自己的免费云笔记,神清气爽的评论 (共 条)

分享到微博请遵守国家法律