Changes

Jump to navigation Jump to search
1,361 bytes added ,  09:28, 19 March 2023
Add content
Line 3: Line 3:  
Note: That there is a smeserver contrib for Git and gitweb, but I did not use these as they only provide older versions of git, whereas we wanted the latest versions for use with gitea
 
Note: That there is a smeserver contrib for Git and gitweb, but I did not use these as they only provide older versions of git, whereas we wanted the latest versions for use with gitea
    +
{{Note box|There is a smeserver contrib for Git and gitweb, but I did not use these as they only provide older versions of git, whereas we wanted the latest versions for use with gitea}}
 +
 +
First we need to install git (latest version at the time)<syntaxhighlight lang="bash">
 
export GITVER=2.39.1-1
 
export GITVER=2.39.1-1
 
wget http://opensource.wandisco.com/centos/7/git/x86_64/git-${GITVER}.WANdisco.x86_64.rpm
 
wget http://opensource.wandisco.com/centos/7/git/x86_64/git-${GITVER}.WANdisco.x86_64.rpm
 
wget http://opensource.wandisco.com/centos/7/git/x86_64/perl-Git-${GITVER}.WANdisco.noarch.rpm
 
wget http://opensource.wandisco.com/centos/7/git/x86_64/perl-Git-${GITVER}.WANdisco.noarch.rpm
 
yum localinstall git-${GITVER}.WANdisco.x86_64.rpm perl-Git-${GITVER}.WANdisco.noarch.rpm  
 
yum localinstall git-${GITVER}.WANdisco.x86_64.rpm perl-Git-${GITVER}.WANdisco.noarch.rpm  
 +
 +
</syntaxhighlight>Next we'll install gitea (latest stable version at the time)<syntaxhighlight lang="bash">
 
export GITEAVER=1.18.5
 
export GITEAVER=1.18.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
Line 16: Line 21:  
chown root:git /etc/gitea
 
chown root:git /etc/gitea
 
chmod 770 /etc/gitea
 
chmod 770 /etc/gitea
nano /etc/systemd/system/gitea.service.d/50koozali.conf
+
</syntaxhighlight>Now we want to set it up as a service and ensure that it will be restarted on reboot.<syntaxhighlight lang="bash">
 
config set gitea service status enabled
 
config set gitea service status enabled
 +
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
 +
cat <<EOT > /usr/lib/systemd/system/gitea.service.d/50koozali.conf
 +
[Install]
 +
WantedBy=sme-server.target
 +
EOT
 +
 +
</syntaxhighlight>Now we setup gitea on your server<syntaxhighlight lang="bash">
 
systemctl start gitea
 
systemctl start gitea
nano /etc/gitea/app.ini # check/amend ROOT_URL
+
</syntaxhighlight>Access the setup page via a browser http://<your-smeserver-IP>:3000
systemctl restart gitea
+
 
systemctl status gitea
+
I found it easiest to just use SQLite3 (built in to smeserver v10)
cd /var/lib/gitea/data/gitea-repositories
+
 
 +
Make sure that you set your Server Domain and Gitea Base URL to the correct values for your server.
 +
[[File:Screenshot 2023-03-19 at 6.12.10 pm.png|left|frame]]
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
You will likely have to refresh the browser and then it will ask you to login.
 +
 
 +
You can setup your users via the web interface.
 +
 
 +
If you are having problems accessing gitea, check the app.ini file to ensure that he ROOT_URL is correct in<syntaxhighlight lang="bash">
 +
nano /etc/gitea/app.ini
 +
</syntaxhighlight>
371

edits

Navigation menu