This article tells you how to build gitea on a Centos server and then create an account in gitea to upload the code
Before we start, briefly introduce gitea. This is a lightweight code hosting solution with open source code and suitable for building on your own server.
The first is to create a folder to store gitea, a blank folder can be created by the following command
cd ~``mkdir gitea
Then enter the folder you created
cd gitea
Download the latest gitea, you can find the latest software on this page https://docs.gitea.io/en-us/install-from-binary/
Use the following code to download the software in the folder
wget -O gitea https://dl.gitea.io/gitea/1.5.0/gitea-1.5.0-linux-amd64
You need to give permission before running the software
chmod +x gitea
Use the following command to run gitea, but this command will automatically close gitea when you log out. If you need to always open in the background, please see the following command
. /gitea web
Many times the problem arises because git is not installed well. You can install git in Centos through the following command. Note that the current user is an administrator user
yum install git
If it can run, just enter the server's ip and port 3000 to visit in the browser, my server is http://172.96.218.156 I can use the link below to access
http://172.96.218.156:3000
This link is available, everyone can use my server
Now is to make a basic setting, it is recommended to use Sqlite so that no configuration is required
Click register after configuration, the first registered user is the administrator
If you need to make gitea run in the background, you can use the following command
nohup ./gitea web &
In this way, log out and run gitea in the background. You can access your own server in many places and you can use the built gitea. In addition, gitea can set up many private projects, so that you can put some undisclosed projects on the server
But the security of gitea is not very good, so don't put your important projects on public servers.
This article will be updated frequently, please read the original text: https://lindexi.gitee.io/post/3%E5%88%86%E9%92%9F%E6%95%99%E4%BD%A0%E6%90%AD%E5%BB%BA-gitea-%E5%9C%A8-Centos-%E6%9C%8D%E5%8A%A1%E5%99%A8.html to avoid the misleading of outdated false knowledge and have a better reading experience.
https://creativecommons.org/licenses/by-nc-sa/4.0/ This work is licensed under Creative Commons Attribution-Non-commercial Use-Share the Same 4.0 International License Agreement. Welcome to reprint, use, and republish, but be sure to keep the article's signature Lin Dexi (including link: https://lindexi.gitee.io), and must not be used for commercial purposes. The modified works based on this article must be the same License issuance. If you have any questions, please contact me.
Recommended Posts