How To Install and Configure Redis on Ubuntu 16.04



Redis is an in-memory key-value store known for its flexibility, performance, and wide language support. In this guide, we will demonstrate how to install and configure Redis on an Ubuntu 16.04 server.


To complete this guide, you will need access to an Ubuntu 16.04 server. You will need a non-root user with sudo privileges to perform the administrative functions required for this process. You can learn how to set up an account with these privileges by following our Ubuntu 16.04 initial server setup guide.

When you are ready to begin, log in to your Ubuntu 16.04 server with your sudo user and continue below.

Continue reading

Install composer on ubuntu


Then, assuming Composer is already installed
<br />
$ curl -sS | php — –install-dir=/usr/local/bin<br />
$ ln -s /usr/local/bin/composer.phar /usr/local/bin/composer<br />

$ composer global require "phpunit/phpunit=4.1.*"
$ composer global require "phpunit/php-invoker=~1.1."

next, find the “.composer” directory, mine was in my home directory, and create a symbolic link so we can call it from the command line like so: $phpunit

$ sudo ln -s  ~/.composer/vendor/phpunit/phpunit/phpunit   /usr/bin/

Upgrade mysql 5.5 to 5.6 ubuntu 14.04


step 1 : take a backup

mysqldump –lock-all-tables -u root -p –all-databases > dump.sql

step 2 : remove old mysql

sudo apt-get remove mysql-server
sudo apt-get autoremove

step 3 : install new version of mysql

sudo apt-get install mysql-client-5.6 mysql-client-core-5.6

sudo apt-get install mysql-server-5.6

step 4 : restore your data

mysql -u root -p < dump.sql

How To See Crontab


You can create a cron.log file to contain just the CRON entries that show up in syslog. Note that CRON jobs will still show up in syslog if you follow the following directions.

Open the file


Find the line that starts with:


uncomment that line, save the file, and restart rsyslog:

sudo service rsyslog restart

You should now see a cron log file here:


Cron activity will now be logged to this file (in addition to syslog).

Note that in cron.log you will see entries for when cron ran scripts in /etc/cron.hourly, cron.daily, etc. – e.g. something like:

Apr 12 14:17:01 cd CRON[14368]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

However, you will not see more information about what scripts were actually ran inside /etc/cron.daily or /etc/cron.hourly, unless those scripts direct output to the cron.log (or perhaps to some other log file).

If you want to verify if a crontab is running and not have to search for it in cron.log or syslog, create a crontab that redirects output to a log file of your choice – something like:

01 14 * * * /home/joe/myscript >> /home/log/myscript.log 2>&1

This will redirect all standard output and errors that may be produced by the script that is run to the log file specified.

link ->

Make ActiveMQ Keeping Data After Install


Checking config .xml on activeMQ and using persistent=”true”

<broker brokerName="broker" persistent="true" useShutdownHook="false">
     <transportConnector uri="tcp://localhost:61616"/>
     <kahaPersistenceAdapter directory="activemq-data" maxDataFileLength="33554432"/>

Pasang Swap ubuntu


Open Terminal 

root@ARJUNA:~# mkdir /var/data
root@ARJUNA:~# dd if=/dev/zero of=/var/data/swap1.swp bs=1024 count=1024000
root@ARJUNA:~# mkswap /var/data/swap1.swp
root@ARJUNA:~# swapon /var/data/swap1.swp
root@ARJUNA:~# htop
root@ARJUNA:~# free

ini sample jika server kita mengalami kehabisan memory dan bisa di akalin dengan cara seperti ini .. 


Grand Permision to group www-data

  1. Add your user to www-data group:

CREDIT Granting write permissions to www-data group

You want to call usermod on your user. So that would be:

sudo usermod -aG www-data yourUserName

** Assuming www-data group exists

  1. Check your user is in www-data group:groups yourUserName

You should get something like:

youUserName : youUserGroupName www-data

** youUserGroupName is usually similar to you user name

Continue reading

Install Active MQ


Apache ActiveMQ is the powerful, open source messaging and Integration Patterns server. Its support many Cross Language Clients and Protocols, from Java, C, C++, C#, Ruby, Perl, Python, PHP. Ajax to support web streaming support to web browsers using pure DHTML

This article will guide you to Install Apache ActiveMQ 5.8.0 on Centos, Redhat and Fedora.

Step 1: Install JAVA

First we need to check if JAVA is installed on our system or not. Use following command to check if you have java installed already on your system.

Continue reading