IBO 博客安装文档

此文档只针对于1.0.*版本,由于项目作出重大升级,1.1.*之后的版本将不再适用,谢谢各位的支持

 

如果已经使用了1.0.*版本,升级请参照:IBO 1.0.*升级1.1.*升级文档

如果未使用过ibo,请直接参照:IBO 1.1.*+ 版本服务安装与使用

 

项目地址:https://github.com/ijson/in-blog-boot

1. 首先需要安装数据库,目前支持mongodb,后期会支持跟多数据库,其中也会支持关系型数据,

安装Mongodb教程如下

后期其他系统的安装教程完善后,会在此补充

 

2. 修改项目resources/autoconf/in-blog-mongodb文件

# mongodb地址,默认端口27017,如果需要密码,则需要将密码写到地址上,
# mongo.servers=mongodb://用户名:密码@localhost:27017
mongo.servers = mongodb://localhost
# mongodb 数据库
mongo.dbName = test

#存储db的entity映射,不需要修改
mongo.mapPackage = com.ijson.blog.dao.entity
mongo.connectTimeout = 5000
mongo.socketTimeout = 10000

#是否启用密码,如果mongo.servers上添加了密码,则此处必须为true
encrypt.pwd=false

process.server.id=1

 

3. 修改resource/application.properties文件

 

server.servlet.session.timeout = 1800s
server.tomcat.max-threads=0
server.torestartmcat.uri-encoding=UTF-8
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.cache=false
spring.thymeleaf.encoding=UTF-8
spring.devtools.restart.enabled=true
spring.devtools.restart.additional-paths=resources/**,static/**,templates/**
debug:true
beetl.suffix=html
spring.cache.ehcache.config=ehcache.xml
#单个文件的最大上限
spring.servlet.multipart.max-file-size=100MB
#总数据的大小
spring.servlet.multipart.max-request-size=1000MB


#################################↓↓↓以下为可自定义配置↓↓↓####################
# 服务端口
server.port=8876
# 服务地址
web.ctx=https://www.ijson.net/
# 系统管理员名称,用于展示右侧个人信息
web.ename=cuiyongxu
# 文件下载路径
cdn.server=https://atta.ijson.net/
# 文件上传到服务器路径
cdn.upload.path=/opt/data/
#################################↑↑↑以上为可自定义配置↑↑↑####################

4.初始化脚本:角色,_id 不要修改

db.getCollection('Role').insert({
    "_id":"5df63d128faa4b3ab4049cbc",
    "ename":"system",
    "cname":"系统管理员",
    "parentRoleId":"0",
    "status":"0",
    "permission":[
        {
            "ename":"admin_console_page",
            "cname":"首页",
            "path":"/admin/console/page",
            "type":"menu",
            "fatherEname":"root",
            "clickable":true
        },
        {
            "ename":"admin_post_root",
            "cname":"文章",
            "path":"/admin/post/root",
            "type":"menu",
            "fatherEname":"root",
            "clickable":false
        },
        {
            "ename":"admin_post_list_page",
            "cname":"文章列表",
            "path":"/admin/post/list/page",
            "type":"menu",
            "fatherEname":"admin_post_root",
            "clickable":true
        },
        {
            "ename":"admin_post_add_page",
            "cname":"新建/编辑文章",
            "path":"/admin/post/add/page",
            "type":"menu",
            "fatherEname":"admin_post_root",
            "clickable":true
        },
        {
            "ename":"admin_system_root",
            "cname":"系统设置",
            "path":"/admin/system/root",
            "type":"menu",
            "fatherEname":"root",
            "clickable":false
        },
        {
            "ename":"admin_i_config_page",
            "cname":"我的设置",
            "path":"/admin/i/config/page",
            "type":"menu",
            "fatherEname":"admin_system_root",
            "clickable":true
        },
        {
            "ename":"admin_edit_ename_shamId_page",
            "cname":"新建/编辑文章",
            "path":"/admin/edit/*/*/page",
            "type":"action",
            "fatherEname":"",
            "clickable":true
        },
        {
            "ename":"post_create",
            "cname":"博客创建",
            "path":"/post/create",
            "type":"action",
            "fatherEname":"",
            "clickable":true
        },
        {
            "ename":"post_enable_ename_shamId",
            "cname":"启用/禁用",
            "path":"/post/enable/*/*",
            "type":"action",
            "fatherEname":"",
            "clickable":true
        },
        {
            "ename":"post_delete_ename_shamId",
            "cname":"删除博文",
            "path":"/post/delete/*/*",
            "type":"action",
            "fatherEname":"",
            "clickable":true
        },
        {
            "ename":"post_upload",
            "cname":"博文附件上传",
            "path":"/post/upload",
            "type":"action",
            "fatherEname":"",
            "clickable":true
        },
        {
            "ename":"post_list",
            "cname":"rest 博文列表",
            "path":"/post/list",
            "type":"action",
            "fatherEname":"",
            "clickable":true
        },
        {
            "ename":"user_edit_webset",
            "cname":"编辑网站信息",
            "path":"/user/edit/webset",
            "type":"action",
            "fatherEname":"",
            "clickable":true
        },
        {
            "ename":"user_edit_base",
            "cname":"编辑基础信息",
            "path":"/user/edit/base",
            "type":"action",
            "fatherEname":"",
            "clickable":true
        },
        {
            "ename":"user_edit_contact",
            "cname":"编辑用户常用联系方式",
            "path":"/user/edit/contact",
            "type":"action",
            "fatherEname":"",
            "clickable":true
        },
        {
            "ename":"user_edit_password",
            "cname":"编辑用户密码",
            "path":"/user/edit/password",
            "type":"action",
            "fatherEname":"",
            "clickable":true
        }
    ],
    "remark":"系统管理员权限",
    "deleted":false,
    "enable":true
})

5. 初始化脚本,用户账号名称:admin,默认密码为:123456

db.getCollection('User').insert({
    "_id" : "5d596de34737fb1c7adoooof",
    "ename" : "admin",
    "cname" : "系统管理员",
    "password" : "e10adc3949ba59abbe56e057f20f883e",
    "deleted" : false,
    "enable" : true,
    "indexName" : "IBO",
    "avatar" : "https://data.ijson.net/avatar.jpg",
    "roleId" : "5df63d128faa4b3ab4049cbc"
})

6.进入项目路径下的in-blog-web子模块中,修改start.sh文件,将bash_path 修改为你项目的绝对路径

例如:我项目所在根目录为:/Users/cuiyongxu/workspace/ijson/in-blog-boot,则我bash_paht = /Users/cuiyongxu/workspace/ijson/in-blog-boot

7. 修改该start.sh 后, 执行该脚本后,服务就启动起来了,具体端口按照第3部配置进行启动

您还没有登录,请先 登录或者 注册后,添加评论
公告栏
当前开发版本 2.1.0
  • 公告栏展示
  • 打赏功能添加
  • 消息系统后端支持(回复,删除,读取)
  • 支持RSS
赞助开发

支持下作者

您的支持是我们最大的动力

...
狸猫
友情链接
INAG工具库
热门文章
最近发表