It can be installed according to the official documentation, but errors may occur during the installation process. So it is best to install according to the process of this article. I am writing this article while installing.
Preparation
Install centos on vmware. Note here that gitlab takes up more memory, so you need to allocate at least 4G of memory.
It is recommended to use centos7 for centos, and errors may be reported for other versions. download link
download this
After centos is installed, the default network is not enabled, perform the following steps to enable the network
cd /etc/sysconfig/network-scripts/
vi ifcfg-ens33
Modify the value corresponding to ONBOOT in the file to yes, save and exit
The ip address here is the ip address of your centos virtual machine, don't make a mistake. Note here that the double quotation marks must be in English. It is best to type this command by yourself, and the quotation marks will become Chinese when I copy it. If the installation fails, execute rpm -e gitlab-jh to uninstall and reinstall.
The following interface appears, indicating that the installation is successful
Common commands
Start: gitlab-ctl start
Stop: gitlab-ctl stop
Restart: gitlab-ctl restart
View service status: gitlab-ctl status
Effect
Start gitlab-ctl start after the installation is complete
Then we enter the ip address of centos in the browser. The following interface appears, indicating that it is OK.
If the input ip address cannot be accessed, check whether your centos firewall is closed, and close the command systemctl stop firewalld.service
Log in
Then log in on the web page, the default user name is root, and the password is in this file /etc/gitlab/initial_root_password
After successful login, the following interface will appear
change Password
The password is stored in the /etc/gitlab/initial_root_password file and will only be saved for 24 hours. Either we write it down by ourselves or change a new password
Select gitlab configuration
edit account
Set a new password here. Passwords should be as long as possible and contain numbers and letters
The setting is complete, save it. We can log in with the new password.
At this point, the installation is successful, and you can use gitlab.
create project
Create an empty project
Fill in the name of the project to be created
After the creation is successful, we can see our project on the main page
Clone down, fill in username and password
After pulling down the code, we add a file and submit it