summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/posts/how-this-blog-works/index.org49
1 files changed, 47 insertions, 2 deletions
diff --git a/content/posts/how-this-blog-works/index.org b/content/posts/how-this-blog-works/index.org
index fcf73ba..0f97fd6 100644
--- a/content/posts/how-this-blog-works/index.org
+++ b/content/posts/how-this-blog-works/index.org
@@ -56,7 +56,52 @@ through how I run by blog.
org-mode markup is a bit of a second class citizen in the hugo world,
it's pretty easy to figure out.
+* Prerequisites
+ The only thing that's required on the host server is =git=, although
+ you could even get away without that if you chose to host your git
+ repository elsewhere, like on github.
+
+ #+BEGIN_SRC shell
+ pkg_add git
+ #+END_SRC
+
* Version Control
- I wanted to try to keep things as simple as possible for this, while
- remaining private.
+ I wanted to try to keep things as simple as possible for this. The
+ "origin" for the blog is simply a bare git repository in the =blog=
+ user's home directory. This blog user was also made the owner of the
+ blog document root directory.
+
+** Setting up the blog user
+ First I set up the blog user
+ #+BEGIN_SRC shell
+ useradd -m blog
+ #+END_SRC
+
+ I then placed my public SSH key in its =authorized_keys= file
+
+ #+BEGIN_SRC shell
+ mkdir -m 700 /home/blog/.ssh
+ cp /root/.ssh/authorized_keys /home/blog/.ssh/
+ chown -R blog:blog /home/blog
+ #+END_SRC
+
+ I then logged in as the blog user and initialize the bare git
+ repository.
+
+ #+BEGIN_SRC shell
+ su blog
+ cd # cd with no arguments goes to home directory
+ git init --bare blog.git
+ #+END_SRC
+
+** Cloning the repository
+
+ Cloning the repository onto my local machine is very easy at this
+ point. As long as my private keys are in the =blog= user's
+ =authorized_keys=, git will take care of the rest.
+
+ #+BEGIN_SRC shell
+ # on my local machine
+ git clone blog@lambda.cx:blog.git
+ #+END_SRC