Last active
October 29, 2019 01:46
-
-
Save wmantly/3f1a378ac37fa7dfc54a6a4ce98f8a40 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Gitea (Git with a cup of tea) | |
After=syslog.target | |
After=network.target | |
#After=mysqld.service | |
#After=postgresql.service | |
#After=memcached.service | |
#After=redis.service | |
[Service] | |
# Modify these two values and uncomment them if you have | |
# repos with lots of files and get an HTTP error 500 because | |
# of that | |
### | |
#LimitMEMLOCK=infinity | |
#LimitNOFILE=65535 | |
RestartSec=10s | |
Type=simple | |
User=gitea | |
Group=gitea | |
WorkingDirectory=/var/www/gitea | |
ExecStart=/var/www/gitea/gitea web | |
Restart=always | |
Environment=USER=gitea HOME=/home/gitea | |
[Install] | |
WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /var/www/gitea/ can be anydirectory you want to install gitea too | |
adduser gitea | |
mkdir /var/www/gitea/bin -p | |
cmown gitea:gitea /var/www/gitea -R | |
su gitea | |
cd /var/www/gitea/bin | |
wget https://github.com/go-gitea/gitea/releases/download/v1.10.0-rc1/gitea-1.10.0-rc1-linux-amd64 | |
chmod +x gitea* | |
cd /var/www/gitea/ | |
ln -s bin/gitea-1.10.0-rc1-linux-amd64 gitea | |
./gitea web | |
# configure from web interface http://<ip>:3000/install | |
# exit back to root | |
exit | |
# copy `gitea.srvice` file to /etc/systemd/system/gitea.srvice Make sure to first edit the file for your needs | |
# start the serice and make sure it works | |
systemctl start gitea | |
# enable the servie to auto start | |
systemctl enable gitea |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment