This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
computing:gitlab-ce [2018/08/04 22:44] – oemb1905 | computing:gitlab-ce [2024/02/17 19:51] – oemb1905 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | |||
------------------------------------------- | ------------------------------------------- | ||
* **gitlab-ce** | * **gitlab-ce** | ||
* **Jonathan Haack** | * **Jonathan Haack** | ||
* **Haack' | * **Haack' | ||
- | * **netcmnd@jonathanhaack.com** | + | * **webmaster@haacksnetworking.org** |
------------------------------------------- | ------------------------------------------- | ||
Line 20: | Line 19: | ||
* Letsencrypt, | * Letsencrypt, | ||
- | If you are missing some of these pre-requisites, | + | If you are missing some of these pre-requisites, |
+ | |||
+ | The first thing you need to do is download and run the script that gitlab provides. | ||
+ | |||
+ | cd /tmp | ||
+ | curl -LO https:// | ||
+ | sudo bash / | ||
+ | |||
+ | Now that that is done, let's begin by installing Gitlab Community Edition and editing the Ruby configuration file to work with the LAMP stack: | ||
sudo apt install gitlab-ce | sudo apt install gitlab-ce | ||
sudo nano / | sudo nano / | ||
| | ||
- | In this file, you need to edit 6 lines. | + | In this file, you need to edit 6 lines. |
- | external_url 'http://gitlab.example.fr' | + | external_url 'https://example.com |
gitlab_workhorse[' | gitlab_workhorse[' | ||
gitlab_workhorse[' | gitlab_workhorse[' | ||
Line 34: | Line 41: | ||
nginx[' | nginx[' | ||
# | # | ||
- | + | | |
- | Ok, now that the configuration file is set up, let's make sure that your Apache Web Server has appropriate configuration files. | + | Optionally, if you want your ssh on an alternate port, then configure one more option in the gitlab.rb file. |
- | | + | |
- | * [[https://jonathanhaack.com/stuff/https.conf|https.conf]] | + | |
+ | Ok, now that the configuration file is set up, let's make sure that your Apache Web Server has appropriate configuration files. | ||
+ | | ||
+ | * [[https://repo.haacksnetworking.org/haacknet/haackingclub/ | ||
- | These both work in production, so feel free to use and share. I will post these to the recipes page if they begin to differ enough that I need to do so. For now, I will keep them here only. Make sure that you enabled the appropriate | + | These both work in production, so feel free to use and share. |
- | sudo a2enmod | + | sudo a2enmod |
sudo a2enmod proxy | sudo a2enmod proxy | ||
sudo a2enmod rewrite | sudo a2enmod rewrite | ||
Line 55: | Line 65: | ||
sudo systemctl restart gitlab-runsvdir.service | sudo systemctl restart gitlab-runsvdir.service | ||
| | ||
- | Personally, | + | I do not use the default Let's Encrypt tool in '' |
+ | ------------------------------------------- | ||
+ | Need to migrate your gitlab-ce instance to a new host? First, prepare the backups and configs on the old host and copy those the new host. | ||
+ | |||
+ | sudo gitlab-ctl stop unicorn | ||
+ | sudo gitlab-ctl stop sidekiq | ||
+ | sudo gitlab-rake gitlab: | ||
+ | mkdir gitlab-old-host | ||
+ | sudo cp / | ||
+ | sudo cp / | ||
+ | sudo cp -R / | ||
+ | sudo cp / | ||
+ | scp -r ~/ | ||
+ | | ||
+ | Now that you have copied those configs and files over the new host, it is time to restore the new host with those backups. | ||
+ | |||
+ | sudo cp gitlab-old-host/ | ||
+ | sudo cp -r gitlab-old-host/ | ||
+ | sudo gitlab-ctl reconfigure | ||
+ | sudo gitlab-ctl stop unicorn | ||
+ | sudo gitlab-ctl stop sidekiq | ||
+ | sudo cp gitlab-old/ | ||
+ | sudo chown git:git / | ||
+ | sudo gitlab-rake gitlab: | ||
+ | sudo gitlab-ctl start | ||
+ | sudo gitlab-rake gitlab: | ||
+ | | ||
+ | Navigate to your web browser, and all should be restored. | ||
- | --- //[[netcmnd@jonathanhaack.com|oemb1905]] | + | --- //[[webmaster@haacksnetworking.org|oemb1905]] |