添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Use NSSM

Get the nssm.exe needed for your machine (32 or 64 bit; they’re packaged together in Iain’s zip file), and place it in a directory that is in (or will be added to) your %PATH% environment variable.

Open a command line as administrator and do following command to configure Gogs as a service:

C:\>nssm install gogs

“NSSM service installer” will appear. Configure it as follows:

Application tab:

  • Path: C:\gogs\gogs.exe  为gogs的exe文件所在位置
  • Startup directory: C:\gogs
  • Arguments: web

Details tab:

  • Display name: Gogs
  • Description: A painless self-hosted Git service.
  • Startup type: Automatic (Delayed Start)

Note that we’ve chosen delayed start, so that the service will not impact the early boot time. Gogs will start two minutes after the non-delayed services.

I/O tab:

  • Output (stdout): C:\gogs\log\gogs-nssm.txt
  • Error (stderr): C:\gogs\log\gogs-nssm.txt

That will capture all text output that you would normally receive from Gogs on the command line console, and log it to that file instead.

File rotation tab:

  • Check: Rotate files
  • Restrict rotation to files bigger than: 1000000 bytes

Environment tab:

  • Environment variables: PATH=%PATH%;C:\gogs;C:\Program Files (x86)\Git\bin

That is a guarantee that both gogs.exe and git.exe will be on the Gogs service’s path variable during runtime.

Click “Install service”, and you should be confirmed that it succeeded.

If it failed, refer back to the command line console you started, for the error message. When it succeeds, go to command line and do:

nssm start gogs

You should see:

gogs: START: The operation completed successfully.

Check that this is true by opening C:\gogs\log\gogs-nssm.txt. You should see Gogs’ start up procedures, ending with:

timestamp [I] Run Mode: Production
timestamp [I] Listen: http://127.0.1.1:80

Now point your web browser at http://gogs/ and log in.

Gogs is running as a service, and will not need to be run manually, unless something goes wrong. NSSM will attempt to restart the service for you, if the Gogs server crashes.

When you need to restart it after app.ini changes, go to an administrator command line after the changes, and do:

nssm restart gogs

See the configuration cheat sheet for reference of the custom\conf\app.ini settings.

An example of the logging and error handling in action:

[log]
ROOT_PATH = C:\gogs\log

At the time of writing this line, it will cause the following to print in C:\gogs\log\gogs-nssm.txt:

timestamp [T] Custom path: C:/gogs/custom
timestamp [T] Log path: C:\gogs\log
timestamp [I] Gogs x.y.z
timestamp [log.go:294 Error()] [E] Fail to set logger(file): invalid character 'g' in string escape code

This is what was expected in C:\custom\conf\app.ini:

ROOT_PATH = C:/gogs/log

And this was the nssm interaction while solving it:

