gogs 安装 git

1 git直接 yum安装

安装gogs  安装在 /home/git/

wget   https://dl.gogs.io/0.11.29/linux_amd64.zip

解压    unzip linux_amd64.zip

进入目录gogs目录

后台启动

nohup ./gogs web &

tail -f nohup.out   


./gogs web 启动

启动不了看  进程 是不是被占用 还有防火墙

netstat -apn  | grep 3000

kill -9 12187  强制管进程

防火墙

vi /etc/sysconfig/iptables

service iptables restart    

/etc/init.d/iptables status

service iptables stop

配置 钩子

#!/bin/sh

Git --work-tree=/var/www/html/fwcgit --git-dir=/home/gogs-repositories/yiling/fwcgit.git checkout -f

 

域名配置

server {

    server_name qiuyang.com

    listen 80;

    location / {

        proxy_pass http://127.0.0.1:3000;

        proxy_set_header Host $host:80;

        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    }

}

碰到的mysql 问题 删了数据的情况

mysql -u root -p  mysql进入

nginx -c /usr/local/etc/nginx/nginx.conf

nginx -s reload

 一些重启nginx错误

 ps -ef | grep  nginx

 pkill -9 nginx

 service nginx restart

猜你喜欢

转载自blog.csdn.net/qiu1988yang/article/details/79045686