Browse Source

finish guide

pull/1/head
Craig Stewart 3 years ago
parent
commit
746edc588d
  1. 3
      guides/building-a-git-repo/installgitea.html
  2. 17
      guides/building-a-git-repo/other-considerations.html

3
guides/building-a-git-repo/installgitea.html

@ -44,7 +44,8 @@ My Blog
</div>
<div id="content">
<p>We have most of the prerequisites installed for gitea, and we could download the binary and run it as we are, but we want this to be a daemon (a process that runs in the background, and doesn't need an interactive shell open to run in) so we need to create a system user for it, and set it up as a service. We will also need to create the config files, and directory structure that Gitea expects. (most of the following is taken from the documentation at <a href="https://docs.gitea.io/en-us/" title="Gitea Documentation">Gitea's documentation pages</a> with a few minor tweaks)</p>
<pre>sudo adduser \
<pre>sudo apt-get install git
sudo adduser \
--system \
--shell /bin/bash \
--gecos 'Git Version Control' \

17
guides/building-a-git-repo/other-considerations.html

@ -58,6 +58,23 @@ chmod 600 ~/.ssh</pre>
<pre>sudo apt-get install ntp</pre>
<p>It's that simple, our computer will now keep it's clock accurate</p>
<h2>Updates</h2>
<p>If you've fully followed this guide you should now have a working git server, however software is not perfect and over time bugs will be found and fixed in the packages running on our server, and in the gitea binary we are running. It would be a good idea to be notified when these changes are available to install so that we can keep our server up to date. For the debian packages I use apticron to inform me via email when updates are available.</p>
<pre>sudo apt-get install apticron
cat << EOF | sudo tee -a /etc/apt/apt.conf.d/10periodic > /dev/null
APT::Periodic::Enable "1";
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::CleanInterval "10";
EOF
sudo sed -i 's/EMAIL="root"/EMAIL="user@example.com"/' /etc/apticron/apticron.conf</pre>
<p>This will send an email to user@example.com once a day if there are any updates available. You should substitute user@example.com for a valid email address. Unfortunately as we have installed gitea from binary this will not update gitea. You will need to download the latest binary and replace the one on disk when it becomes available, if you follow <a href="https://blog.gitea.io/" title="Gitea Blog">the gitea blog</a> they announce new releases. At the time of writing the latest version was 1.4.2, but if when you follow this guide a newer version is available you should use that instead. To update gitea when a new version is available you need to stop gitea, and replace the binary on disk and restart gitea.</p>
<pre>sudo service gitea stop
VERSION=1.4.2 wget -O gitea https://dl.gitea.io/gitea/$VERSION/gitea-$VERSION-linux-amd64
sudo rm /usr/local/bin/gitea
sudo chown root:root gitea
sudo mv gitea /usr/local/bin/
sudo chmod +x /usr/local/bin/gitea
sudo service gitea start</pre>
<p>You will need to substitute 1.4.2 with the version you are wanting to install.</p>
<p style="text-align:center;"><a href="/guides/building-a-git-repo/finalising.html" title="Finalising Everything">Finalising Everything</a>|<a href="/guides/building-a-git-repo/" title="Building A git Repository Server">Main Page</a></p>
</div>
</div>

Loading…
Cancel
Save