rosversion
- usage
rosversion <package/stack> or rosversion -d
- example watch distro version
$ rosversion -d
kinetic
rosversion <package/stack> or rosversion -d
$ rosversion -d
kinetic
\ backslash
` backtick
* asterisk
_ underscore
{} curly braces
[] square brackets
() parentheses
# hash mark
+ plus sign
- minus sign (hyphen)
. dot
! exclamation mark
短横线和星号之间可以输入任意空格
---
*** (******)
- - -
* * *
ref to xxx
> ref to xxx
这是一级引用
这是二级引用
这是三级引用
> 这是一级引用
>> 这是二级引用
>>> 这是三级引用
代码
```
代码
```
代码
代码
代码
代码
# h1
## h2
...
###### h6
or
a first level header
====================
a second level header
---------------------
# this is an h1 #
## this is an h2 ##
### this is an h3 ###
斜 体
*斜* _体_
加 粗
**加** __粗__
*
加号 +
和减号 -
来做为列表的项目标记- Candy.
- Gum.
- Booze.
* Candy.
* Gum.
* Booze.
+ Candy.
+ Gum.
+ Booze.
两种都是使用角括号来把文字转成链接
Let’s go
Let's [go](https://example.com)
Let’s go.
Let's [go](https://example.com "Example").
<https://example.com>
![awesome](https://yuiwong.org/gitlab/uploads/project/avatar/71/awesome-badge.png)
![awesome](https://yuiwong.org/gitlab/uploads/project/avatar/71/awesome-badge.png "awesome")
[go][home]
![awesome][awesome]
[home]: https://yuiwong.org
[awesome]: https://yuiwong.org/gitlab/uploads/project/avatar/71/awesome-badge.png
[goto references](#references)
see also https://yuiwong.org/gitlab/awesome/markdown
(2017-04-02 +0800)
https://yuiwong.org/gitlab/server/serverbuilding/blob/master/gitlab/gitlab-ce.md
Check whether your server meets the hardware requirements.
GitLab packages are built for 64bit systems.
For 32bit OS, consider alternative installation methods.
If you install postfix to send email please select ‘internet site’ during setup.
instead of using Postfix you can also use Sendmail
or configure a custom SMTP server
and configure it as an SMTP server.
Here use Postfix: config is DOMAIN of the administrator email!!
sudo apt-get install curl openssh-server ca-certificates postfix
# Simple reconfigure postfix by reinstall
sudo apt-get purge postfix
sudo apt-get install postfix
# NOT by this mirror
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
# BUT
curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null
add:
deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial main
to: /etc/apt/sources.list.d/gitlab-ce.list
# then
sudo apt-get update
sudo apt-get install gitlab-ce
!!!!
sudo dpkg-divert --local --rename --add /sbin/initctl
sudo ln -s /bin/true /sbin/initctl
sudo useradd -r git -s /usr/sbin/nologin
sudo apt-get install -y postgresql postgresql-client libpq-dev postgresql-contrib
sudo -u postgres psql -d template1 -c "CREATE USER git CREATEDB;"
sudo -u postgres psql -d template1 -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
sudo -u postgres psql -d template1 -c "CREATE DATABASE gitlabhq_production OWNER git;"
sudo -u git -H psql -d gitlabhq_production
sudo -u postgres psql -d template1 -c "ALTER ROLE git WITH PASSWORD 'YOUR_PASSWD';"
Apache or ngnix …: configure rewrite, redirect!
Apache2 and “redirect http requests to https”
and “Using a non-bundled web-server”…
https://docs.gitlab.com/omnibus/settings/nginx.html#using-a-non-bundled-web-server
https://gitlab.com/gitlab-org/gitlab-recipes/blob/master/web-server/apache/gitlab-omnibus-ssl-apache24.conf
TODO: ngnix
Examples
rewrite
module requiredproxy
module requiredJust use workhorse
, e.g. ...:8181
Configuring the external URL for GitLab
Configuring a relative url for gitlab
# Set the external_url in /etc/gitlab/gitlab.rb:
external_url "https://example.com/gitlab"
# My
external_url "https://yuiwong.org/gitlab"
# Reconfigure GitLab for the changes to take effect:
sudo gitlab-ctl reconfigure
# Restart gitlab in case you shut down unicorn and sidekiq in the first step:
sudo gitlab-ctl restart
Example /etc/gitlab/gitlab.rb
– conf/gitlab.1.rb
– TODO more
Reconfigure
sudo gitlab-ctl reconfigure
Restart
sudo gitlab-ctl restart
On your first visit,
you’ll be redirected to a password reset screen to provide the password
for the initial administrator account.
Enter your desired password and you’ll be redirected back to the login screen.
The default account’s username is root
.
Provide the password you created earlier and login.
After login you can change the username if you wish.
For configuration and troubleshooting options please see the
Omnibus GitLab documentation
If you are located in China, try using
https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/