docker安装宝塔

docker run -tid --name baota -p 80:80 -p 443:443 -p 8888:8888 -p 888:888 -p 3306:3306 -p 3307:3307 --privileged=true --shm-size=1g --restart always -v C:ccwproject:/www/wwwroot jahem/baota:0.0.1
docker: Error response from daemon: The system cannot find the file specified.
See 'docker run --help'.

安装GO

下载二进制文件:

>wget https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz

解压并创建工作目录:
>tar -zxf go1.7.3.linux-amd64.tar.gz -C /usr/local/
mkdir /Golang

设置环境变量:
在 /etc/profile 添加:
>export GOROOT=/usr/local/go 
export GOBIN=$GOROOT/bin
export GOPKG=$GOROOT/pkg/tool/linux_amd64 
export GOARCH=amd64
export GOOS=linux
export GOPATH=/Golang
export PATH=$PATH:$GOBIN:$GOPKG:$GOPATH/bin

然后执行 source /etc/profile 使之生效或者重新登录Linux也可。

方法二:使用 yum 安装
先安装 EPEL 源:
>yum install epel -y

然后使用 yum 安装 Golang:
>yum install go -y

环境变量:
在 /etc/profile 添加:

>export GOPATH=/var/www/html
export PATH=$PATH:$GOPATH/bin

然后执行 source /etc/profile 使之生效。
安装mysql数据库
>[https://www.jianshu.com/writer#/notebooks/11015909/notes/18485740](https://www.jianshu.com/writer#/notebooks/11015909/notes/18485740)


安装Git服务端 
>yum install git -y

安装Golang语言
>[https://www.jianshu.com/writer#/notebooks/11015909/notes/47842460](https://www.jianshu.com/writer#/notebooks/11015909/notes/47842460)
 >建议使用源码安装,yum安装CentOS默认不支持;

安装Gogs服务端,选择对应的Gogs版本,
>wget https://dl.gogs.io/0.11.4/linux_amd64.tar.gz
下载软件包

>tar  -zxf  linux_amd64.tar.gz;   mv gogs    /gogs
解压

>useradd git
chown -R  git:git   /gogs
mkdir /gogs-repositories
chown  -R  git:git   /gogs-repositories
添加git用户

>su git
切换用户

>/gogs/gogs web &
启动gogs

>lsof -i:3102
kill -9 进程PID
停止gogs

>vim gogspath/custom/conf/app.ini
配置文件
原文地址:https://www.cnblogs.com/ccw869476711/p/15219737.html