Installing Developer Components on Ubuntu 16.04ΒΆ
Set up your development environment for building, running, and testing Mattermost.
- If you are developing with the Docker container, install and configure Docker CE:
- Follow the Docker installation instructions at https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository.
- Edit your
/etc/hosts
file to include the following line:127.0.0.1 dockerhost
- Add your username to the docker group so that you can run Docker without using sudo. Replace {username} with your username.
sudo gpasswd -a {username} docker
- Restart the Docker daemon.
sudo service docker restart
- Change your current group ID to the docker group.
newgrp docker
- Install the build-essential package.
sudo apt-get install build-essential
Download and install Go 1.8 for Linux:
Download the Go binary.
wget https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz
Install the Go binary.
sudo tar -C /usr/local -xzf go1.8.linux-amd64.tar.gz
Set up your Go workspace:
mkdir ~/go
- Add the following lines to your
~/.bashrc
file:export GOPATH=$HOME/go export PATH=$PATH:$GOPATH/bin export PATH=$PATH:/usr/local/go/bin ulimit -n 8096
- Reload your bash configuration.
source ~/.bashrc
Install Node.js:
- Add the Node.js repository to your repository list.
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- Install Node.js
sudo apt-get install -y nodejs
Install Yarn. Go to https://yarnpkg.com/en/docs/install and follow the installation instructions.
Fork Mattermost on GitHub from https://github.com/mattermost/platform.
Download the Mattermost code from your forked repository:
- Create the directory for the code.
mkdir -p ~/go/src/github.com/mattermost
- Change to the directory that you created.
cd ~/go/src/github.com/mattermost
- Clone your Mattermost fork. In the following command, replace {username} with your GitHub username.
git clone https://github.com/{username}/platform.git
Now that everything is set up, you are ready to compile and run Mattermost. See Compiling Mattermost.