RSS
 

Archive for the ‘IT’ Category

Install VMware Player 4 on Ubuntu Server

04 Apr

Install Ubuntu Server with no additional packages (ie, LAMP, Virtual Machine Host, etc)

Updates

sudo apt-get update
sudo apt-get upgrade

Returns build information that will be used with the command below
uname -r

Install packages required by VMware player
Replace ‘uname -r’ in the command below with the results from uname -r above
sudo apt-get install build-essential linux-headers-'uname -r'

Install a GUI
sudo apt-get install xubuntu-desktop

Start GUI
sudo startx

Donwnload VMware Player
Browse to www.vmware.com/go/downloadplayer
Download the latest version of Player for either 32 or 64 bit linux (depending on what you installed)

Open a terminal and install VMware Player
cd /home/youruser/Downloads
gksudo bash ./VMware-Player-yourversion

Example:
cd /home/jess/Downloads
gksudo bash ./VMware-Player-4.0.2-59120.x86_64.bundle

Follow the VMware installer GUI to finish the install.

 
No Comments

Posted in IT

 

html hyperlink popup in wordpress

08 Mar

There are several popup pluggins for wordpress, I haven’t found one that does a simple popup window that can work with other contact forms.

Here is an HTML/Javascript solution:

<a href=”http://popupurl.com” onclick=”window.open(this.href,’window’,'width=400,height=500,resizable,scrollbars,toolbar,menubar’) ;return false;”>Link Text</a>

Link Text

 
No Comments

Posted in IT

 

wordpress fix – apostrophes appear as question marks

08 Mar

Does your theme not interpret ‘ apostrophes ‘ correctly? Do they appear as ? question marks ? or other characters.

A quick fix is to replace the apostrophe with &#39;

 
No Comments

Posted in IT

 

iPad 3

07 Mar

Just pre-ordered, delivery set for March 16th!

 
No Comments

Posted in IT

 

Schedule APEX Network Backups

30 Jan

For reference -

This walk-through assumes you have APEX 4.1 Listener and Oracle 10G XE or greater installed. If not, reference the links above.

We will break this walk-through up into 4 sections:

  • Mounting a network share for the backup directory and configuring fstab
  • Configuring APEXExport to correctly talk to your database
  • Write a script to make sure your backup directories exist and export all of your applications
  • Configure a cron job to run the script twice a day 7 days a week

Mounting a network share for the backup directory and configuring fstab
Create local mount point
mkdir /mnt/backup

Create connection file
nano /etc/cifspw
username
password

Edit fstab
nano /etc/fstab
//server.domain.com/share /mnt/backup cifs exec,credentials=/etc/cifspw,uid=root 0 0

Mount the directory
mount /mnt/backup

Configuring APEXExport to correctly talk to your database

You must run APEXExport from the utilities folder where you installed APEX
cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/apex/utilities

Export the CLASSPATH
export CLASSPATH=.:${ORACLE_HOME}/jdbc/lib/ojdbc14.jar

APEXExport is run in the following syntax:
java oracle/apex/APEXExport -db localhost:port:SID -user schemaOwner -password yourPass -workspaceid workspaceID
port = 1521
SID = XE

schemaOwner can be found based on your version of APEX. If you are running 3.5 user = APEX_030500. If you are running 4.1 user = APEX_040100
Unlock user and set password through SQL*Plus as SYSTEM
SQL> ALTER USER APEX_040100 ACCOUNT UNLOCK;
SQL> ALTER USER APEX_040100 identified by yourPass;

workspace ID can be found from the SQL workshop utility
select workspace, schemas, workspace_id
from apex_workspaces;

Your APEXExport command should now run successfully by itself and look similar to
java oracle/apex/APEXExport -db localhost:1521:XE -user APEX_040100 -password yourPass -workspaceid 13541863513546

Write a script to make sure your backup directories exist and export all of your applications
Create a new script
touch apex_backup.sh
chmod a+x apex_backup.sh

The script I wrote creates a folder for the day of the week (Mon) and a folder in that folder for the time of day (AM/PM) since I want to backup 2 times a day 7 days a week. It then rolls over each week. The script performs the following steps.
1. Create variables for the backup directories
#/bin/bash

adir=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/apex/utilities
ddir=/mnt/backup/config/apex/backups/$(date +%A)
tdir="$ddir/$(date +%p)"

2. Make sure the working directory and path are correct
cd $adir
export CLASSPATH=.:${ORACLE_HOME}/jdbc/lib/ojdbc14.jar

3. Start the backup log and execute the APEXExport command
echo APEX Backup Started $(date) >> $adir/backup_log
java oracle/apex/APEXExport -db localhost:1521:XE -user APEX_040100 -password yourPass -workspaceid 13541863513546 >> $adir/backup_log

At this point the each application is exported in the form f101.sql f102.sql and so on (101 = application id).

4. Make sure backup directory is mounted
#Check if mount does NOT exist
if ! grep -qs '/mnt/backup' /proc/mounts; then
mount /mnt/backup
fi

5. Create backup directories
#Create backup directories
if [ ! -d "$ddir" ]; then
mkdir $ddir
fi
if [ ! -d "$tdir" ]; then
mkdir $tdir
fi

6. Move backups and copy logs to backup directory
#Copy backups and logs to backup directories
cp -f f*.sql $tdir
echo APEX Backup Completed $(date) >> $adir/backup_log
cp -f backup_log $tdir

So now that we know what each section of the code is doing here is the entire script:
#/bin/bash

adir=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/apex/utilities
ddir=/mnt/backup/config/apex/backups/$(date +%A)
tdir="$ddir/$(date +%p)"

cd $adir
export CLASSPATH=.:${ORACLE_HOME}/jdbc/lib/ojdbc14.jar

echo APEX Backup Started $(date) >> $adir/backup_log
java oracle/apex/APEXExport -db localhost:1521:XE -user APEX_040100 -password HDlsdkjHs -workspaceid 1316703665945575 >> $adir/backup_log

#Check if mount does NOT exist
if ! grep -qs '/mnt/backup' /proc/mounts; then
mount /mnt/backup
fi

#Create backup directories
if [ ! -d "$ddir" ]; then
mkdir $ddir
fi
if [ ! -d "$tdir" ]; then
mkdir $tdir
fi

#Copy backups and logs to backup directories
cp -f f*.sql $tdir
echo APEX Backup Completed $(date) >> $adir/backup_log
cp -f backup_log $tdir

Configure a cron job to run the script twice a day 7 days a week
Edit crontab as root
su
crontab -e

Add one job to run the script at 11:55am and another to run the script at 5:00pm
#APEXExport AM
55 11 * * * /root/apex_backup.sh >/dev/null 2>&1
#APEXExport PM
0 17 * * * /root/apex_backup.sh >/dev/null 2>&1

After a week you will have AM and PM backups for Mon – Sun.

 
No Comments

Posted in IT