, ,

Category: unix

  • Monit – Monitoring and Automatic Server Restart in Linux

    Installation Monit is a great application for monitoring and starting and automatically re-starting applications sudo apt-get install -y monit The version installed this way is an old version, NOT the latest stable one Example configuration for Cassandra sudo tee /etc/monit/monitrc

  • Unix – Set Multi-Line Text To A String Variable Or Text File in Bash

    There are many ways to save a multi line string in bash. This is post just shows how to output a multiline string. The Basics – Quoting Variables From the bash(1) man page: If any characters in word are quoted, the delimiter is the result of quote removal on word, and the lines in the…

  • DBeaver – Apache Cassandra GUI – Universal Database Manager Installation in Ubuntu

    DBeaver – Universal Database Manager – Installation # download and dbeaver mkdir -p ~/build/dbeaver cd ~/build/dbeaver # download wget http://dbeaver.jkiss.org/files/dbeaver_2.1.1_amd64.deb sudo dpkg -i dbeaver_2.1.1_amd64.deb # link beaver executable sudo ln -s /usr/share/dbeaver/dbeaver /usr/local/bin/dbeaver # download jdbc drivers – which also include support Cassandra # also wget http://dbeaver.jkiss.org/files/driver-pack-2.1.1.zip unzip driver-pack-2.1.1.zip -d driver-pack sudo cp -r driver-pack/*…

  • Jetty – Installation on Linux

    # create download directories mkdir -p ~/build/jetty cd ~/build/jetty # download version=”9.0.0.v20130308″ wget -O jetty-distribution-$version.tar.gz “http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-$version.tar.gz&r=1” # extract the archive – creates directory jetty-distribution-…. tar -xvf jetty-distribution-$version.tar.gz # rename jetty directory sudo mv jetty-distribution-$version /usr/local # create jetty user sudo useradd -U -s /bin/false jetty # Copy Jetty script to run as service sudo chown…

  • Unix – Find Files By Age And Timestamp

    Find files by date and regex find the files modified more than 3 days ago … good candidates for a clean up sudo find . -iregex “.*\(bootcd\|src\).*.zip” -type f -mtime +30 -exec ls -l “{}” \; Finding the newest files # find text files changed today containing the text “gugu” find . -mtime 0 -type…

  • Unix – zip – Compress a directory including all its files and sudirectories

    Compress files and directories using ZIP zip -r mydir.zip mydir zip -r mydir.zip /home/myuser/mydir the “-r” option means recursive and adds all files in the named directory Zip only certain files, recursively zip -R AllMyDocs.zip “*.doc” The command above saved all .doc files in the current directory as well as the subdirectories into AllMyDocs.zip. The…

  • Ubuntu – Add and Delete a PPA

    Add a PPA Example: ppa:e2defrag/ppa sudo add-apt-repository -y ppa:e2defrag/ppa sudo add-apt update Remove a PPA Example: ppa:e2defrag/ppa sudo add-apt-repository -y ppa:e2defrag/ppa –remove sudo add-apt update

  • Linux – Aliases for root user

    the start bash script is among others: /etc/bash.bashrc The aliases file can be linked from inisde the file. Example # add global aliases if [ “`grep ‘/etc/bash.bash_aliases’ /etc/bash.bashrc`” == “” ] ; then sudo sh -c ‘ printf “\nif [ -f /etc/bash.bash_aliases ]; then\n . /etc/bash.bash_aliases\nfi\n” >> /etc/bash.bashrc’; fi; sudo ln -s $HOME/.bash_aliases /etc/bash.bash_aliases

  • Linux – XFCE Menu editor and lxmed

    The easiest: #Application Menu -> Settings -> Main Menu Otherwise download and install lxmed # XFCE Menu editor cd /tmp wget http://freefr.dl.sourceforge.net/project/lxmed/lxmed-20120515.tar.gz tar -zxf lxmed-20120515.tar.gz cd lxmed sudo sh ./install.sh #Application Menu -> Settings -> Main Menu Editor #or via console lxmed Uninstall sudo sh /opt/lxmed/uninstall.sh

  • Linux – Install Eclipse IDE

    The easiest way to install Eclipse in Ubuntu is through the standard repository sudo apt-get install -y eclipse Unfortunately, this install an outdated version. Currently the version 3.8.0 gets installed, although the latest stable version is 4.2.1. The eclipse team does have a Debian PPA as well, ppa:eclipse-team/debian-package. Adding this PPA doesn’t change anything and…