Set Up VPS on Linode - Part 3

Continuing from Part 1 and Part 2 about setting up VPS on Linode, here's the final episode on deployment from local repo to remote server with version control, and deploy on production instance.

Create Group for Developers

List all the user groups on apollo:

cut -d: -f1 /etc/group

Check the primary group for a user (g for primary):

id -gn userjoe

Check all the groups for a user (G for secondary):

id -Gn userjoe

Create a new group:

groupadd developers

Add existing users to this new group:

sudo usermod -aG developers userjoe
sudo usermod -aG developers usersmith

Create Git Repo on Production

On production instance apollo:

cd /var
sudo mkdir repo && cd repo
sudo mkdir site.git && cd site.git

Change the ownership and group for repo folder in order to initialize git successfully

sudo chown userjoe:developers /var/repo

sudo /home/herbertyang/.nix-profile/bin/git init --bare

There are probably a few more steps down the road. Between Stack Overflow and Digital Ocean, instructions are abundant and easily available.

Go Top

If you enjoy reading articles like this, a small donation in ETH will go a long way to make sure I spend enough time working on this. My Ethereum address: 0xae56b1f221a48f3dbbaaea110b049d5c1aba6efe.



<< Set Up VPS on Linode - Part 2
>> How to Serve Wordpress Site from Subdirectory