Category Archives: Linux

Install Zookeeper on Linux

Zookeeper installation steps are nice and easy for dev environment.

  1. Download zookeeper from http://zookeeper.apache.org, extract it to some place, let it be /opt/zookeeper/
  2. Create a simple zoo.cfg file, i.e. copy config sample /opt/zookeeper/conf/zoo_sample.cfg to /opt/zookeeper/conf/zoo.cfg
  3. Start zookeeper
    /opt/zookeeper/bin/zkServer.sh start
  4. Stop zookeeper
    /opt/zookeeper/bin/zkServer.sh stop

Copy files to remote computer using ssh

Using scp command for secure copying file to remote machine:

Example:

 

Kill Linux process

Filter processes by string pattern (let it be “java” processes):

Find my process in resulted list and kill by id:

Kill all processes by “java” pattern:

 

Eclipse: could not load the Tomcat server configuration

Starting Tomcat7 from Eclipse produced an error:
Could not load the Tomcat server configuration at /usr/share/tomcat7/conf. The configuration may be corrupt or incomplete.

Solution:

Tomcat7 split into different folders by default. Eclipse expects Tomcat to be in one folder. To resolve, we create symbolic links in Tomcat home dir.

Now Eclipse should be able to start Tomcat.