C:\>nssm restart gogs
gogs: STOP: The operation completed successfully.
gogs: Unexpected status SERVICE_PAUSED in response to START control.
C:\>nssm start gogs
gogs: START: An instance of the service is already running.
C:\>nssm stop gogs
gogs: STOP: The operation completed successfully.
C:\>nssm start gogs
gogs: Unexpected status SERVICE_PAUSED in response to START control.
C:\>nssm restart gogs
gogs: STOP: The operation completed successfully.
gogs: START: The operation completed successfully.
Use NSSMGet thenssm.exeneeded for your machine (32 or 64 bit; they’re packaged together in Iain’s zip file), and place it in a directory that is in (or will be added to) your%PATH%environment va...
Gogs是一款极易搭建的自助Git服务。Gogs的目标是打造一个最简单、最快速和最轻松的方式搭建自助Git服务。使用Go语言开发使得Gogs能够通过独立的二进制分发,并且支持Go语言支持的所有平台,包括Linux、MacOSX、Windows以及ARM平台。 Gogs功能特性: 支持活动时间线 支持SSH以及HTTP/HTTPS协议 支持SMTP、LDAP和反向代理的用户认证 支持反向代理子路径 支持用户、组织和仓库管理系统 支持添加和删除仓库协作者 支持仓库和组织级别Web钩子(包括Slack集成) 支持仓库Git钩子和部署密钥 支持仓库工单(Issue)、合并请求(Pull Request)、Wiki以及保护分支 支持迁移和镜像仓库以及它的Wiki 支持在线编辑仓库文件和Wiki 支持自定义源的Gravatar和Federated Avatar 支持Jupyter Notebook 支持邮件服务 支持后台管理面板 支持MySQL、PostgreSQL、SQLite3、MSSQL和TiDB(实验性支持)数据库 支持多语言本地化(22种语言) 系统要求: 最低的系统硬件要求为一个廉价的树莓派 如果用于团队项目,建议使用2核CPU及1GB内存 浏览器支持: 请根据Semantic UI查看具体支持的浏览器版本。 官方支持的最小UI尺寸为1024*768,UI不一定会在更小尺寸的设备上被破坏,但我们无法保证且不会修复。 安装部署: 在安装Gogs之前,您需要先安装基本环境。 然后,您可以通过以下5种方式来安装Gogs: 二进制安装 源码安装 包管理安装 采用Docker部署 通过Vagrant安装
有这么一个网站,能通过web方式查看Android源码.在你需要的时候,本地又没有源码的时候,通过这个网站可以很方便的查看到源码 网站地址:http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android Activity.java 这个文件的地址: http://gre
NSSM是一个服务封装程序,它可以将普通exe程序封装成服务,使之像windows服务一样运行。同类型的工具还有微软自己的srvany,不过nssm更加简单易用,并且功能强大。它的特点如下: 支持普通exe程序(控制台程序或者带界面的Windows程序都可以) 安装简单,修改方便 可以重定向输出(并且支持Rotation) 可以自动守护封装了的服务,程序挂掉了后可以自动重启 可以自定义环境变量 http://nssm.cc 下载最新版本nssm,也可以下载最新releas 不使用 minwinsvc 构建标签并通过 NSSM 注册为服务。 在注册成为服务之前,需要确保给予 Gogs 二进制相应目录的读写权限,包括存放仓库的根目录([repository] ROOT)。 修改 C:\Gogs\custom\conf\app.ini 文件的相应信息:
目录1.添加nginx系统服务1.1 方法一:1.2 方法二+排错:1.2.1 排错: 1.添加nginx系统服务 今天安装了nginx软件,这是跟Apache软件旗鼓相当的一个软件,为了更方便的使用nginx服务,所以要把它加入到系统服务里面,使用systemctl 命令可以控制,但是发现加入nginx系统服务里面然后启动不了,具体的配置方法有两个: 1.1 方法一: 编辑vim /etc/init.d/nginx文件,编写空白文件 [root@server nginx-1.12.2]# ln -s /u
是的,Windows可以安装配置私有的Git服务器。以下是一些常用的Git服务器软件: 1. GitLab Community Edition:GitLab是一款非常流行的Git服务器软件,它提供了完整的Git仓库管理功能,并支持代码审查、CI/CD集成等高级功能。GitLab Community Edition是免费的开源版本,可以在Windows上运行。 2. GogsGogs是一款轻量级的Git服务器软件,它提供了Web界面管理Git仓库,并支持用户管理、权限控制等功能。Gogs是免费的开源软件,可以在Windows上运行。 3. Gitblit:Gitblit是一款基于Java的Git服务器软件,它提供了Web界面管理Git仓库,并支持用户管理、权限控制等功能。Gitblit是免费的开源软件,可以在Windows上运行。 4. Bonobo Git Server:Bonobo Git Server是一款简单易用的Git服务器软件,它提供了Web界面管理Git仓库,并支持用户管理、权限控制等功能。Bonobo Git Server是免费的开源软件,可以在Windows上运行。 以上是一些常用的Git服务器软件,您可以根据自己的需求选择合适的软件。在Windows上安装配置Git服务器的步骤与在Linux或者Mac上类似,需要安装Git软件、配置SSH服务、创建Git仓库等步骤。