git uses gtilab ubuntu installation

The installation of git windows is very simple,
but various installations based on linux always have various problems and exceptions: I

have tried many times, and finally I successfully installed it in my own ubuntu system:

Description:
According to the installation steps of others, various exceptions will definitely occur , just like writing code to adjust programs, you must carefully analyze the abnormal error log after an exception occurs, so it is very easy. The

steps

are as follows: official website address
https://about.gitlab.com/installation/#ubuntu

Note that the ubuntu version must be the same as the official website Consistent (the previous attempt to install gitlab on the latest system of ubuntu was unsuccessful).
Follow the instructions on the official website.


The following are all modifications made to the exception of the error log.
1. Modify the gitlab release domain name and port
/etc/gitlab/gitlab.rb extern_url = 'http://192.168.xx.xx:9092/gitlab'
saves

2.unicorn['worker_timeout'] = 300 Set the timeout time
/etc/gitlab/gitlab.rb (Note: I don't know why this machine is slower and the timeout time is set large Some)

3. Change
the listening port of unicorn.rb corresponding to gitlab.rb to be consistent with the port released by gitlab,
pay attention to avoid the default port of nginx and other services

sudo vim /var/opt/gitlab/gitlab-rails/etc/unicorn.rb 

4 .turn off firewall
ufw enable

5. sudo gitlab-ctl reconfigure (reconfiguration takes effect)

6. View the log command
sudo gitlab-ctl tail 


7. Increase the memory (it is best to add the following, many problems are caused by insufficient memory)
      Use the dd command in a directory (Change it to another directory in actual use, the data in the /tmp directory will be lost after
  restarting ) Create a new 1G file under:
  dd if=/dev/zero of=/tmp/swap bs=1M count=1024
(1) Explanation: 1M is the unit, 1024 is the number, the total 1024M is the total size of 1G
(2) Format this file as swap format: (use the mkswap command)
   mkswap /tmp/swap
(3) Start the swap, use the swapon command (that is, the new add swap to the system):
   swapon /tmp/swap
(4) Check the effect (use the -s parameter of swapon):
   swapon -s
   can see all the swap partitions, if successful, /tmp/swap must be in it. Then use the free
   command to view, you can see that the swap space has increased.


8. The


installation effect of accessing the service reset password is as
follows :




Reset password for the first time: log in after resetting the password,




log in and enter the page display



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326313016&siteId=291194637