Upgrade mysql 5.5 to 5.6 ubuntu 14.04

Standard

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

Standard

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

/etc/rsyslog.d/50-default.conf

Find the line that starts with:

#cron.*

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

sudo service rsyslog restart

You should now see a cron log file here:

/var/log/cron.log

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 -> http://askubuntu.com/questions/56683/where-is-the-cron-crontab-log

Make ActiveMQ Keeping Data After Install

Standard

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

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

Pasang Swap ubuntu

Standard

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

Standard
  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

Standard

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

Installing Java 7 on Ubuntu

Standard
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

It’ll keep your java 7 installation up to date.

To automatically set up the Java 7 environment variables JAVA_HOME and PATH:

 

sudo apt-get install oracle-java7-set-default