Home Development Tools git Let's talk about the steps to install Gitee on the server

Let's talk about the steps to install Gitee on the server

Mar 31, 2023 am 11:17 AM

Gitee is a popular code hosting and version control tool that is a web-based version of Git. If you want to set up a private code repository for your team or project, Gitee is a very good choice. Although you can use Gitee on its official website, in some cases you may need to install Gitee on your own server.

In this article, we will introduce the steps to install Gitee on the server and guide you on how to set up and use it.

Step 1: Install the required dependencies

Before installing Gitee, you need to install the following dependencies on your server:

  • Git
  • MySQL (or MariaDB)
  • Nginx

If you have already installed the above dependencies, you can skip this step.

To install Git and MariaDB, you can use the following command on the command line:

sudo apt-get update
sudo apt-get install git mariadb-server
Copy after login

Then, you need to set the root password for MariaDB:

sudo mysql_secure_installation
Copy after login

During the installation, You will be asked to enter a password and other security settings options. Just follow the wizard.

Now, you need to install Nginx:

sudo apt-get install nginx
Copy after login

Step 2: Download the Gitee installation package

On your server, you need to download the Gitee installation package. You can download it from Github or Gitee’s official website, but if you don’t want to go to these websites, you can download it using the following command on your CentOS system:

wget https://dl.gitee.com/gitee/gitee/releases/6.1.1/gitee-6.1.1-64bits.tar.gz
Copy after login

Step 3: Install Gitee

Unzip the downloaded Gitee installation package:

tar xvf gitee-6.1.1-64bits.tar.gz
Copy after login

Now, you will get a gitee folder. You need to move it to a directory where you want to install Gitee and change to that directory:

sudo cp -r gitee /opt/
cd /opt/gitee
Copy after login

Next, you need to run the Gitee installation script:

sudo ./install.sh
Copy after login

After running this script Before doing this, you need to make sure you have sudo permissions.

After running the script, you may need to enter some setting information, such as your database password and SMTP server information. After following the wizard, you will complete the Gitee installation.

Step 4: Configure Nginx

To make Gitee accessible through the web, you need to configure Nginx. Create a default configuration file in the Nginx configuration directory:

sudo nano /etc/nginx/sites-available/default
Copy after login

Then, add the following content to the file:

server {
    listen 80;
    server_name your_domain.com; # 你的域名
    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_set_header Host $http_host;
        proxy_set_header X-Nginx-Proxy true;
        proxy_pass http://127.0.0.1:8080; # 你的gitee端口
        proxy_redirect off;
    }
}
Copy after login

Replace "your_domain.com" with your domain name and " Replace "8080" with the port Gitee is listening on (default is "8081").

Save and close the file. Then test the configuration file:

sudo nginx -t
Copy after login

If there are no errors, restart Nginx:

sudo systemctl restart nginx
Copy after login

Step 5: Use Gitee

Now you can enter your domain name to access Gitee. Before your first visit, you need to install Gitee's SSL certificate in your browser.

After accessing Gitee, you need to enter the username and password of the Gitee administrator. By default, the username and password are "admin" and "123456".

Once you successfully log in, you can create a repository in Gitee and then use it in your teams and projects. You can also invite other users to join your Gitee community so they can work on your repository.

Summary

Gitee is a very powerful code hosting and version control tool that can help you better manage your projects. In this article, we show you how to install Gitee on your server, as well as how to set it up and use it. If you are a developer or a team leader, we highly recommend you consider using Gitee to manage your code base.

The above is the detailed content of Let's talk about the steps to install Gitee on the server. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use git management tools for complete usage of git management tools How to use git management tools for complete usage of git management tools Mar 06, 2025 pm 01:32 PM

This article provides a guide to Git management, covering GUI tools (Sourcetree, GitKraken, etc.), essential commands (git init, git clone, git add, git commit, etc.), branch management best practices (feature branches, pull requests), and merge con

How to push the specified commit How to push the specified commit Mar 06, 2025 pm 01:39 PM

This guide explains how to push a single Git commit to a remote branch. It details using a temporary branch to isolate the commit, pushing this branch to the remote, and then optionally deleting the temporary branch. This method avoids conflicts and

How to view commit contents How to view commit contents Mar 06, 2025 pm 01:41 PM

This article details methods for viewing Git commit content. It focuses on using git show to display commit messages, author info, and changes (diffs), git log -p for multiple commits' diffs, and cautions against directly checking out commits. Alt

The difference between commit and push of git The difference between commit and push of git Mar 06, 2025 pm 01:37 PM

This article explains the difference between Git's commit and push commands. git commit saves changes locally, while git push uploads these committed changes to a remote repository. The article highlights the importance of understanding this distin

How to solve the failure of git commit submission How to solve the failure of git commit submission Mar 06, 2025 pm 01:38 PM

This article addresses common Git commit failures. It details troubleshooting steps for issues like untracked files, unstaged changes, merge conflicts, and pre-commit hooks. Solutions and preventative measures are provided to ensure smoother Git wo

The difference between add and commit of git The difference between add and commit of git Mar 06, 2025 pm 01:35 PM

This article explains the distinct roles of git add and git commit in Git. git add stages changes, preparing them for inclusion in the next commit, while git commit saves the staged changes to the repository's history. This two-step process enables

How to use git management tools Tutorial for using git management tools for beginners How to use git management tools Tutorial for using git management tools for beginners Mar 06, 2025 pm 01:33 PM

This beginner's guide introduces Git, a version control system. It covers basic commands (init, add, commit, status, log, branch, checkout, merge, push, pull) and resolving merge conflicts. Best practices for efficient Git use, including clear comm

What is git code management tool? What is git code management tool? What is git code management tool? What is git code management tool? Mar 06, 2025 pm 01:31 PM

This article introduces Git, a distributed version control system. It highlights Git's advantages over centralized systems, such as offline capabilities and efficient branching/merging for enhanced collaboration. The article also details learning r

See all articles