# Clone GitLab repository
cd /home/git
sudo -u git -H git clone https:
# Go to gitlab dir
cd /home/git/gitlab
# Checkout to stable release
sudo -u git -H git checkout
5
-
1
-stable
Configure it
cd /home/git/gitlab
# Copy the example GitLab config
sudo -u git -H cp config/gitlab.yml.example config/gitlab.yml
# Make sure to change
"localhost"
to the fully-qualified domain name of your
# host serving GitLab where necessary
sudo -u git -H vim config/gitlab.yml
# Make sure GitLab can write to the log/ and tmp/ directories
sudo chown -R git log/
sudo chown -R git tmp/
sudo chmod -R u+rwX log/
sudo chmod -R u+rwX tmp/
# Create directory
for
satellites
sudo -u git -H mkdir /home/git/gitlab-satellites
# Create directories
for
sockets/pids and make sure GitLab can write to them
sudo -u git -H mkdir tmp/pids/
sudo -u git -H mkdir tmp/sockets/
sudo chmod -R u+rwX tmp/pids/
sudo chmod -R u+rwX tmp/sockets/
# Create
public
/uploads directory otherwise backup will fail
sudo -u git -H mkdir
public
/uploads
sudo chmod -R u+rwX
public
/uploads
# Copy the example Puma config
sudo -u git -H cp config/puma.rb.example config/puma.rb
# Configure Git global settings
for
git user, useful when editing via web
# Edit user.email according to what
is
set
in
gitlab.yml
sudo -u git -H git config --global user.name
"GitLab"
sudo -u git -H git config --global user.email
"gitlab@localhost"
网友评论