Setting up your environment
Setting up your development environment varies a lot between different operating systems and distributions. Given below are the setups for some of them. If you don't find your platform here, unfortunately, you're on your own to translate the commands for a different platform (which is generally pretty easy) to yours. If that happens to be the case, please consider improving this document for future developers.
pacman. The first five are build dependencies that are required to compile Commento from source. PostgreSQL is optional if you have already have a database server that you can access.
Open a terminal and install most of the development dependencies with these commands:
sudo apt update sudo apt install build-essential golang go-dep
Then follow the next sections to install the rest.
Optional Go upgrades
While the version of Go installed in the first section will work for most developers, you can optionally add this PPA to be able to use the latest Go version for a number of Ubuntu releases. Simply run these commands:
sudo apt install software-properties-common [[ $(lsb_release -sr) < "18.04" ]] && sudo apt install python-software-properties # This PPA contains an up-to-date version of Go sudo add-apt-repository ppa:longsleep/golang-backports sudo apt install golang
This section covers the installation of the Postgresql database from Ubuntu packages. There are also other methods, such as Docker. This step is not necessary if you already have a running Postgresql server with a
Install the Postgresql server and CLI client from the Ubuntu archive:
sudo apt install postgresql postgresql-client-common
The final step will be to create a
commento database on the server. Learn more about how to install and use PostgreSQL server on Ubuntu.