Skip to content

How to set up Che on Linux

Walter Rada edited this page Jun 2, 2016 · 6 revisions

Start by following the steps commands listed on the following link: https://eclipse-che.readme.io/docs/configuration-che-on-ec2

Installing & Setting Up Docker

The first set of commands on the link are used for installing docker. Remember to replace commands intended for specific users with the user that be running Che. For example, if ec2-user is running Che, commands such as sudo usermod -aG docker $(whoami) would instead be sudo usermod -aG docker ec2-user along with sudo gpasswd -a ec2-user docker .

  1. sudo yum install wget
  2. wget -qO- https://get.docker.com/ | sh
  3. sudo usermod -aG docker $(whoami)

Make sure that the user you add to the docker group has a UID of 1000 and once that user is added they must log out and back in for the changes to take effect.

The commands listed for installing docker are sudo systemctl enable docker.service and sudo systemctl start docker.service. However, I run docker through the command sudo service docker start. Try testing docker by running the following commands:

  1. docker info
  2. docker images
  3. docker run hello-world

If you get the response "Cannot connect to the Docker daemon. Is the docker daemon running on this host?", check to see if docker is running using the following command sudo service docker status. If it is running, check to see if the user who has been added to the docker group is the one running the commands or if they logged out and back in since they were added to the group. Once those commands are fully functional, we can move on to the next step.

Installing Java

This one is a lot less troublesome. Just follow the commands on the link for installing java and everything should work as intended.

  1. sudo yum install java-1.8.0-openjdk*
  2. which java
  3. vi ~/.bashrc
  4. export JAVA_HOME=/usr/
  5. export PATH=$JAVA_HOME/bin:$PATH
  6. source ~/.bashrc
  7. sudo update-alternatives --config java in order to switch to your most recent version of Java

Installing Che

  1. Follow the steps to install Che on the link and move the Che directory to the /opt directory.
  2. wget -P /home/centos "https://install.codenvycorp.com/che/eclipse-che-latest.zip" -O che.zip
  3. sudo yum install unzip
  4. unzip che.zip
  5. sudo chown -R cheuser /opt/eclipse-che-4.2.0
  6. sudo chgrp -R cheuser /opt/eclipse-che-4.2.0
  7. Find out the externally available ip address of your EC2 vm by pinging the host name outside the vm and run Che through the following command as the user that was added to the docker group: /opt/eclipse-che-4.2.0/bin/che.sh run -r:$ipaddress where $ipaddress is enter the ip address that you received earlier.

Clone this wiki locally