centos 搭建 leanote
centos 搭建leanote(蚂蚁笔记)
至于蚂蚁笔记是什么可以看官网的介绍,https://leanote.com/ ,我只能说 nice,你值得拥有.
开始搭建(源码安装,安装路径在 /etc/local/leanote)
1.安装GOlang
下载:
mkdir /usr/local/leanote cd /usr/local/leanote wget https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz
解压go:
tar -zxvf go1.10.1.linux-amd64.tar.gz

新建文件夹放go的包:
mkdir /usr/local/leanote/gopackge
配置环境变量, 编辑/etc/profile文件:
vim /etc/profile
export GOROOT=/usr/local/leanote/go export GOPATH=/usr/local/leanote/gopackage export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
重新启动配置,让配置生效:
source /etc/profile
1.2 查看go 是否安装成功
go version

2、获取Revel和 Leanote 的源码
wget https://github.com/leanote/leanote-all/archive/master.zip
unzip master.zip
cp -r leanote-all-master/src/ /usr/local/leanote/gopackage/
(如果机器没有安装unzip , 那么 yum install unzip )
go install github.com/revel/cmd/revel
3、安装Mongodb
下载和解压:
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.6.3.tgz
tar -zxvf mongodb-linux-x86_64-amazon-3.6.3.tgz
增加mongodb的配置文件并重启:
vim /etc/profile
export PATH=$PATH:/usr/local/leanote/mongodb-linux-x86_64-amazon-3.6.3/bin
source /etc/profile
新建存储leanote的数据:
mkdir /usr/local/leanote/data
导入leanote 的数据:
mongorestore -h localhost -d leanote --dir /usr/local/leanote/gopackage/src/github.com/leanote/leanote/mongodb_backup/leanote_install_data
启动mongo:
mongod --dbpath /usr/local/leanote/data
mongod 已经启动,重新开一个窗口,进入mongod的数据库
mongo // 进入
show dbs // 显示所有数据库名
use leanote // 使用leanote数据库
// 创建一个root 用户
db.createUser({
user: 'root',
pwd: 'wangtao',
roles: [{role: 'dbOwner', db: 'leanote'}]
})
db.auth("root", "wangtao");
(返回 1 表示正确 )
出于安全考虑 修改leanote的配置文件app.conf 位置
/usr/local/leanote/gopackage/src/github.com/leanote/leanote/conf // 这个路径别搞错了 不然你修改了都不知道错误在哪里
将 app.secret一项, 在若干个随机位置处,将字符修改成一个其他的值, 下面的root 和密码相应的修改
db.host=localhost
db.port=27017
db.dbname=leanote # required
db.username=root # if not exists, please leave blank
db.password=wangtao# if not exists, please leave blan
app.conf 文件内容如下:

现在不妨看看刚刚导入的leanote数据
show dbs
use leanote
show collections

设置mongod 后台运行,(客户端连接服务器,客户端关闭就断开连接)
mongod --fork --dbpath=/usr/local/leanote/data --logpath=/var/log/mongodb/mongodb.log --logappend
4.leanote 设置后台运行
nohup revel run github.com/leanote/leanote >& &
5. 奔跑吧,leanote
你的服务器ip:9000, 域名访问博客:http://blog.wtodd.wang

