Home > Development Tools > git > Introduction to Git&GitHub GitLab server environment construction

Introduction to Git&GitHub GitLab server environment construction

coldplay.xixi
Release: 2021-02-24 10:00:07
forward
2343 people have browsed it

Introduction to Git&GitHub GitLab server environment construction

Recommended (free): Git Getting Started

Article Directory

    • Download and install CentOS7
    • Install Gitlab

Download and install CentOS7

Click to jump to the CentOS7 download address and directly download the second CentOS-7-x86_64-DVD-2003.iso, the size is 4.5G , need to wait patiently. (It is not recommended to install the Gitlab server in the CentOS6 version)

The specific steps for installing CentOS7 have been discussed in the Linux series of articles and will not be introduced in detail here.
Introduction to Git&GitHub GitLab server environment construction
After logging in to the system, use the cd /etc/sysconfig/network-scripts command to open the configuration file, then use ll | less to view the configuration, use Change the first file in the vim editor:

  • Set BOOTPROTO to static
  • Set ONBOOT to yes
  • Add IP address, gateway, domain name resolver

You can refer to the Linux network configuration to make this modification.

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=bc7cf8c9-c0f2-4089-9692-093efb65ba0c
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.217.131
GATEWAY=192.168.217.2
DNS1=192.168.217.2
Copy after login

Here you use the installation package to download: Gitlab's rmp package can be downloaded from the Gitlab official website.
Introduction to Git&GitHub GitLab server environment construction
Download the gitlab rpm package and then use the Xftp tool to upload it to the Linux opt directory.

Install Gitlab

If you downloaded it according to the rpm package of gitlab-ce, then paste the following code into the Linux terminal Run:

sudo rpm -ivh /opt/gitlab-ce-10.8.2-ce.0.el7.x86_64.rpm
sudo yum install -y curl policycoreutils-python openssh-server cronie
sudo lokkit -s http -s ssh
sudo yum install postfix
sudo service postfix start
sudo chkconfig postfix on
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo EXTERNAL_URL="http://gitlab.example.com" yum -y install gitlab-ce
Copy after login

Of course, if the VM virtual machine has not downloaded vmtool, it cannot be pasted. At this time, you can choose to use shell script to install: (Installation requires patience)

Step one: Create a file in the Linu terminal: vim install.sh
Step two: Paste the above installation command.
Step 3: Change to executable permissions: chmod 755 install.sh
Step 4: Execute the installation script: ./install.sh

Perform initial configuration: gitlab-ctl reconfigure

Start the gitlab service: gitlab-ctl start (The command to stop the gitlab service is: gitlab-ctl stop )

Reboot: reboot

Turn off the firewall after restarting: service firewalld stop

After all settings are completed , just access the Linux server IP address in a Windows browser, mine is 192.168.217.131. If you want to access the domain name specified by EXTERNAL_URL, you also need to configure a domain name server or local hosts file.

Introduction to Git&GitHub GitLab server environment construction

Set the root password and log in with the root account:
Introduction to Git&GitHub GitLab server environment construction
At this time, the series of operations are not much different from GitHub, so no more details Demo.
Introduction to Git&GitHub GitLab server environment construction

More related free learning recommendations: Git usage tutorial

The above is the detailed content of Introduction to Git&GitHub GitLab server environment construction. For more information, please follow other related articles on the PHP Chinese website!

source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template