Author: Gugu Ncube
-
Unix – Redirect Command Output To A Variable In Bash
The example below shows command rediects to a variable, especially when the output spans multiple lines #set shell command result to a variable var=$(ab -n 100 -c 1 http://localhost/); # print the content of the variable without – ignoring new line – new lines are not preserved here echo $var; #print the variable contents, preserving…
-
WordPress – How to disable post comments
How-To 1. Login In 2. a. Top Right of Page -> “Screen Options” -> [Show on screen] Uncheck comments OR 2. b. Bottom Left of Page -> Settings -> Discussion -> Discussion Settings -> Uncheck Comments… References 1. Source: http://en.support.wordpress.com/enable-disable-comments/
-
Unix – Process and Load monitoring in Linux
wmstat vmstat 1 htop Installation sudo apt-get install -y htop sudo htop atop Installation sudo apt-get install -y atop sudo atop How to Find the Most Memory taking process in Ubuntu Linux Some Times system administrators need to kill the memory eater process. When your system become slower, check the following command and find the…
-
WordPress – Simple Blog Installation in Ubuntu – PHP, Apache, MySQL
Installation #php sudo apt-get install -y php5 #php5 with apache2 sudo apt-get install -y libapache2-mod-php5 #optional: execute standalone php scripts sudo apt-get install -y php5-cli #mysql driver for PHP5 sudo apt-get install -y php5-mysql #unzip sudo apt-get install -y unzip # mysql sudo apt-get install -y mysql # apache webserver sudo apt-get install -y apache2…
-
Unix – Delete files older than a certain number of days using find command
Delete files older than 30 days find . -mtime +30 -exec rm {} \; 1. Save the deleted files to a log file find /home/a -mtime +5 -exec ls -l {} \; > mylogfile.log This way, you’ll get a line at top with the date the line is executed (also a line at the bottom).…
-
Cassandra-Cluster-Admin – Apache Cassandra GUI – Installation
# create download directory mkdir -p ~/build/cassandra-cluster-admin cd ~/build/cassandra-cluster-admin # download git clone https://github.com/sebgiroux/Cassandra-Cluster-Admin # copy to web hosting directory – typically /var/www/ sudo cp -r Cassandra-Cluster-Admin /var/www/cassandra sudo chown -R www-data:www-data /var/www/cassandra #In a web browser, go to http://localhost/cassandra/ # enjoy 🙂 References 1. Home: https://github.com/sebgiroux/Cassandra-Cluster-Admin 2. Overview of Cassandra GUIs: http://wiki.apache.org/cassandra/Administration%20Tools 3. Overview…
-
Linux – cd – – move to previous directory in bash shell
Going back to the last directory you were in as easy as: cd – cd MINUS References 1. http://superuser.com/questions/113219/go-back-to-previous-directory-in-shell
-
Helenos – Apache Cassandra GUI – Installation
Helenos is a web based GUI Cassandra client that helps you to explore data and manage your schema. Supports data browsing via predicates and CQL. Step 1 – Install Jetty Jetty Installation Istructions Step 2 – Install cassui # create download directory mkdir -p ~/build/helenos cd ~/build/helenos # download war wget http://garr.dl.sourceforge.net/project/helenos-gui/helenos-1.3.war # copy to…
-
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