In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to install open source Web application GitLab in Ubuntu/Fedora/Debian", the content is easy to understand, clear, hope to help you solve your doubts, the following let Xiaobian lead you to study and learn "how to install open source Web application GitLab in Ubuntu/Fedora/Debian" this article.
1. Installation prerequisites
First, we need to install the package that GitLab depends on. We will install curl to download the files we need; install openssh-server to log on to our machine through the ssh protocol; install ca-certificates to add CA authentication; and postfix as a MTA (Mail Transfer Agent, mail transfer agent).
Note: to install GitLab Community Edition, we need a linux machine that contains at least 2 GB memory and 2 core CPU.
In Ubuntu 14.04 / Debian 8.x
Given that these dependencies are available in the official software repositories of Ubuntu 14.04 and Debian 8.x, we only need to install them by using the apt-get package manager. To do this, we need to execute the following command in a terminal or console:
# apt-get install curl openssh-server ca-certificates postfix
Install dependencies gitlab ubuntu debian
In Fedora 22
In Fedora 22, because yum has been deprecated, the default package manager is dnf. To install the required packages above, we just need to run the following dnf command:
# dnf install curl openssh-server postfix
Install dependencies gitlab fedora
two。 Open and enable the service
Now we will use our default initialization system to open the sshd and postfix services. And we will make them turn on automatically every time the system starts.
In Ubuntu 14.04,
Since the SysVinit initialization system is installed in Ubuntu 14.04, we will use the service command to start the sshd and postfix daemons:
# service sshd start # service postfix start
Now, in order for them to be turned on automatically at each boot, we need to run the following update-rc.d command:
# update-rc.d sshd enable # update-rc.d postfix enable
In Fedora 22/Debian 8.x
Given that Fedora 22 and Debian 8.x have replaced SysVinit with Systemd as the default initialization system, we just need to run the following command to start the sshd and postfix services:
# systemctl start sshd postfix
Now, in order for them to run automatically at each boot, we need to run the following systemctl command:
# systemctl enable sshd postfix Created symlink from / etc/systemd/system/multi-user.target.wants/sshd.service to / usr/lib/systemd/system/sshd.service. Created symlink from / etc/systemd/system/multi-user.target.wants/postfix.service to / usr/lib/systemd/system/postfix.service.
3. Download GitLab
Now we will use curl to download the binary installation files from the official GitLab Community Edition repository. First of all, in order to get the download link to the required files, we need to browse to the page of the software repository. To do this, we need to run the following command on the Linux machine running the corresponding operating system.
In Ubuntu 14.04,
Since Ubuntu and Debian use the same installation package in debian format, we need to search for the desired version of GitLab under https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs, and then click the link with the ubuntu/trusty label, which is Ubuntu 14.04 we are running. Then a new page will appear, we will see a download button, then we right-click on it, get a link to the file, and then use curl to download it as below.
# curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/trusty/gitlab-ce_8.1.2-ce.0_amd64.deb
Downloading Gitlab Ubuntu
In Debian 8.x
Similar to Ubuntu, we need to search the https://packages.gitlab.com/gitlab/gitlab-ce?filter=debs page for the desired version of GitLab, and then click on the link with the debian/jessie tag, which is the Debian 8.x we are running. Next, a new page will appear, and then we right-click on the download button to get a download link to the file. *, we use curl to download the file as follows.
# curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/jessie/gitlab-ce_8.1.2-ce.0_amd64.deb/download
Downloading Gitlab Debian
In Fedora 22
Since Fedora uses the rpm file as the package, we will search for the desired version of GitLab under the https://packages.gitlab.com/gitlab/gitlab-ce?filter=rpms page, and then click on the link to the desired distribution, where we are running Fedora 22, so we will select the distribution with the el/7 tag. A new page will appear, where we can see a download button, we will right-click it, get a link to the desired file, and then use curl to download it as below.
# curl https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm/download
Downloading Gitlab Fedora
4. Install GitLab
After the appropriate software source has been added to our Linux machine, we will now install the GitLab Community Edition using the default package manager in the corresponding Linux distribution.
In Ubuntu 14.04/Debian 8.x
To install GitLab Community Edition on machines running Ubuntu 14.04 or Debian 8.x linux distributions, we only need to run the following command:
# dpkg-I gitlab-ce_8.1.2-ce.0_amd64.deb
Installing Gitlab Ubuntu Debian
In Fedora 22
We just need to execute the following dnf command to install GitLab on our Fedora 22 machine.
# dnf install gitlab-ce-8.1.2-ce.0.el7.x86_64.rpm
Installing Gitlab Fedora
5. Configure and enable GitLab
GitLab Community Edition has been successfully installed in our Linux system, and then we will configure and open it. To do this, we need to run the following command, which is the same on Ubuntu, Debian, and Fedora distributions:
# gitlab-ctl reconfigure
Reconfiguring Gitlab
6. Allow through the firewall
If the firewall program is already enabled on our Linux machine, in order to make the GitLab Community Edition Web interface accessible over the network, we need to allow port 80 to pass through the firewall, which is the default port for GitLab Community Edition. To do this, we need to run the following command.
In iptables
Ubuntu 14.04 installs and uses iptables by default. So, we will run the following iptables command to open port 80:
# iptables-An INPUT-p tcp-m tcp-- dport 80-j ACCEPT # / etc/init.d/iptables save
In firewalld
Because systemd is installed by default in Fedora 22 and Debian 8.x, it includes firewalld as a firewall program. In order for port 80 (http service) to pass through firewalld, we need to execute the following command.
# firewall-cmd-permanent-add-service=http success # firewall-cmd-reload success
7. Access the GitLab Web interface
*, we will visit the Web interface of GitLab Community Edition. To do this, we need to point our Web browser to the URL of the GitLab server, which may be in http://ip-address/ or http://domain.com/ format, depending on our configuration. After we successfully point to the URL, we will see the following page.
Gitlab Login Screen
Now, in order to log in to the panel, we need to click the login button, which will ask for our user name and password. Then, we will enter the default user name and password, namely root and 5iveLSecretfe. After logging in to the control panel, we will be forced to enter a new password for our GitLab root users.
Setting New Password Gitlab
8. Create a warehouse
After we have successfully changed our password and logged in to our control panel, we will now create a new warehouse for our new project. To do this, we need to go to the project bar and click the "New Project" green button.
Creating New Projects
Next, we will be asked to enter the required information and settings for our project, as shown below. We can even import our projects from other Git warehouse providers and repositories.
Creating New Project
After doing this, we will be able to access our Git repository using any Git client that contains a basic Git command line. We can see any activity in the warehouse, such as creating a milestone, managing issues, merging requests, managing members, notes, Wiki, and so on.
The above is all the contents of the article "how to install the open source Web application GitLab in Ubuntu/Fedora/Debian". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.