install-gitea/Makefile

83 lines
1.8 KiB
Makefile
Raw Normal View History

2024-01-08 10:48:54 +02:00
all:
echo OK
2024-01-23 11:09:05 +02:00
install-debian: install-dependencies-debian create-user-debian download-gitea create-directories install-gitea-binary install-systemd-service install-nginx-debian
install-rocky: install-dependencies-rocky create-user-rocky download-gitea create-directories install-gitea-binary install-systemd-service install-nginx-rocky
2024-01-23 11:09:05 +02:00
2024-01-08 10:48:54 +02:00
install-dependencies-debian:
apt -y install git vim bash-completion jq
apt -y install mariadb-server
git --version
install-dependencies-rocky:
dnf -y install git vim bash-completion jq
dnf -y install mariadb-server
git --version
create-user-debian:
2024-01-08 10:48:54 +02:00
adduser --system --shell /bin/bash --gecos 'Git Version Control' \
--group --disabled-password --home /home/git git
create-user-rocky:
adduser --system --shell /bin/bash -d /home/git git
2024-01-08 10:48:54 +02:00
download-gitea:
bash download-gitea.sh
install-gitea-binary:
cp -vf gitea-linux-amd64 /usr/local/bin/gitea
2024-01-23 11:09:05 +02:00
chmod +x /usr/local/bin/gitea
2024-01-08 10:48:54 +02:00
gitea --version
create-directories:
2024-01-23 11:09:05 +02:00
mkdir -vp /etc/gitea
mkdir -vp /var/lib/gitea/custom
mkdir -vp /var/lib/gitea/data
mkdir -vp /var/lib/gitea/indexers
mkdir -vp /var/lib/gitea/public
mkdir -vp /var/lib/gitea/logs
chown git:git /var/lib/gitea/data
chown git:git /var/lib/gitea/indexers
chown git:git /var/lib/gitea/logs
chmod 750 /var/lib/gitea/data
chmod 750 /var/lib/gitea/indexers
chmod 750 /var/lib/gitea/logs
2024-01-08 10:48:54 +02:00
chown root:git /etc/gitea
chmod 770 /etc/gitea
install-systemd-service:
cp -vf gitea.service /etc/systemd/system/gitea.service
enable-service:
systemctl daemon-reload
systemctl enable gitea
start:
systemctl start gitea
restart:
systemctl restart gitea
stop:
systemctl stop gitea
disable-service:
systemctl daemon-reload
systemctl disable gitea
status:
systemctl status gitea --no-pager
install-nginx-debian:
2024-01-08 10:48:54 +02:00
apt -y install nginx
install-nginx-rocky:
dnf -y install nginx
2024-01-08 10:48:54 +02:00