2017-11-27 00:44:32 +03:00
|
|
|
|
---
|
|
|
|
|
date: "2016-12-01T16:00:00+02:00"
|
2021-12-30 07:28:56 +03:00
|
|
|
|
title: "使用包管理器安装"
|
2017-11-27 00:44:32 +03:00
|
|
|
|
slug: "install-from-package"
|
2023-07-26 05:00:14 +03:00
|
|
|
|
sidebar_position: 20
|
2020-12-09 09:47:06 +03:00
|
|
|
|
toc: false
|
2017-11-27 00:44:32 +03:00
|
|
|
|
draft: false
|
Refactor docs (#23752)
This was intended to be a small followup for
https://github.com/go-gitea/gitea/pull/23712, but...here we are.
1. Our docs currently use `slug` as the entire URL, which makes
refactoring tricky (see https://github.com/go-gitea/gitea/pull/23712).
Instead, this PR attempts to make future refactoring easier by using
slugs as an extension of the section. (Hugo terminology)
- What the above boils down to is this PR attempts to use directory
organization as URL management. e.g. `usage/comparison.en-us.md` ->
`en-us/usage/comparison/`, `usage/packages/overview.en-us.md` ->
`en-us/usage/packages/overview/`
- Technically we could even remove `slug`, as Hugo defaults to using
filename, however at least with this PR it means `slug` only needs to be
the name for the **current file** rather than an entire URL
2. This PR adds appropriate aliases (redirects) for pages, so anything
on the internet that links to our docs should hopefully not break.
3. A minor nit I've had for a while, renaming `seek-help` to `support`.
It's a minor thing, but `seek-help` has a strange connotation to it.
4. The commits are split such that you can review the first which is the
"actual" change, and the second is added redirects so that the first
doesn't break links elsewhere.
---------
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-04-28 06:33:41 +03:00
|
|
|
|
aliases:
|
|
|
|
|
- /zh-cn/install-from-package
|
2017-11-27 00:44:32 +03:00
|
|
|
|
menu:
|
|
|
|
|
sidebar:
|
|
|
|
|
parent: "installation"
|
2021-12-30 07:28:56 +03:00
|
|
|
|
name: "使用包管理器安装"
|
2023-07-26 05:00:14 +03:00
|
|
|
|
sidebar_position: 20
|
2017-11-27 00:44:32 +03:00
|
|
|
|
identifier: "install-from-package"
|
|
|
|
|
---
|
|
|
|
|
|
2023-04-06 12:06:32 +03:00
|
|
|
|
# 官方包管理器
|
|
|
|
|
|
|
|
|
|
## macOS
|
|
|
|
|
|
2023-07-26 05:00:14 +03:00
|
|
|
|
macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装](installation/from-binary.md)。在你安装了 `brew` 之后, 你可以执行以下命令:
|
2023-04-06 12:06:32 +03:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea
|
|
|
|
|
brew install gitea
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# 非官方包管理器
|
|
|
|
|
|
2021-12-30 07:28:56 +03:00
|
|
|
|
## Alpine Linux
|
|
|
|
|
|
|
|
|
|
Gitea 已经包含在 Alpine Linux 的[社区存储库](https://pkgs.alpinelinux.org/packages?name=gitea&branch=edge)中,版本与 Gitea 官方保持同步。
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
apk add gitea
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Arch Linux
|
|
|
|
|
|
|
|
|
|
Gitea 已经在滚动发布发行版的官方[社区存储库](https://www.archlinux.org/packages/community/x86_64/gitea/)中,版本与 Gitea 官方保持同步。
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
pacman -S gitea
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Arch Linux ARM
|
|
|
|
|
|
|
|
|
|
官方支持 [aarch64](https://archlinuxarm.org/packages/aarch64/gitea), [armv7h](https://archlinuxarm.org/packages/armv7h/gitea) 和 [armv6h](https://archlinuxarm.org/packages/armv6h/gitea) 架构。
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
pacman -S gitea
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Canonical Snap
|
|
|
|
|
|
|
|
|
|
目前 Gitea 已在 Snap Store 中发布,名称为 [gitea](https://snapcraft.io/gitea)。
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
snap install gitea
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## SUSE/openSUSE
|
|
|
|
|
|
|
|
|
|
OpenSUSE 构建服务为 [openSUSE 和 SLE](https://software.opensuse.org/download/package?package=gitea&project=devel%3Atools%3Ascm)
|
|
|
|
|
提供包,你可以在开发软件配置管理存储库中找到它们。
|
2017-11-27 00:44:32 +03:00
|
|
|
|
|
|
|
|
|
## Windows
|
|
|
|
|
|
2021-12-30 07:28:56 +03:00
|
|
|
|
目前你可以通过 [Chocolatey](https://chocolatey.org/) 来安装 [Gitea](https://chocolatey.org/packages/gitea)。
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
choco install gitea
|
|
|
|
|
```
|
|
|
|
|
|
2023-07-26 05:00:14 +03:00
|
|
|
|
你也可以 [从二进制安装](installation/from-binary.md) 。
|
2017-11-27 00:44:32 +03:00
|
|
|
|
|
2021-12-30 07:28:56 +03:00
|
|
|
|
## FreeBSD
|
|
|
|
|
|
|
|
|
|
可以使用 Gitea 的 FreeBSD port `www/gitea`。 请安装预构建的二进制包:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
pkg install gitea
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
对于最新版本,或使用自定义选项构建 port,请
|
|
|
|
|
[从 port 安装](https://www.freebsd.org/doc/handbook/ports-using.html):
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
su -
|
|
|
|
|
cd /usr/ports/www/gitea
|
|
|
|
|
make install clean
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
该 port 使用标准的 FreeBSD 文件系统布局:配置文件在 `/usr/local/etc/gitea` 目录中,
|
|
|
|
|
模板、选项、插件和主题在 `/usr/local/share/gitea` 目录中,启动脚本在 `/usr/local/etc/rc.d/gitea` 目录中。
|
|
|
|
|
|
|
|
|
|
要使 Gitea 作为服务运行,请运行 `sysrc gitea_enable=YES` 并使用 `service gitea start` 命令启动它。
|
|
|
|
|
|
|
|
|
|
## 第三方
|
|
|
|
|
|
|
|
|
|
如果这里没有找到你喜欢的包管理器,可以使用 Gitea 第三方软件包。这里有一个完整的列表: [awesome-gitea](https://gitea.com/gitea/awesome-gitea/src/branch/master/README.md#user-content-packages)。
|
|
|
|
|
|
|
|
|
|
如果你知道其他 Gitea 第三方软件包,请发送 PR 来添加它。
|