Thursday, January 23, 2014

cron job

0 1 * * *   /bin/backup.sh
@daily root /bin/code.sh

code.sh

cd /path-to-file
tar -cvf drk-`date +%Y%m%d`.tar.gz  /path-to-file

backup.sh

#!/bin/sh
#backup.sh
ldir=$(mysqldump --routines --single-transaction -u Username -ppassword dbname > /path-to-file/drk_`date +"\%Y\%m\%d\%H\%M\%S"`.sql);

Friday, January 17, 2014

Add Godaddy SSL Certificate with Simple Control Panel

This task seems easy at first but it can become more tricky than what it looks. If you have a godaddy SSL and Simple Control Panel, this will make your life easier.

1. Go to Simple control panel and click on SSL Certificates
2. Click on CSR and fill in the form linking with appropriate domain. Set Key Length to 2048
3. After the record is created, edited and copy the CSR KEY
4. Log in to godaddy control panel.
5. Click on SSL Certificates and enter de SSL Certificate control panel.
6. Choose the desired certificate and click on Key or Re-Key.
7. Paste the CSR key and click next.
8. Download the certificate for Apache.
9. Open the downloaded files and go back to Simple Control Panel.
10. Edit the certificate previously generated.
11. There will be two fields filled up and two empty. Copy/paste the key of the certificate from file you downloaded into the Certificate box.
12. Finally copy the Intermediate Certificates from the gd_bundle file into the Intermediate Certificate box, and click Save.

Thursday, January 16, 2014

Connect to SQL Server Using Oracle SQL Developer

Step 1. Get the JDBC driver for MS SQL : If you don't already have one, download a JDBC driver for MS-SQL. I use the jTDS driver, which is open-source Java. It doesn't matter where you place it, but remember where.

First you need to get the right driver. You can find it here: http://sourceforge.net/projects/jtds/files/jtds/1.2.5/jtds-1.2.5-dist.zip/download
NOTE: For SQL Developer 4.0EA3 and SQL Developer Data Modeler 4.0 (production) you now need jtds-1.3.1. Get it here: http://sourceforge.net/projects/jtds/files/

Step 2. Load the JDBC driver : As explained in Oracle's tutorial, under Preferences, scroll down to Database and Third Party JDBC Drivers. Once you load the jtds-1.2 jar file you should see both SQL Server and it's aging uncle Sybase added to your list of options when creating a new database connection (You get Oracle and Access by default).

Step 3. Set up your new database connection : Now you can create a new MS SQL database connection the same you would an Oracle connection. The only difference is that you need to select the SQLServer tab instead of Oracle. If you don't see that tab, then something went wrong - either you got the wrong jar file or it didn't load correctly.

Wednesday, January 8, 2014

Fix for ‘JFolder::create: Could not create directory’ Error

This error occurs when you move from one host to another host. It is because when we move a Joomla site from one server to another server, the log & tmp functions present in the configuration.php file contains the directory path where you had previously installed Joomla i.e. on the old server.

Unlike other Errors, the fix for this error is pretty Simple. Follow the steps below to fix it.

1) Goto your Hosting panel >> File Manager >> Select your Domain/Sub-Domain and then open the configuration.php file.
2) Find var $log_path, it will contain the Directory path of your Old Server. Just replace the whole line with the code var $log_path = './logs';
3) Find var $tmp_path, it will also have the Directory path of your Old Server. Replace the whole line with the code var $tmp_path = './tmp';

Thursday, January 2, 2014

Install RabbitVCS via PPA

RabbitVCS is a set of graphical tools for accessing the version control software that you use. It supports Subversion and git and is similar to TortoiseVCS found on Windows.

Ubuntu 12.04 provides RabbitVCS in the standard repositories but this is version 0.13 which does not have support for GNOME 3 and so does not provide nautilus integration or gEdit integration.

In order to install the later 0.15 version of RabbitVCS you will need to add the RabbitVCS ppa.

Install RabbitVCS via PPA:

The RabbitVCS PPA supports Ubuntu 13.04, Ubuntu 12.04, Ubuntu 12.10, Ubuntu 11.10, Ubuntu 10.04 and their derivatives, such as Linux Mint and Elementary OS.

Press Ctrl+Alt+T on your keyboard to open terminal. When it opens run commands to add the PPA:

sudo add-apt-repository ppa:rabbitvcs/ppa

Then update system package lists via:

sudo apt-get update

Install the packages:

sudo apt-get install rabbitvcs-nautilus3 rabbitvcs-thunar rabbitvcs-gedit rabbitvcs-cli