Centos 6.5 install gitlab installation attention analysis and solution

According to the official website, the environment is CentOS 6.5.

Note that the command is executed during the installation process.

Run sudo gitlab-ctl reconfigure.

An error occurred. Modify the domain name in /etc/gitlab/gitlab.rb and run the command again to successfully start GitLab.

Centos 6.5 install gitlab installation needs to pay attention to the problem

Centos 6.5 install gitlab installation attention analysis and solution

After installation, you might encounter a 502 error. Use the command:

sudo gitlab-ctl tail postgresql

to check the logs. You may find that the memory is insufficient. The official recommends at least 1GB of RAM. While 512MB can work with swap space, it may cause issues after booting. I added swap and was able to access GitLab, although it was slightly slow. I plan to upgrade to 1GB for better performance.

The image above shows my current configuration. Note that I changed the default repository storage path of GitLab.

Storing Git data in an alternative directory.

I posted this here for others to see.

# Prevent users from writing to the repositories while you move them.

sudo gitlab-ctl stop

# Only move 'repositories'; 'gitlab-satellites' will be recreated automatically.

# Note there is no slash behind 'repositories', but there is a slash behind 'git-data'.

sudo rsync -av /var/opt/gitlab/git-data/repositories /mnt/nas/git-data/

# Fix permissions if necessary.

sudo gitlab-ctl reconfigure

# Double-check directory layout in /mnt/nas/git-data. Expected output:

# gitlab-satellites repositories

sudo ls /mnt/nas/git-data/

# Done! Start GitLab and verify that you can browse through the repositories in the web interface.

sudo gitlab-ctl start

You can see that this is where some files and data are stored in GitLab after installation.

I noticed many online resources are outdated, so I recommend always referring to the official documentation. Things may have changed since this article was written.

Omnibus-gitlab uses four different directories:

/opt/gitlab holds the application code for GitLab and its dependencies.

/var/opt/gitlab holds application data and configuration files that gitlab-ctl reconfigure writes to.

/etc/gitlab holds configuration files for omnibus-gitlab. These are the only files you should ever edit manually.

/var/log/gitlab contains all log data generated by components of omnibus-gitlab.

When you encounter an error, try using:

sudo gitlab-ctl tail

to check the logs and analyze the error. I also spent a long time configuring email settings before it worked.

Next, we'll configure the email. I used SMTP with Tencent Enterprise Mailbox.

Modify the /etc/gitlab/gitlab.rb configuration file. Many online articles may be outdated, so be cautious.

gitlab_rails['smtp_enable'] = true

gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"

gitlab_rails['smtp_port'] = 25

gitlab_rails['smtp_user_name'] = ""

gitlab_rails['smtp_password'] = "password"

gitlab_rails['smtp_domain'] = "exmail.qq.com"

gitlab_rails['smtp_authentication'] = "login"

gitlab_rails['smtp_enable_starttls_auto'] = true

gitlab_rails['gitlab_email_from'] = ''

User["git_user_email"] = ""

Make sure the sender and login mailbox match. I made a mistake when setting this up because I read that Tencent uses SSL on their site, which uses port 465.

However, GitLab doesn't seem to use SSL. I couldn't find any mention of enabling SSL in the GitLab tutorial. I didn't go deeper into it, so I changed the port to 25, and the email sent successfully.

To test the email, you can use the forgotten password feature to send a test email. Then check the logs with gitlab-ctl tail. After about a minute, you should see the email log. If there's an issue, analyze the reason accordingly.

RGB Bluetooth Speaker

Rgb Bluetooth Speaker,Rgb Light Bluetooth Speaker,Rgb Portable Speaker For Outdoor,20W Rgb Outdoor Speaker

Comcn Electronics Limited , https://www.comencnspeaker.com

This entry was posted in on