到这里部署leanote 已经结束,刚部署成功就立即记录下了这个笔记,这是第一篇文章,接下来怎么利用自己的域名来合理运用这个蚂蚁笔记,(下回分解)
码字截图不易,转载请说明出处,如有错区敬请指出,若按照此方法搭建不成功,请联系小编,帮助解决。
centos 搭建 leanote的更多相关文章
- CentOS 搭建LNMP服务器和LAMP服务器
CentOS 搭建LNMP服务器 方法一:yum安装 1.更新YUM源 wget http://www.atomicorp.com/installers/atomic #下载atomic自动更新Y ...
- 在CentOS搭建Git服务器 转
在CentOS搭建Git服务器 来自 :http://www.jianshu.com/p/69ea5ded3ede 前言 我们可以GitHub发布一些开源代码的公共仓库,但对于私密仓库就需要收费了.公 ...
- [记录]CentOS搭建SVN服务器(主从同步)
CentOS搭建SVN服务器(主从同步)1.安装步骤如下: 1)安装: #yum install subversion 2)查看安装位置: #rpm -ql subversion 3)查看版本: #/ ...
- CentOS搭建Git服务器及权限管理
声明:本教程,仅作为配置的记录,细节不展开,需要您有一点linux的命令基础,仅作为配置参考. 1. 系统环境 系统: Linux:CentOS 7.2 64位 由于CentOS已经内置了OpenSS ...
- CentOS搭建OpenVPN以及WIN&Android&iOS的安装连接
OpenVPNhttp://info.swufe.edu.cn/vpn/openvpn/#2 苹果.安卓智能手机openvpn的设置_百度经验https://jingyan.baidu.com/art ...
- 基于 CentOS 搭建 WordPress 个人博客
欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 腾讯云提供了开发者实验室帮助用户搭建 WordPress 个人博客,教程内容如下,用户可以点击开发者实验室快速上机完成实验. 准备 LNMP ...
- Centos 搭建activemq
Centos 搭建activemq 1,官方下载 http://activemq.apache.org/activemq-5122-release.html apache-activemq-5.15 ...
- CentOS搭建xfce桌面+VNC教程
CentOS搭建xfce桌面+VNC教程 Linux的安全与性能向来为开发者所称道,你可以轻松地在搜索引擎中找到各种Linux优越性的说辞,其中不乏Linux的激进者.特别是当你步入VPS领域,更多地 ...
- CentOS搭建yum源及EPEL仓库
一.CentOS搭建yum源 1.备份配置文件 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backu ...
随机推荐
- IntelliJ IDEA 2018.3 重大升级,哪些功能打动了你?
前言 2018.11.28 IntelliJ IDEA 2018.3 正式版发布.对于一个忠实爱好者,迫不及待的我下载了最新版本来体验下.而且 IDEA 今年的第三次重大更新提供了不容错过的显著功能! ...
- Java实现动态修改Jar包内文件内容
import java.io.*; import java.util.Enumeration; import java.util.LinkedList; import java.util.List; ...
- centos 6.8 搭建svn服务器
1. yum remove subversion #卸载 svn服务 2.下载svn服务器安装包 yum -y install subversion 3.创建SVN版本库 mkdir -p /opt/ ...
- oracle:TNS:监听程序无法分发客户机连接
挂上vpn的时候,PL/SQL连接到oracle的时候,显示ORA-12518:监听程序无法分发客户机连接.如下图: 一.[问题描述] 最近,在系统高峰期的时候,会提示如上的错误,致使无法连接到服务器 ...
- js05-DOM对象二
一.节点操作 创建节点:var ele_a = document.createElement('a');添加节点:ele_parent.appendChild(ele_img);删除节点:ele_pa ...
- gson常用的方式
gson提供的fromJson()方法来实现从Json相关对象到Java实体的方法. 第一种.Json格式转成单一实体对象和转换成对象列表或者其他结构 第二种.转换成列表类型 注:TypeToken: ...
- 安装 Power BI 报表服务器
开始之前 建议在安装 Power BI 报表服务器之前先查看安装 Power BI 报表服务器所要满足的硬件和软件要求. Power BI 报表服务器产品密钥 Power BI Premium 如果已 ...
- ☆ [POI2007] ZAP-Queries 「莫比乌斯反演」
题目类型:莫比乌斯反演 传送门:>Here< 题意:求有多少对正整数对\((a,b)\),满足\(0<a<A\),\(0<b<B\),\(gcd(a,b)=d\) ...
- Java中String连接性能的分析【转】
[转]http://www.blogjava.net/javagrass/archive/2010/01/24/310650.html 总结:如果String的数量小于4(不含4),使用String. ...
- 内网ntp时间同步配置
选择局域网中的一台机器作为ntp服务器,在ntp server上安装并启动ntpd客户端上要关闭ntpd,安装ntpdateCentOS7上这两个软件都是自带的,只需根据需要打开或者关闭.注意客户端机 ...