Isto irá apagar a página "Home". Por favor, certifique-se.
To install Gogs on Ubuntu, follow these steps:
Update the system and install necessary dependencies:
sudo apt update
sudo apt upgrade
sudo apt install git
Install and configure the database server. You can use SQLite, MySQL, or PostgreSQL. For this example, let's use SQLite:
sudo apt install sqlite3
Create a user and a directory for Gogs:
sudo adduser --system --group --disabled-password --shell /bin/bash --home /home/gogs --gecos 'Git Version Control' gogs
sudo mkdir -p /home/gogs/{custom,data,gogs,log}
sudo chown -R gogs:gogs /home/gogs
Download the latest Gogs binary release from GitHub:
wget -O gogs.zip https://github.com/gogs/gogs/releases/latest/download/linux_amd64.zip
Unzip the downloaded file and move it to the Gogs directory:
sudo apt install unzip
unzip gogs.zip
sudo mv gogs /home/gogs/
sudo chown -R gogs:gogs /home/gogs/gogs
Set up the Gogs systemd service:
Create a new file called gogs.service:
sudo nano /etc/systemd/system/gogs.service
Paste the following contents into the file and save it (Ctrl + X, Y, Enter):
[Unit]
Description=Gogs - Go Git Service
After=syslog.target
After=network.target
[Service]
LimitMEMLOCK=infinity
LimitNOFILE=65535
Type=simple
User=gogs
Group=gogs
WorkingDirectory=/home/gogs
ExecStart=/home/gogs/gogs/gogs web
Restart=always
Environment=USER=gogs HOME=/home/gogs GOGS_WORK_DIR=/home/gogs
[Install]
WantedBy=multi-user.target
Enable and start the Gogs service:
sudo systemctl enable gogs
sudo systemctl start gogs
Check the status of the Gogs service:
sudo systemctl status gogs
If everything is running correctly, you should see a line similar to this:
Active: active (running) since ...
Gogs should now be running on port 3000. Open a web browser and navigate to http://your-server-ip:3000 to access the Gogs web installation interface.
Follow the web installation steps to configure Gogs to your liking.
That's it! You have successfully installed Gogs on your Ubuntu server.
Isto irá apagar a página "Home". Por favor, certifique-se.