Gitea is an open-source version control platform similar to Github. It’s probably the easiest, fastest, and most painless way of setting up a self-hosted Git service. Gitea is a clone of Gogs and is 100% open-source and free of charge. All source code is available under the MIT License on GitHub. It is robust, scalable and a great alternative to other git services. Gitea has rich features like issues and time tracking, repository branching, file locking, tagging, merging, and many other features that you will find in a typical source control platform. Gitea streamlines your collaborative workflows. Visualize, prioritize, coordinate, and track your progress your way with Gitea’s flexible project management tools. To install Gitea on Ubuntu, follow the steps below
Install Git and Create Git User
Before continuing below, run the command to install the git package on Ubuntu. After installing Git, run the commands below to create a Git user to run Gitea services. To do that run the commands below You should see a similar message below: Next, continue below and install MariaDB
Install MariaDB
Gitea requires a database server to store its content. and MariaDB is a great place to start with looking for an open-source database server. To install MariaDB run the commands below. After installing MariaDB, the commands below can be used to stop, start and enable the MariaDB service always to start up when the server boots. Run these on Ubuntu 16.04 LTS Run these on Ubuntu 18.10 and 18.04 LTS After that, run the commands below to secure the MariaDB server by creating a root password and disallowing remote root access. When prompted, answer the questions below by following the guide.
Enter current password for root (enter for none): Just press the Enter Set root password? [Y/n]: Y New password: Enter password Re-enter new password: Repeat password Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y
Restart MariaDB server Now that you’ve installed all the packages that are required for Gitea to function, continue below to start configuring the servers. First, run the commands below to create a blank Gitea database and database user. To log on to the MariaDB database server, run the commands below. Change the GLOBAL innodeb_file_per_table to On. Then create a database called giteadb Create a database user called giteauser with a new password Then grant the user full access to the database. Next, run the commands below to update the database character set. Finally, save your changes and exit. Next, run the commands below to open the MariaDB default config file. Then add the lines below and save. Restart MariaDB after that. Continue below to download the Gitea package.
Install Gitea Packages
After creating the user account above, run the commands below to download Gitea’s latest package. You can find its latest version from the link below: https://github.com/go-gitea/gitea Run the commands below to download version 1.8.0. You can replace the version number with the latest if it becomes available. After downloading the file, move it into the /usr/local/bin directory and make it executable. Next, create this folder for Gitea to use, then update their permissions using the commands below. After that, run the commands below to create the Gitea systemd script. Then copy and paste the content below into the file and save it. After that, reload systemd and start the Gitea service To check Gitea’s status, run the commands below: You should see a similar message below Next, open your browser and browse to the server hostname or IP address followed by port 3000 Type in the database connection info and continue with the setup. Set up the backend admin account as well. Login and enjoy! After the installation, you should be able to log on and use Gitea as a git service. Conclusion: This post showed you how to install Gitea on Ubuntu 20.04 | 18.04. If you find any error above, please use the form below to report. You may also like the post below: