This tutorial will guide you in installing Gerrit on your macOS computer.
Before installing Gerrit, it is necessary to verify that the OpenJDK is installed in your computer. Run the following commands in your terminal to verify:
$ java -version
Ensure that your terminal outputs a version of OpenJDK greater or equal to version 8.
If you do not have OpenJDK installed, you can install it by running the following command:
$ brew install openjdk
Go to https://www.gerritcodereview.com/ and download the latest Gerrit release for your operating system.
Unpack the downloaded release. You can do this by running the following command in your terminal, replacing [RELEASE_FILE_NAME]
with the name of the downloaded file:
$ tar -xf [RELEASE_FILE_NAME].tar.gz
Move the unpacked Gerrit files to the desired installation directory. You can do this by running the following command:
$ mv [RELEASE_DIRECTORY] ~/gerrit
Change into the newly created Gerrit directory:
$ cd ~/gerrit
Initialize Gerrit by running the following command:
$ java -jar bin/gerrit.war init -d ~/gerrit_site
Follow the on-screen instructions to set up your Gerrit administrator account and the basic configuration of your Gerrit installation.
To start the Gerrit server, run the following command:
$ java -jar ~/gerrit/bin/gerrit.war daemon -d ~/gerrit_site
You can access the Gerrit web interface by opening your browser and navigating to http://localhost:8080/
.
Congratulations! You have successfully installed and started Gerrit on your macOS computer.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!