Line 54:
Line 54:
</tab>
</tab>
<tab name="For Rocky 8">
<tab name="For Rocky 8">
−
First we need to install git (latest stable version at the time)<syntaxhighlight lang="bash">
+
This is what I did on a bare Rocky 8 minimal install
−
export GITVER=2.39.1-1
+
First we need to install git (latest stable version at the time) and required pkgs
−
wget http://opensource.wandisco.com/centos/7/git/x86_64/git-${GITVER}.WANdisco.x86_64.rpm
+
<syntaxhighlight lang="bash">
−
wget http://opensource.wandisco.com/centos/7/git/x86_64/perl-Git-${GITVER}.WANdisco.noarch.rpm
+
dnf install git policycoreutils-python-utils
−
yum localinstall git-${GITVER}.WANdisco.x86_64.rpm perl-Git-${GITVER}.WANdisco.noarch.rpm
+
useradd git
−
+
</syntaxhighlight>
−
</syntaxhighlight>Next we'll install gitea (latest stable version at the time)<syntaxhighlight lang="bash">
+
Next we'll install gitea (latest stable version at the time)
−
export GITEAVER=1.18.5
+
<syntaxhighlight lang="bash">
+
export GITEAVER=1.20.5
wget https://github.com/go-gitea/gitea/releases/download/v${GITEAVER}/gitea-${GITEAVER}-linux-amd64 -O /usr/local/bin/gitea
wget https://github.com/go-gitea/gitea/releases/download/v${GITEAVER}/gitea-${GITEAVER}-linux-amd64 -O /usr/local/bin/gitea
chmod +x /usr/local/bin/gitea
chmod +x /usr/local/bin/gitea
−
useradd git
mkdir -p /etc/gitea /var/lib/gitea/{custom,data,indexers,public,log}
mkdir -p /etc/gitea /var/lib/gitea/{custom,data,indexers,public,log}
chown git:git /var/lib/gitea/{data,indexers,log}
chown git:git /var/lib/gitea/{data,indexers,log}
Line 70:
Line 70:
chown root:git /etc/gitea
chown root:git /etc/gitea
chmod 770 /etc/gitea
chmod 770 /etc/gitea
−
+
</syntaxhighlight>
−
</syntaxhighlight>Now we want to set it up as a service and ensure that it will be restarted on reboot.<syntaxhighlight lang="bash">
+
Now we want to set it up as a service and set security settings (selinux and firewall).
−
config set gitea service status enabled
+
<syntaxhighlight lang="bash">
wget https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/systemd/gitea.service -O /usr/lib/systemd/system/gitea.service
wget https://raw.githubusercontent.com/go-gitea/gitea/main/contrib/systemd/gitea.service -O /usr/lib/systemd/system/gitea.service
mkdir /usr/lib/systemd/system/gitea.service.d
mkdir /usr/lib/systemd/system/gitea.service.d
−
cat <<EOT > /usr/lib/systemd/system/gitea.service.d/50koozali.conf
+
semanage fcontext -a -t public_content_rw_t "/var/lib/gitea/data/gitea-repositories(/.*)?"
−
[Install]
+
restorecon -r -v /var/lib/gitea/data/gitea-repositories
−
WantedBy=sme-server.target
+
firewall-cmd --permanent --zone=public --add-port=3000/tcp
−
EOT
+
firewall-cmd --reload
+
</syntaxhighlight>
+
Now we setup gitea on your server
+
<syntaxhighlight lang="bash">
+
systemctl enable --now gitea
+
</syntaxhighlight>
+
Access the setup page via a browser http://<your-smeserver-IP>:3000
−
</syntaxhighlight>Now we setup gitea on your server<syntaxhighlight lang="bash">
+
I found it easiest to just use SQLite3 (already installed)
−
systemctl start gitea
−
</syntaxhighlight>Access the setup page via a browser http://<your-smeserver-IP>:3000
−
−
I found it easiest to just use SQLite3 (built in to smeserver v10)
Make sure that you set your Server Domain and Gitea Base URL to the correct values for your server.
Make sure that you set your Server Domain and Gitea Base URL to the correct values for your server.
Line 93:
Line 95:
You can setup your users via the web interface.
You can setup your users via the web interface.
−
If you are having problems accessing gitea, check the app.ini file to ensure that the ROOT_URL is correct in<syntaxhighlight lang="bash">
+
If you are having problems accessing gitea, check the app.ini file to ensure that the ROOT_URL is correct in
+
<syntaxhighlight lang="bash">
nano /etc/gitea/app.ini
nano /etc/gitea/app.ini
−
</syntaxhighlight>if you change it, you'll need to restart gitea<syntaxhighlight lang="bash">
+
</syntaxhighlight>
+
if you change it, you'll need to restart gitea
+
<syntaxhighlight lang="bash">
systemctl restart gitea
systemctl restart gitea
</syntaxhighlight>
</syntaxhighlight>
−
−
−
</tab>
</tab>