Gitea: Difference between revisions
Jump to navigation
Jump to search
| Line 32: | Line 32: | ||
chown root:root /etc/systemd/system/gitea.service | chown root:root /etc/systemd/system/gitea.service | ||
edit /etc/systemd/system/gitea.service to enable mariadb dependancy, change username and home dir | edit /etc/systemd/system/gitea.service to enable mariadb dependancy, change username and home dir | ||
systemctl enable gitea | #systemctl enable gitea | ||
systemctl start gitea | #systemctl start gitea | ||
as gitea user: | |||
edit custom/conf/app.ini to read | |||
[server] | |||
HTTP_ADDR = 127.0.0.1 | |||
HTTP_PORT = 3000 | |||
DOMAIN = localhost | |||
LOCAL_ROOT_URL = http://localhost:3000/ | |||
./gitea web ### should listen to localhost port 3000 | |||
as root: | |||
add port 3000 to apache2 at URL https://daq00.triumf.ca/gitea/ | |||
in /etc/apache2/sites-available/daq00-ssl.conf | |||
ProxyPass /gitea/ http://localhost:3000/ retry=1 | |||
and | |||
<Location /gitea> | |||
systemctl restart apache2 | |||
main page at https://daq00.triumf.ca/gitea/ loads | |||
asks us to setup the mysql database | |||
</pre> | </pre> | ||
Revision as of 23:16, 22 April 2026
Links
Install 1.26.0
as root: create gitea user:
zfs create rpool/gitea
adduser --system --shell /bin/bash --gecos 'Gitea git server' --group --disabled-password --home /gitea gitea
as gitea user:
su - gitea
wget https://dl.gitea.com/gitea/1.26.0/gitea-1.26.0-linux-amd64.xz
wget https://dl.gitea.com/gitea/1.26.0/gitea-1.26.0-linux-amd64.asc
xz -d gitea-1.26.0-linux-amd64.xz
gpg --keyserver hkps://keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
gpg --verify gitea-1.26.0-linux-amd64.asc gitea-1.26.0-linux-amd64
mkdir var-lib-gitea
mkdir etc-gitea
ln -s gitea-1.26.0-linux-amd64 gitea
wget https://raw.githubusercontent.com/go-gitea/gitea/refs/heads/release/v1.26/contrib/systemd/gitea.service
as root:
cd /gitea
ln -s /gitea/var-lib-gitea /var/lib/gitea
ln -s /gitea/etc-gitea /etc/gitea
cp gitea.service /etc/systemd/system/gitea.service
chown root:root /etc/systemd/system/gitea.service
edit /etc/systemd/system/gitea.service to enable mariadb dependancy, change username and home dir
#systemctl enable gitea
#systemctl start gitea
as gitea user:
edit custom/conf/app.ini to read
[server]
HTTP_ADDR = 127.0.0.1
HTTP_PORT = 3000
DOMAIN = localhost
LOCAL_ROOT_URL = http://localhost:3000/
./gitea web ### should listen to localhost port 3000
as root:
add port 3000 to apache2 at URL https://daq00.triumf.ca/gitea/
in /etc/apache2/sites-available/daq00-ssl.conf
ProxyPass /gitea/ http://localhost:3000/ retry=1
and
<Location /gitea>
systemctl restart apache2
main page at https://daq00.triumf.ca/gitea/ loads
asks us to setup the mysql database