Working DB prepare

This commit is contained in:
Eliezer Croitoru 2024-11-21 02:43:41 +02:00
parent 03e7d751e7
commit da5128ac23
2 changed files with 18 additions and 3 deletions

View File

@ -19,6 +19,16 @@ install-dependencies-rocky:
install-latest-mariadb-rocky:
bash install-latest-mariadb-rocky.sh
remove-gitea-conf:
rm -vf /etc/gitea/app.ini
clenaup-db-data:
rm -vrf /var/lib/mysql
remove-mariadb:
dnf remove mariadb-common -y ;true
dnf remove MariaDB-common -y ;true
enable-mariadb:
systemctl daemon-reload
systemctl enable mariadb
@ -48,6 +58,11 @@ enable-gitea:
start-gitea:
systemctl start gitea
stop-gitea:
systemctl start gitea
restart-gitea: stop start
create-user-debian:
adduser --system --shell /bin/bash --gecos 'Git Version Control' \
--group --disabled-password --home /home/git git

View File

@ -1,7 +1,7 @@
DROP USER ''@'localhost';
CREATE DATABASE gitea CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_bin';
CREATE USER 'gitea'@'%' IDENTIFIED BY 'gitea';
CREATE USER 'gitea'@'localhost' IDENTIFIED BY 'gitea';
GRANT ALL PRIVILEGES ON gitea.* TO 'gitea';
GRANT ALL PRIVILEGES ON *.* TO 'gitea'@'localhost';
GRANT ALL PRIVILEGES ON *.* TO 'gitea'@'%';
FLUSH PRIVILEGES;