Giter VIP home page Giter VIP logo

beegoblog's Introduction

Beego Blog DemoBuild Status GoDoc

###Ubuntu下配置和运行本博客指南 (Windows上基本类似)

######1 安装配置Golang

  • 1.1 移除已经存在的老版本(安装的过程反过来做)

  • 1.2 下载golang压缩包[fileName] 下载地址

  • 1.3 解压缩安装

sudo tar -C /usr/local -xzf  [fileName]        //[fileName]是官网下载的golang压缩包
  • 1.4 配置环境变量
sudo gedit /etc/profile
添加配置到profile文件末尾并保存:
export GOROOT=/usr/local/go           //安装目录
export GOPATH=[yourOwnGopath]         //[yourOwnGopath]是自己选择的golang项目目录
export PATH=$PATH:${GOPATH//://bin:}/bin:$GOROOT/bin

######2 安装配置Beego Blog

  • 2.1 Git安装
sudo apt-get install git
  • 2.2 克隆本博客
cd $GOPATH/src
git clone https://github.com/hopehook/beegoblog.git
  • 2.3 获取外部依赖包
go get github.com/astaxie/beego
go get github.com/Unknwon/com
go get github.com/mattn/go-sqlite3
go get github.com/garyburd/redigo/redis   

######3 运行本博客

  • 3.1 编译和运行
go build $GOPATH/src/beegoblog/main.go
./main
  • 3.2 浏览器查看
firefox http://localhost:8080

######4 启用Redis替换SQLite

  • 4.1 安装Redis
sudo apt-get update
sudo apt-get install redis-server
  • 4.2 运行Redis
sudo redis-server
sudo redis-cli
  • 4.3 配置Redis
sudo CONFIG SET requirepass 123
  • 4.4 替换SQLite
sudo gedit $GOPATH/src/beegoblog/conf/app.conf
添加配置到app.conf文件末尾并保存:
database = redis
requirepass = 123   //Redis验证密码,与4.3保持一致即可


本博客技术架构介绍

######0 总体

html/JS/CSS + golang + DB

######1 UI

AngularJS + jQuery

######2 后台

Beego

######3 数据库

SQLite | Redis

beegoblog's People

Contributors

hopehook avatar

Watchers

James Cloos avatar 双子三生 avatar

Forkers

map-libc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.