• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Sunday, May 18, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Fedora

How to Install Gitea on Fedora 29

How VPS by How VPS
December 1, 2019
in Fedora
0
0
SHARES
18
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Using a Different System?
  2. Prerequisites
  3. Install Git
  4. Install MariaDB Database Server
  5. Prepare the Gitea Environment
  6. Install Gitea
  7. Create a service file to start Gitea automatically
  8. Want to contribute?

Using a Different System?

  • How to Install Gitea on Ubuntu 18.04

  • How to Install Gitea on Debian 9

  • How to Install Gitea on CentOS 7

Are we missing a guide for your target system? Request one, or submit your own!


Gitea is an alternative open source, self-hosted version control system powered by Git. Gitea is written in Golang and is a lightweight solution to be hosted on any platform.

Prerequisites

  • New Vultr Fedora 29 instance.
  • Root user or non-root user with sudo privileges.
  • Git
  • MariaDB

Install Git

First, update your system.

sudo dnf update

Install Git.

sudo dnf -y install git

Install MariaDB Database Server

Gitea supports the following databases servers.

  • MariaDB/MySQL
  • PostgreSQL
  • SQLite
  • TiDB

For this tutorial we will be using the MariaDB server.

sudo dnf -y install mariadb-server

Once complete, make sure MariaDB is enabled and running.

systemctl enable mariadb.service
systemctl start mariadb.service

After that, run the command below to secure the MariaDB server by creating a root password and disallowing remote root access.

sudo mysql_secure_installation

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.

sudo systemctl restart mariadb.service

Login to the MariaDB console.

sudo mysql -u root -p

Then type the password you created above to login. You will see the MariaDB welcome message.

Create a database called gitea.

CREATE DATABASE gitea;

Create a database user called giteauser with a new password.

CREATE USER 'giteauser'@'localhost' IDENTIFIED BY 'new_password_here';

Make sure you replace new_password_here with a strong and complex password.

Then grant the user full access to the database.

GRANT ALL ON gitea.* TO 'giteauser'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;

Finally, save your changes and exit.

FLUSH PRIVILEGES;
EXIT;

Prepare the Gitea Environment

Create a user to run Gitea.

sudo adduser --system --shell /bin/bash --comment 'Git Version Control' --user-group --home-dir /home/git -m git

Create the required directory structure.

sudo mkdir -p /var/lib/gitea/{custom,data,indexers,public,log}
sudo chown git:git /var/lib/gitea/{data,indexers,log}
sudo chmod 750 /var/lib/gitea/{data,indexers,log}
sudo mkdir /etc/gitea
sudo chown root:git /etc/gitea
sudo chmod 770 /etc/gitea

Install Gitea

The Gitea binary can be downloaded by the running the following commands. You should replace the link below with a link for the latest version from this download page.

sudo wget -O gitea https://dl.gitea.io/gitea/1.6.1/gitea-1.6.1-linux-amd64 
sudo chmod +x gitea

Copy the binary to a global location.

sudo cp gitea /usr/local/bin/gitea

Create a service file to start Gitea automatically

Create a linux service file.

sudo touch /etc/systemd/system/gitea.service

Using a text editor of your choice, open this newly create file and populate it with the following.

[Unit]
Description=Gitea (Git with a cup of tea)
After=network.target
After=mariadb.service

[Service]
# Modify these two values and uncomment them if you have
# repos with lots of files and get an HTTP error 500 because
# of that
###
#LimitMEMLOCK=infinity
#LimitNOFILE=65535
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
# If you want to bind Gitea to a port below 1024 uncomment
# the two values below
###
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_BIND_SERVICE

[Install]
WantedBy=multi-user.target

Enable and start Gitea at boot.

sudo systemctl daemon-reload
sudo systemctl enable gitea
sudo systemctl start gitea

Ensure Gitea is running.

sudo systemctl status gitea

Enable traffic to Gitea’s default port in firewalld:

sudo firewall-cmd --add-port 3000/tcp --permanent
sudo firewall-cmd --reload 

Finally, open a web browser and point it to:

http://YOUR_SERVER_IP:3000/install

Follow the on-screen instructions to complete the Gitea setup.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install Reader Self 3.5 RSS Reader on a Fedora 26 LAMP VPS

Next Post

Starting a Teamspeak 3 Server on CentOS 6.4

Next Post

Starting a Teamspeak 3 Server on CentOS 6.4

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet