VMware + ubuntu16.04 Linux 下安装、配置Gogs

本文在Win7+VMware的ubuntu 16.04中测试。

运行如下命令:
sudo apt-get install git
sudo adduser git # 为Gogs创建单独的用户

官方下载安装文件压缩包,我是Install from binary,我当前是2017-11-22发布的版本。https://gogs.io/docs/installation/install_from_binary
将压缩包解压到/home/git/gogs目录下。
此时可以对Gogs service进行配置,本人采用默认设置。若要配置可以修改/home/git/gogs/scripts/init/debian/gogs

执行如下命令:

sudo cp /home/git/gogs/scripts/init/debian/gogs /etc/init.d/
sudo chmod +x /etc/init.d/gogs
cp /home/git/gogs/scripts/systemd/gogs.service /etc/systemd/system/  # 复制service
sudo systemctl enable gogs # enable run at startup
sudo systemctl start gogs # start now

在Win7浏览器中访问http://localhost:3000/install,其中localhost要改成自己Ubuntu Server的IP。

其中全部采用默认设置除了:

  1. 数据库,由于我不知道怎么配置MySQL,我选的SQLite。
  2. 把所有localhost改成自己Ubuntu Server的IP。

Install后,修改配置只能通过修改文件/home/git/gogs/custom/conf/app.ini,如要修改,可参考https://gogs.io/docs/advanced/configuration_cheat_sheet。

要访问gogs服务,可通过 http://localhost:3000/, 其中localhost为Ubuntu Server的IP

在/home/git/gogs/custom/conf/app.ini中可以修改localhost,这样才能正确使用git仓库。

至此,应该基本可以使用Gogs。还有些提升空间,有点偷懒,加上网络问题没有实现,包括:

  1. 使用MySQL数据库。
  2. 反向代理,实现域名登陆。nginx(https://www.jianshu.com/p/d946314bce2f)、apache2(https://www.cnblogs.com/ddr888/archive/2016/01/14/5131028.html)

本文参考了:

https://www.jianshu.com/p/d946314bce2f

https://www.cnblogs.com/ddr888/archive/2016/01/14/5131028.html

https://gogs.io/docs/intro/faqs

https://gogs.io/docs/advanced/configuration_cheat_sheet

原文地址:https://www.cnblogs.com/xbit/p/8387503.html

时间: 2024-07-29 11:21:54

VMware + ubuntu16.04 Linux 下安装、配置Gogs的相关文章

【Java】Linux下安装配置Oracle JDK 1.7版本

1 环境 Vmware虚拟机中的Ubuntu 12.04 32位系统 2具体安装步骤 ①下载最新的jdk包 注意jdk区分32位版本和64位版本,要与Ubuntu兼容才行 下载地址 http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html ②创建一个目录,解压压缩包 mkdir usr/lib/jvm 移动到该目录,并解压 [email protected]:/usr/lib$ sudo

Linux下安装配置Apache服务器

Linux下安装配置Apache服务器 1. 安装Apache [[email protected] ~]# yum –y install httpd 2. 启动Apache [[email protected] ~]# systemctl start httpd 3. 查看进程 [[email protected] ~]# systemctl status httpd httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib

linux下安装配置tomcat以及tomcat开机自启配置

Linux下Tomcat安装配置以及Windows不能连接服务器Tomcat解决方案 一.从官方网站上下载tomcat软件包. 官网地址: http://tomcat.apache.org/ 点击左侧的 download的一个版本,我选择的是 tomcat7.0,选择一个后缀名为.tar.gz文件直接下载到本地. 二.通过工具SSH Secure 上传至linux服务器中,进行解压 解压tomcat压缩文件: #tar zxvf apache-tomcat-7.0.53.tar.gz 将解压后的

Linux下安装配置Nexus

一.安装和运行nexus 1.下载nexus:http://www.sonatype.org/nexus/go 可选择tgz和zip格式,以及war,选择tgz或zip时不同版本可能在启动时存在一定问题,可能是因为jdk版本问题,若无法启动请选择2.5或更早的版本 注:nexus 2.6版本之后不再支持jdk1.6 2.安装nexus 若下载war,则将其放置tomcat下的webapp目录中,改名为nexus,运行tomcat服务,即可访问http://localhost:8081/nexus

在linux下安装配置Initiator

在linux下安装和配置Initiator 环境 : 开启虚拟机,安装有linux操作系统. 首先打开linux操作系统,进入后使用命令ifconfig –a查看ip地址 在windows下安装安装有SecureCRT 7.1软件或者putty来进行远程控制     在linux下安装Initiator [[email protected] ~]# mkdir -p /mnt/cdron 创建目录并将光盘挂载到/mnt/cdrom目录下 [[email protected] ~]# mount

(转载)Linux下安装配置MySQL+Apache+PHP+WordPress的详细笔记

Linux下安装配置MySQL+Apache+PHP+WordPress的详细笔记 Linux下配LMAP环境,花了我好几天的时间.之前没有配置过,网上的安装资料比较混乱,加上我用的版本问题,安装过程中出现了一些错误,经过好几次安装,翻了好多资料,最后找出问题的所在,才把环境搭建好,对于高手来说,这或许不算什么,但对于一个刚入门的新人,却是不一样了,这篇文章记录着我的一些笔记,希望对于那些刚刚入门的人们有所帮助,仅作为参考. 安装首先我们得获得MySQL,Apache,PHP,WordPress

linux 下安装配置jboss as7以及部署应用

linux 下安装配置jboss as7以及部署应用 1.测试平台及软件 centos 5.4 jdk-7u5-linux-i586.rpm jboss-as-7.1.1.Final.zip jboss-as-quickstarts-7.1.1.CR2-dist.zip apache-maven-3.0.4-bin.tar.gz 2.安装相关软件 a.安装jdk [[email protected] ~]# chmod +x jdk-7u5-linux-i586.rpm [[email prot

linux下安装配置DHCP服务器

前提是已经安装了 core 及 base 两个组 # cat /etc/redhat-release   Red Hat Enterprise Linux Server release 6.4 (Santiago)   # uname -a  Linux localhost.localdomain 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29  11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux 修改本机IP为静态获

Kali Linux下安装配置ProFTPD实例

1,安装ProFTPD 在ftp://ftp.proftpd.org/下可以找到官方发布的各个ProFTPD版本,本人使用ftp://ftp.proftpd.org/historic/source/proftpd-1.3.0a.tar.gz [email protected]:~# wget ftp://ftp.proftpd.org/historic/source/proftpd-1.3.0a.tar.gz [email protected]:~# tar –xf proftpd-1.3.0a