Difference between revisions of "GitLab"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) |
Rafahsolis (talk | contribs) |
||
| Line 34: | Line 34: | ||
gitlabhq_production> \q | gitlabhq_production> \q | ||
</source> | </source> | ||
| − | |||
==Default repositorys== | ==Default repositorys== | ||
git_data_dir "/var/opt/gitlab/git-data" | git_data_dir "/var/opt/gitlab/git-data" | ||
| + | =Update= | ||
| + | [https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/patch_versions.md Guide] | ||
| + | Notes:<br /> | ||
| + | If it fails with: gem "pg"...<br /> | ||
| + | Edit /home/git/Gemfile<br /> | ||
| + | Search for: | ||
| + | <nowiki> | ||
| + | # Supported DBs | ||
| + | gem "mysql2", '~> 0.3.16', group: :mysql | ||
| + | #gem "pg", '~> 0.18.2', group: :postgres <--------COMMENT THIS LINE </nowiki> | ||
| + | Search for: | ||
| + | <nowiki> | ||
| + | group :production do | ||
| + | gem "gitlab_meta", '7.0' | ||
| + | gem "pg", '~> 0.18.2', group: :postgres <--------- ADD THIS | ||
| + | end </nowiki> | ||
| + | |||
| + | If it fails with *pg_trgm* | ||
| + | sudo apt-get install postgresql-contrib | ||
| + | sudo -u postgres psql -d gitlabhq_production -c "create extension pg_trgm;" | ||
Revision as of 23:52, 1 April 2016
Install
see: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md
Upgrade gitlab-shell
cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git checkout v1.9.6
Resync authorized_keys file
sudo -u git -H bundle exec rake gitlab:shell:setup RAILS_ENV=production
Database
Recomended PostgreSQL
# Install the database packages
sudo apt-get install -y postgresql postgresql-client libpq-dev
# Login to PostgreSQL
sudo -u postgres psql -d template1
# Create a user for GitLab
# Do not type the 'template1=#', this is part of the prompt
template1=# CREATE USER git CREATEDB;
# Create the GitLab production database & grant all privileges on database
template1=# CREATE DATABASE gitlabhq_production OWNER git;
# Quit the database session
template1=# \q
# Try connecting to the new database with the new user
sudo -u git -H psql -d gitlabhq_production
# Quit the database session
gitlabhq_production> \q
Default repositorys
git_data_dir "/var/opt/gitlab/git-data"
Update
Guide
Notes:
If it fails with: gem "pg"...
Edit /home/git/Gemfile
Search for:
# Supported DBs gem "mysql2", '~> 0.3.16', group: :mysql #gem "pg", '~> 0.18.2', group: :postgres <--------COMMENT THIS LINE
Search for:
group :production do gem "gitlab_meta", '7.0' gem "pg", '~> 0.18.2', group: :postgres <--------- ADD THIS end
If it fails with *pg_trgm*
sudo apt-get install postgresql-contrib sudo -u postgres psql -d gitlabhq_production -c "create extension pg_trgm;"