<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The Survival Guides&#039;s Blog</title>
	<atom:link href="http://survivalguides.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://survivalguides.wordpress.com</link>
	<description>How to Survive IT and Holidays</description>
	<lastBuildDate>Thu, 19 Jan 2012 12:39:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='survivalguides.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The Survival Guides&#039;s Blog</title>
		<link>http://survivalguides.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://survivalguides.wordpress.com/osd.xml" title="The Survival Guides&#039;s Blog" />
	<atom:link rel='hub' href='http://survivalguides.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Change Sugar CRM URL</title>
		<link>http://survivalguides.wordpress.com/2012/01/19/change-sugar-crm-url/</link>
		<comments>http://survivalguides.wordpress.com/2012/01/19/change-sugar-crm-url/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 12:39:12 +0000</pubDate>
		<dc:creator>survivalguides</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Sugar CRM]]></category>
		<category><![CDATA[Amazon AWS]]></category>

		<guid isPermaLink="false">http://survivalguides.wordpress.com/?p=395</guid>
		<description><![CDATA[I have just installed Sugar CRM in the Amazon cloud. More about the Amazon cloud will be coming in later in Amazon section. &#160; The main issue that I had was that the URL is that of the server and I needed it to be the URL of the ELB (Elastic Load Balancer) in other [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=395&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have just installed Sugar CRM in the Amazon cloud. More about the Amazon cloud will be coming in later in Amazon section.</p>
<p>&nbsp;</p>
<p>The main issue that I had was that the URL is that of the server and I needed it to be the URL of the ELB (Elastic Load Balancer) in other words the URL was set to the hostname of the server.</p>
<p>To change this is relatively simple.</p>
<p>Navigate to</p>
<p style="padding-left:30px;"><strong>/var/www/html/XXXX</strong></p>
<p>where XXXX is the directory where your Sugar installation is.</p>
<p>&nbsp;</p>
<p>Edit the config.php file with your favourite editor and locate the hostname variable. Change this to what ever URL that you want, typically the CNAME entry from your DNS records.</p>
<p>&nbsp;</p>
<p><strong><span style="color:#ff0000;">A word of warning make sure you DNS is updated and proper-gated before change this setting.</span></strong></p>
<p>Restart the HTTPD service and you should have the correct URL in place.</p>
<p>&nbsp;</p>
<p>The steps</p>
<p style="padding-left:30px;"><em>cd /var/www/html/XXXX</em></p>
<p style="padding-left:30px;"><em>cp config.php config.php_DDMMYY</em></p>
<p style="padding-left:30px;"><em>(sudo) vi config.php</em></p>
<p>Change the hostname</p>
<p>Then either</p>
<p style="padding-left:30px;"><em>service httpd restart</em></p>
<p>or</p>
<p style="padding-left:30px;"><em>./etc/init.d/httpd restart</em></p>
<p style="padding-left:30px;">
<p>&nbsp;</p>
<p style="padding-left:30px;">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />Filed under: <a href='http://survivalguides.wordpress.com/category/it-survival/sugar-crm/admin-sugar-crm/'>Admin</a>, <a href='http://survivalguides.wordpress.com/category/it-survival/sugar-crm/'>Sugar CRM</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/survivalguides.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/survivalguides.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/survivalguides.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/survivalguides.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/survivalguides.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/survivalguides.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/survivalguides.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/survivalguides.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/survivalguides.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/survivalguides.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/survivalguides.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/survivalguides.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/survivalguides.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/survivalguides.wordpress.com/395/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=395&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://survivalguides.wordpress.com/2012/01/19/change-sugar-crm-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ab93ef4c2e3997552610538b6ca90be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">survivalguides</media:title>
		</media:content>
	</item>
		<item>
		<title>Create a startup script</title>
		<link>http://survivalguides.wordpress.com/2011/10/11/create-a-startup-script/</link>
		<comments>http://survivalguides.wordpress.com/2011/10/11/create-a-startup-script/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 19:37:52 +0000</pubDate>
		<dc:creator>survivalguides</dc:creator>
				<category><![CDATA[General Admin]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://survivalguides.wordpress.com/?p=390</guid>
		<description><![CDATA[To allow you to auto start a server service in Linux you need to create several files. Create two files and don&#8217;t forget to use chmod 755 on them to make this executable server-stop server-stop #!/bin/sh # chkconfig: 235 99 10 # description: Start or stop the XXXXXX server # ### BEGIN INIT INFO # [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=390&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To allow you to auto start a server service in Linux you need to create several files.</p>
<p>Create two files and don&#8217;t forget to use chmod 755 on them to make this executable</p>
<p>server-stop<br />
server-stop</p>
<p>#!/bin/sh<br />
# chkconfig: 235 99 10<br />
# description: Start or stop the XXXXXX server<br />
#<br />
### BEGIN INIT INFO<br />
# Provides:<br />
# Required-Start: $network $syslog<br />
# Required-Stop: $network<br />
# Default-Start: 2 3 5<br />
# Default-Stop: 0 1 6<br />
# Description: Start or stop the pure-ftp server<br />
### END INIT INFO</p>
<p>start=path to the start script<br />
stop=path to the stop script</p>
<p>name=’what the server name is’</p>
<p>case “$1″ in<br />
‘start’)<br />
$start &gt;/dev/null 2&gt;&amp;1 &lt;/dev/null<br />
;;<br />
‘stop’)<br />
$stop<br />
;;</p>
<p>‘restart’)<br />
$stop ; $start<br />
;;<br />
*)<br />
echo “Usage: $0 { start | stop }”<br />
;;<br />
esac<br />
exit</p>
<p>Save the file and then make the file executable</p>
<p>chmod 755 xxxxxx</p>
<p>To start the service manually</p>
<p>service xxxxxx start</p>
<p>To stop the service manually</p>
<p>service xxxxxx stop</p>
<p>To make the serever auto start then issue the following command</p>
<p>chkconfig –levels 345 xxxxxxxx on</p>
<p>OK thats is the theory see the list for examples</p>
<p><a title="Pure-FTP configuration Linux" href="http://survivalguides.wordpress.com/2011/08/23/pure-ftp-configuration-linux/" target="_blank">pure-ftp start stop</a></p>
<p>glassfish</p>
<br />Filed under: <a href='http://survivalguides.wordpress.com/category/it-survival/linux/general-admin/'>General Admin</a>, <a href='http://survivalguides.wordpress.com/category/it-survival/linux/'>Linux</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/survivalguides.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/survivalguides.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/survivalguides.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/survivalguides.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/survivalguides.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/survivalguides.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/survivalguides.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/survivalguides.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/survivalguides.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/survivalguides.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/survivalguides.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/survivalguides.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/survivalguides.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/survivalguides.wordpress.com/390/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=390&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://survivalguides.wordpress.com/2011/10/11/create-a-startup-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ab93ef4c2e3997552610538b6ca90be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">survivalguides</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating An APEX application</title>
		<link>http://survivalguides.wordpress.com/2011/10/04/creating-an-apex-application/</link>
		<comments>http://survivalguides.wordpress.com/2011/10/04/creating-an-apex-application/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 08:35:48 +0000</pubDate>
		<dc:creator>survivalguides</dc:creator>
				<category><![CDATA[Application Express (APEX)]]></category>
		<category><![CDATA[IT Survival]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://survivalguides.wordpress.com/?p=386</guid>
		<description><![CDATA[You need a container to house the application, in Oracle this is called a schema or user to us none Oracle DBA&#8217;s, confusing yes, but I am sure that an Oracle boffin would be able to explain it. All we need to know is that we need to create one. You can either create one [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=386&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You need a container to house the application, in Oracle this is called a schema or user to us none Oracle DBA&#8217;s, confusing yes, but I am sure that an Oracle boffin would be able to explain it. All we need to know is that we need to create one.</p>
<p>You can either create one with the following script or let the create workspace wizzard help you</p>
<p style="padding-left:60px;">CREATE USER manufacturing IDENTIFIED BY &#8220;A Password&#8221;<br />
DEFAULT TABLESPACE &#8220;USERS&#8221;<br />
TEMPORARY TABLESPACE &#8220;TEMP&#8221;<br />
PROFILE DEFAULT<br />
QUOTA UNLIMITED ON &#8220;USERS&#8221;;</p>
<p>This guide will not take you through how to create a workspace or how to create an application as there are loads of books out there including some free Oracle guides, this and associated posts will hopefully get you around issues and tips to solve bits and pieces.</p>
<p>&nbsp;</p>
<p>Alistair</p>
<p>&nbsp;</p>
<br />Filed under: <a href='http://survivalguides.wordpress.com/category/it-survival/linux/oracle-linux/application-express-apex/'>Application Express (APEX)</a>, <a href='http://survivalguides.wordpress.com/category/it-survival/'>IT Survival</a>, <a href='http://survivalguides.wordpress.com/category/it-survival/linux/oracle-linux/'>Oracle</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/survivalguides.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/survivalguides.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/survivalguides.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/survivalguides.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/survivalguides.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/survivalguides.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/survivalguides.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/survivalguides.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/survivalguides.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/survivalguides.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/survivalguides.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/survivalguides.wordpress.com/386/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/survivalguides.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/survivalguides.wordpress.com/386/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=386&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://survivalguides.wordpress.com/2011/10/04/creating-an-apex-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ab93ef4c2e3997552610538b6ca90be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">survivalguides</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Oracle APEX on Oracle XE</title>
		<link>http://survivalguides.wordpress.com/2011/10/04/installing-oracle-apex-on-oracle-xe/</link>
		<comments>http://survivalguides.wordpress.com/2011/10/04/installing-oracle-apex-on-oracle-xe/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 08:27:29 +0000</pubDate>
		<dc:creator>survivalguides</dc:creator>
				<category><![CDATA[Application Express (APEX)]]></category>
		<category><![CDATA[IT Survival]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://survivalguides.wordpress.com/?p=379</guid>
		<description><![CDATA[This installation is based on the latest Centos 6 build cat /etc/redhat-release = CentOS Linux release 6.0 (Final) Download the xe server and client, for this install I am using the release 10 as my main database is 10gR2 and I hope to port this into the live environment at some point. As usual I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=379&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This installation is based on the latest Centos 6 build</p>
<p>cat /etc/redhat-release = CentOS Linux release 6.0 (Final)</p>
<p>Download the xe server and client, for this install I am using the release 10 as my main database is 10gR2 and I hope to port this into the live environment at some point.</p>
<p>As usual I downloaded all the rpm, zip files into /software</p>
<p>So download the relevant xe server and client</p>
<p>Download oracle-xe-10.2.0.1-1.0.i386.rpm</p>
<p>Download oracle-xe-client-10.2.0.1-1.0.i386.rpm</p>
<p>For this install you also need the latest JDK (I tried many times to get APEX working so not quite sure if you need this but I don&#8217;t think it does any harm)</p>
<p>Download jdk-6u27-linux-i586.rpm</p>
<p>It is work noting that these instructions have been based on the install instructions for APEX, <a href="http://www.oracle.com/technetwork/developer-tools/apex-listener/documentation/index.html">APEX listener</a> and the <a href="http://download.oracle.com/docs/cd/E18930_01/html/821-2427/ghmxb.html#ggrks">Glassfish server</a></p>
<p>The steps are as follows :</p>
<p>Install oracle and configure</p>
<p>Install APEX into oracle</p>
<p>Install Glassfish server &amp; APEX</p>
<p>Install Oracle Listener</p>
<p><strong>Install oracle</strong></p>
<p style="padding-left:30px;"><em>rpm -i oracle-xe-client-10.2.0.1-1.0.i386.rpm oracle-xe-10.2.0.1-1.0.i386.rpm</em></p>
<p>Once installed it will display</p>
<p style="padding-left:60px;">Executing Post-install steps&#8230;</p>
<p>You must run &#8216;/etc/init.d/oracle-xe configure&#8217; as the root user to<br />
configure the database.</p>
<p>Executing Post-install steps&#8230;</p>
<p>Add these lines to the .bashrc file</p>
<p style="padding-left:60px;"><em>cd ~</em></p>
<p style="padding-left:60px;"><em>vi .bashrc</em></p>
<p>export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server<br />
export ORACLE_SID=XE</p>
<p>PATH=$PATH:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin<br />
export $PATH</p>
<p style="padding-left:60px;"><em>:wq</em></p>
<p><strong>Configure Oracle</strong></p>
<p style="padding-left:60px;"><em>/etc/init.d/oracle-xe configure</em></p>
<p style="padding-left:30px;">Oracle Database 10g Express Edition Configuration<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
This will configure on-boot properties of Oracle Database 10g Express<br />
Edition.  The following questions will determine whether the database should<br />
be starting upon system boot, the ports it will use, and the passwords that<br />
will be used for database accounts.  Press &lt;Enter&gt; to accept the defaults.<br />
Ctrl-C will abort.</p>
<p>Specify the HTTP port that will be used for Oracle Application Express [8080]: <strong>Enter</strong></p>
<p style="padding-left:30px;">Specify a port that will be used for the database listener [1521]: <strong>Enter</strong></p>
<p style="padding-left:30px;">Specify a password to be used for database accounts.  Note that the same<br />
password will be used for SYS and SYSTEM.  Oracle recommends the use of<br />
different passwords for each database account.  This can be done after<br />
initial configuration: <strong>Enter password (do not lose)</strong></p>
<p style="padding-left:30px;">Confirm the password:</p>
<p style="padding-left:30px;">Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]: <strong>Enter</strong></p>
<p style="padding-left:30px;">Starting Oracle Net Listener&#8230;Done<br />
Configuring Database&#8230;</p>
<p><strong>NOTE</strong> to stop and start XE use</p>
<p style="padding-left:30px;"><em>service oracle-xe start</em></p>
<p style="padding-left:30px;"><em></em><em>service oracle-xe stop</em></p>
<p>We need to change some parameters in Oracle</p>
<p style="padding-left:30px;"><em>sqlplus sys/(password)@//localhost/xe as sysdba</em></p>
<p style="padding-left:30px;"><em>ALTER SYSTEM SET SHARED_POOL_SIZE=&#8217;100M&#8217; SCOPE=spfile;</em></p>
<p style="padding-left:30px;"><em>exit</em></p>
<p style="padding-left:30px;"><em>service oracle-xe restart</em></p>
<p><strong>Install APEX into Oracle</strong></p>
<p>Download the APEX software (at the time of writing this was version 4.1), as stated before I have downloaded mined to /software</p>
<p style="padding-left:30px;"><em>cd /software/apex_4.1_en/apex</em></p>
<p style="padding-left:30px;"><em>sqlplus sys/(password)@//localhost/xe as sysdba</em></p>
<p style="padding-left:30px;"><em>@@apexins.sql SYSAUX SYSAUX TEMP /i/</em></p>
<p style="padding-left:30px;"><em>@apxchpwd</em></p>
<p>Enter a password for the ADMIN user <strong>Enter admin password that you want</strong></p>
<p style="padding-left:30px;"><em><strong></strong>ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK</em></p>
<p style="padding-left:30px;"><em>ALTER USER APEX_PUBLIC_USER IDENTIFIED BY</em> <strong>ENTER PASSWORD</strong><em>;</em></p>
<p style="padding-left:30px;"><em>exit</em></p>
<p><strong>Install Glassfish server</strong></p>
<p>Download the latest Glassfish server from Oracle from <a href="http://www.oracle.com/technetwork/java/javaee/downloads/index.html">here</a></p>
<p>Again I downloaded this to /software</p>
<p style="padding-left:60px;"><em>cd  /software</em></p>
<p style="padding-left:60px;"><em>mkdir glassfish</em></p>
<p style="padding-left:60px;"><em>cp  ogs-3.1.1.zip glassfish/</em></p>
<p style="padding-left:60px;"><em>cd  glassfish</em></p>
<p style="padding-left:60px;"><em>unzip  ogs-3.1.1.zip</em></p>
<p style="padding-left:60px;"><em>cp -r glassfish3 /opt/</em></p>
<p style="padding-left:60px;"><em>mkdir /opt/glassfish3/glassfish/domains/domain1/docroot/i</em></p>
<p><strong><span style="color:#ff0000;">Note: The &#8216;i&#8217; directory is very important, again not from any notes that I have seen, might have missed this. Got it from a YouTube demo installation.</span></strong></p>
<p style="padding-left:60px;"><em>cd /software/apex_4.1_en/apex/images</em></p>
<p style="padding-left:60px;"><em>cp -r * /opt/glassfish3/glassfish/domains/domain1/docroot/i</em></p>
<p style="padding-left:60px;"><em>cd /opt/glassfish3/glassfish/bin</em></p>
<p style="padding-left:60px;"><em>./asadmin start-domain</em></p>
<p>You may get this error</p>
<p style="padding-left:30px;">Waiting for domain1 to start &#8230;&#8230;..Error starting domain domain1.<br />
The server exited prematurely with exit code 0.<br />
Before it died, it produced the following output:</p>
<p>Launching GlassFish on Felix platform<br />
Oct 3, 2011 1:44:29 PM com.sun.enterprise.server.logging.LogManagerService postConstruct<br />
WARNING: Record begin marker is not a proper value so using default.<br />
Oct 3, 2011 1:44:29 PM com.sun.enterprise.server.logging.LogManagerService postConstruct<br />
WARNING: Record end marker is not a proper value so using default.<br />
Oct 3, 2011 1:44:29 PM com.sun.enterprise.server.logging.LogManagerService postConstruct<br />
WARNING: Log Format field separator is not a character so using default.<br />
[#|2011-10-03T13:44:30.196+0100|INFO|oracle-glassfish3.1.1|org.glassfish.ha.store.spi.BackingStoreFactoryRegistry|_ThreadID=10;_ThreadName=main;|Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry|#]</p>
<p>[#|2011-10-03T13:44:31.188+0100|INFO|oracle-glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=12;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.36 started in: 281ms - bound to [0.0.0.0:3700]|#]</p>
<p>[#|2011-10-03T13:44:31.188+0100|INFO|oracle-glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=11;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.36 started in: 339ms - bound to [0.0.0.0:4848]|#]</p>
<p>[#|2011-10-03T13:44:31.188+0100|INFO|oracle-glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=13;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.36 started in: 406ms - bound to [0.0.0.0:8181]|#]</p>
<p>[#|2011-10-03T13:44:31.188+0100|INFO|oracle-glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=14;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.36 started in: 243ms - bound to [0.0.0.0:7676]|#]</p>
<p>[#|2011-10-03T13:44:31.374+0100|INFO|oracle-glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=10;_ThreadName=main;|Oracle GlassFish Server 3.1.1 (12) startup time : Felix (3,647ms), startup services(2,020ms), total(5,667ms)|#]</p>
<p>[#|2011-10-03T13:44:31.377+0100|SEVERE|oracle-glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=10;_ThreadName=main;|Shutting down v3 due to startup exception : No free port within range: 8080=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@1bb3e9a|#]</p>
<p>[#|2011-10-03T13:44:31.781+0100|INFO|oracle-glassfish3.1.1|javax.enterprise.system.tools.admin.com.sun.enterprise.v3.admin|_ThreadID=15;_ThreadName=Thread-21;|Server shutdown initiated|#]</p>
<p>[#|2011-10-03T13:44:31.812+0100|INFO|oracle-glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=15;_ThreadName=Thread-21;|Already stopped, so just returning|#]</p>
<p style="padding-left:30px;">Command start-domain failed.</p>
<p>If you do, then delete then the default doamin needs to be recreated</p>
<p style="padding-left:60px;"><em>./asadmin delete-domain domain1</em></p>
<p style="padding-left:60px;"><em>./asadmin create-domain &#8211;nopassword domain</em></p>
<p style="padding-left:60px;"><em>./asadmin start-domain</em></p>
<p>Copy the files etc  again</p>
<p>The successful output should look like this</p>
<p>Waiting for domain1 to start &#8230;&#8230;..<br />
Successfully started the domain : domain1<br />
domain  Location: /opt/glassfish3/glassfish/domains/domain1<br />
Log File: /opt/glassfish3/glassfish/domains/domain1/logs/server.log<br />
Admin Port: 4848<br />
Command start-domain executed successfully.</p>
<p>You now have a working Glassfish server ready for the listener and Apex to be deployed.</p>
<p><strong>Configure Glassfish</strong></p>
<p>Navigate to http://FQDN:4848 (where FQDN is your DNS server name)</p>
<p>Change the admin password to start with</p>
<p>Click on domain and then choose the Administrator Password tab</p>
<p>Do not forget to press Save</p>
<p>We now need to create two users:</p>
<p style="padding-left:30px;">Pick Configuration</p>
<p style="padding-left:30px;">Pick Server-config</p>
<p style="padding-left:30px;">Pick Security</p>
<p style="padding-left:30px;">Select the check box next to Default Principal to Role Mapping.</p>
<p style="padding-left:30px;">Save</p>
<p style="padding-left:30px;">Pick Realms</p>
<p style="padding-left:30px;">Pick File</p>
<p style="padding-left:30px;">Manage Users Button</p>
<p style="padding-left:30px;">New Button</p>
<p style="padding-left:30px;">User ID: managerlistener</p>
<p style="padding-left:30px;">Group List: Manager</p>
<p style="padding-left:30px;">New Password:</p>
<p style="padding-left:30px;">Confirm New Password:</p>
<p style="padding-left:30px;">OK</p>
<p style="padding-left:30px;">New Button</p>
<p style="padding-left:30px;">User ID: adminlistener</p>
<p style="padding-left:30px;">Group List: Admin</p>
<p style="padding-left:30px;">New Password:</p>
<p style="padding-left:30px;">Confirm New Password:</p>
<p style="padding-left:30px;">OK</p>
<p><strong>Install Oracle Listener</strong></p>
<p>You should have already downloaded the listener</p>
<p>Select Applications</p>
<p>Click Deploy</p>
<p>Navigate to the downloaded Apex Listener folder and find apex.war file</p>
<p>Click OK</p>
<p>To find the URL that the site will operate on, make sure that you are still in the Applications section from where you deployed the apex.war file. Click on the Launch link under action</p>
<p>This will open a new browser window with the server links, I have two</p>
<p>http://FQDN:55596/apex</p>
<p>https://FQDN:8181/apex</p>
<p><strong>Listener Configure</strong></p>
<p>This area was a little bit of an issue and I still am not quite sure on how it worked in the end to be honest. If you follow the instructions then all should go well. I in stalled this software about six-times on the same server so some of the config was left behind and I am not sure where one of the important files is stored.</p>
<p>The instructions give you the following urls</p>
<p style="padding-left:30px;">https://FQDN:8181/apex/listenerConfigure</p>
<p style="padding-left:30px;">https://FQDN:8181/apex/listenerAdmin</p>
<p style="padding-left:30px;">https://FQDN:8181/apex/listenerStatus</p>
<p>I have yet to get the Status to work (that&#8217;s another day)</p>
<p>To configure the listener</p>
<p>Navigate to http://FQDN:8181/apex/listerConfigure</p>
<p style="padding-left:30px;">Username:APEX_PUBLIC_USER</p>
<p style="padding-left:30px;">Password: As per what was set  above with the SQL script</p>
<p style="padding-left:30px;">Connection Type: (Mine is basic)</p>
<p style="padding-left:30px;">Hostname: FQDN of the sever</p>
<p style="padding-left:30px;">Port:1521</p>
<p style="padding-left:30px;">SID:XE</p>
<p>The assumption is that you did not change any of the defaults when installing Oracle.</p>
<p>The next bit was the hardest bit, as I am not sure where the documentation is for this, all of this has been gleaned from various bits and pieces.</p>
<p>If you get the dreaded</p>
<p>HTTP Status 403 &#8211; Requested url http://:8080/apex/wwv_flow.accept is not allowed.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>then the chances are it has something to do with this setting</p>
<p>The following are the settings that I used to get it up and running, if you find any more documentation around this subject please drop me a line.</p>
<p>Security Tab</p>
<p>Allowed procedures</p>
<p>wwv_flow_file*,www_flow_file*, p, n, cust*, apex*, f, wwv*,www*</p>
<p>As soon as you press the Apply button you should see the APEX screen. There are many sources, but there is not one definitive source that I have found. Hopefully this information will add to what is already out there and help others.</p>
<p>Stay tuned to see if I can now develop in this stuff <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  more posts will be available.</p>
<p>&nbsp;</p>
<p>Hope that you get it working and if you need help drop me a line and I will see if I can give you a hand</p>
<p>&nbsp;</p>
<p>Alistair</p>
<br />Filed under: <a href='http://survivalguides.wordpress.com/category/it-survival/linux/oracle-linux/application-express-apex/'>Application Express (APEX)</a>, <a href='http://survivalguides.wordpress.com/category/it-survival/'>IT Survival</a>, <a href='http://survivalguides.wordpress.com/category/it-survival/linux/oracle-linux/'>Oracle</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/survivalguides.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/survivalguides.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/survivalguides.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/survivalguides.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/survivalguides.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/survivalguides.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/survivalguides.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/survivalguides.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/survivalguides.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/survivalguides.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/survivalguides.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/survivalguides.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/survivalguides.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/survivalguides.wordpress.com/379/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=379&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://survivalguides.wordpress.com/2011/10/04/installing-oracle-apex-on-oracle-xe/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ab93ef4c2e3997552610538b6ca90be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">survivalguides</media:title>
		</media:content>
	</item>
		<item>
		<title>Proxy PAC file hosting and writing</title>
		<link>http://survivalguides.wordpress.com/2011/09/26/proxy-pac-file-hosting-and-writing/</link>
		<comments>http://survivalguides.wordpress.com/2011/09/26/proxy-pac-file-hosting-and-writing/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 08:30:28 +0000</pubDate>
		<dc:creator>survivalguides</dc:creator>
				<category><![CDATA[General Scripts]]></category>
		<category><![CDATA[IT Survival]]></category>

		<guid isPermaLink="false">http://survivalguides.wordpress.com/?p=375</guid>
		<description><![CDATA[I am not going to profess to being an expert in this filed but I have done a few PAC files. I am not going to explain what a PAC file is, because if you are reading this then you already know and need some help. This issue that I found was that no one [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=375&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am not going to profess to being an expert in this filed but I have done a few PAC files.</p>
<p>I am not going to explain what a PAC file is, because if you are reading this then you already know and need some help. This issue that I found was that no one has actually really created a definitive help on this subject so it is almost a black art <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Well for the hosting, as you know that can be on any platform that supports a web server or a shared directory, I don&#8217;t know the cons of a shared drive I have always used a web server.</p>
<p>This used to be hosted on an old Windows 2000 server, there was never a need to move it from this kit, but since we are moving to the virtual environment it has to go. So the obvious platform was one of our Linux servers serving out the company intranet blog.</p>
<p>Centos 5.5, latest Apache version.</p>
<p>You place the PAC file in the www root and point your browser at it and chances it will not display, just point a web browser at it and see what happen, if this is the case there were two issue with my installation.</p>
<p>SELINUX was still on, I hate that thing</p>
<p style="padding-left:30px;"><em>setenforce 0</em> (that is zero)</p>
<p>Will disable this, I am sure there is away around this with and selinux command, but it was internal and it was just getting in the way.</p>
<p>The next thing was that the web server didn&#8217;t know what to do with the PAC file script.</p>
<p>add this line to the httpd.conf file (normally located /etc/httpd/conf/)</p>
<p style="padding-left:30px;">Addtype application/x-ns-proxy-autoconfig pac</p>
<p>Right enough about hosting, the basics of a PAC file are</p>
<p><strong>function FindProxyForURL(url, host) {</strong></p>
<p>Some functions to direct you to a proxy server or not</p>
<p><strong>}</strong></p>
<p>The functions are the key bit, you can paramatise the variables as this is just JavaScript at the ned of the day, but start of simple with hard-coded and then move to variables once it is working. But you knew this anyway, my PAC files are never very long and so I don&#8217;t bother with variables, it everyone&#8217;s own choice.</p>
<p>The basic functions are</p>
<p style="padding-left:60px;">if (evaluate some thing)</p>
<p style="padding-left:60px;">{</p>
<p style="padding-left:60px;">return (proxy / direct);</p>
<p style="padding-left:60px;">}</p>
<p>The return address will formatted either be</p>
<p style="padding-left:30px;">return &#8220;DIRECT&#8221;;</p>
<p style="padding-left:30px;">Will not go through the proxy server</p>
<p>or</p>
<p style="padding-left:30px;">return &#8220;PROXY(the proxy address including the port number)&#8221;</p>
<p style="padding-left:30px;">Will go through the proxy server</p>
<p><strong>So lets start (there is an example at the end as this is the best way that I tend to learn, but it is worth understanding the basics</strong></p>
<p style="padding-left:60px;">if ((host==&#8221; host address FQDN&#8221;))</p>
<p style="padding-left:60px;">{</p>
<p style="padding-left:90px;">return &#8220;DIRECT&#8221;;</p>
<p style="padding-left:60px;">}</p>
<p>This will check to see if the host matches and if so sets it direct and not through the proxy server</p>
<p>&nbsp;</p>
<p>If you need multiple hosts then you can do the following</p>
<p style="padding-left:60px;">if ((host==&#8221; host address FQDN&#8221;)||</p>
<p style="padding-left:60px;">     (host==&#8221; host address FQDN&#8221;)</p>
<p style="padding-left:60px;">   )</p>
<p style="padding-left:60px;">{</p>
<p style="padding-left:60px;">return &#8220;DIRECT&#8221;;</p>
<p style="padding-left:60px;">}</p>
<p style="padding-left:60px;">
<p>To base the direction on the hosts ip address or range</p>
<p style="padding-left:60px;">if (isInNet(host, &#8220;ip address / network range&#8221;, &#8220;network mask&#8221;))</p>
<p style="padding-left:60px;">{<br />
return &#8220;DIRECT&#8221;;</p>
<p style="padding-left:60px;">}</p>
<p style="padding-left:60px;">
<p>We can also evaluate the domain name of the host and base the decisions on this</p>
<p style="padding-left:60px;">if (dnsDomainIs(host, &#8220;.xxxxx.xxxx&#8221;)) {</p>
<p style="padding-left:60px;">return &#8220;DIRECT&#8221;;</p>
<p style="padding-left:60px;">}</p>
<p>Handy for keeping directing traffic to your internal servers especially if there are all on different sub-nets</p>
<p>&nbsp;</p>
<p>If you want to look at a client address and create the direction based of this</p>
<p style="padding-left:60px;">if (isInNet(myIpAddress(), &#8220;ip address / range&#8221;, &#8220;network mask&#8221;)) {<br />
return &#8220;PROXY xxxxxx:xx&#8221;;<br />
}</p>
<p>&nbsp;</p>
<p>If you can write JavaScript then I believe you can use any function if a PAC file.</p>
<p>&nbsp;</p>
<p>You now need to test it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  the best tool I have found is this <a href="http://code.google.com/p/pacparser/">pacparser</a> the windows version is a command line tool, just a note I never got it working when the PAC file was hosted on a web server, but point it at a local file and it works perfectly.</p>
<p>&nbsp;</p>
<p>After writing this I found a brilliant resource <a href="http://www.proxypacfiles.com/proxypac/index.php" target="_blank">here</a>, this has many examples much like above but does go into a bit more detail.</p>
<p>&nbsp;</p>
<p>Now for the example, this is just and example but it does work in a live environment when some of the domains and proxies are changes, I don&#8217;t look for Google in my live environment, this is an illustration of how to use the host function.</p>
<p>&nbsp;</p>
<p>function FindProxyForURL(url, host) {</p>
<p>// start with the exceptions</p>
<p>if ((host == &#8220;www.google.com&#8221;) ||</p>
<p>(host == &#8220;www.google.co.uk&#8221;))</p>
<p>{<br />
return &#8220;DIRECT&#8221;;<br />
}</p>
<p>if (isInNet(host, &#8220;192.3.1.0&#8243;, &#8220;255.255.255.0&#8243;))<br />
{<br />
return &#8220;DIRECT&#8221;;<br />
}</p>
<p>if (isInNet(host, &#8220;192.4.1.0&#8243;, &#8220;255.255.255.0&#8243;))</p>
<p>{<br />
return &#8220;DIRECT&#8221;;<br />
}</p>
<p>if (isInNet(host, &#8220;10.0.0.0&#8243;, &#8220;255.0.0.0&#8243;))<br />
{<br />
return &#8220;DIRECT&#8221;;<br />
}</p>
<p>// send all the company internal domain traffic direct</p>
<p>if (dnsDomainIs(host, &#8220;.mydomain.local&#8221;)) {<br />
return &#8220;DIRECT&#8221;;<br />
}</p>
<p>//if it does not match any thing proxy it</p>
<p>Return &#8220;PROXY proxy.mydomain.local:80&#8243;;</p>
<p>} // End of function</p>
<p>http://www.proxypacfiles.com/proxypac/index.php</p>
<br />Filed under: <a href='http://survivalguides.wordpress.com/category/general-scripts/'>General Scripts</a>, <a href='http://survivalguides.wordpress.com/category/it-survival/'>IT Survival</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/survivalguides.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/survivalguides.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/survivalguides.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/survivalguides.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/survivalguides.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/survivalguides.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/survivalguides.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/survivalguides.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/survivalguides.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/survivalguides.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/survivalguides.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/survivalguides.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/survivalguides.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/survivalguides.wordpress.com/375/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=375&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://survivalguides.wordpress.com/2011/09/26/proxy-pac-file-hosting-and-writing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ab93ef4c2e3997552610538b6ca90be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">survivalguides</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Oracle XE Centos 6</title>
		<link>http://survivalguides.wordpress.com/2011/09/23/installing-oracle-xe-centos-6/</link>
		<comments>http://survivalguides.wordpress.com/2011/09/23/installing-oracle-xe-centos-6/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 15:52:26 +0000</pubDate>
		<dc:creator>survivalguides</dc:creator>
				<category><![CDATA[IT Survival]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://survivalguides.wordpress.com/?p=371</guid>
		<description><![CDATA[We need some small Oracle application writing and have choosen APEX and it fairly easy to use and also FREE always a good thing. To start out we are going to use the Oracle XE version to start us off and if need be install on the live Oracle server. So the build is in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=371&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We need some small Oracle application writing and have choosen APEX and it fairly easy to use and also FREE <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  always a good thing. To start out we are going to use the Oracle XE version to start us off and if need be install on the live Oracle server.</p>
<p>So the build is in Vmware as always and the OS will be Centos 6, trying to keep up with the newest releases.</p>
<p>Download the Oracle XE client and server from the Oracle web site, I am not includin a link as it is your choice which one you want. I am installing:</p>
<p>oracle-xe-client-10.2.0.1-1.0.i386</p>
<p>oracle-xe-10.2.0.1-1.0.i386</p>
<p>Once downloaded then</p>
<p><em>rpm -iv oracle-xe-client-10.2.0.1-1.0.i386.rpm</em></p>
<p><em>rpm -iv oracle-xe-10.2.0.1-1.0.i386.rpm</em></p>
<p>You may get the following error</p>
<p><tt>error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key</tt></p>
<p>If you do then</p>
<p style="padding-left:30px;"><em>yum install bc libc.so.6 libaio.so.1</em></p>
<p>This install the relevant packages required by Oracle.</p>
<p>&nbsp;</p>
<p>To install Oracle</p>
<p style="padding-left:30px;"><em>rpm -iv oracle-xe-10.2.0.1-1.0.i386.rpm</em></p>
<p style="padding-left:30px;"><em>/etc/init.d/oracle-xe configure</em></p>
<p>&nbsp;</p>
<p>This will start the configuration.</p>
<p>Oracle Database 10g Express Edition Configuration<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
This will configure on-boot properties of Oracle Database 10g Express<br />
Edition.  The following questions will determine whether the database should<br />
be starting upon system boot, the ports it will use, and the passwords that<br />
will be used for database accounts.  Press &lt;Enter&gt; to accept the defaults.<br />
Ctrl-C will abort.</p>
<p>Specify the HTTP port that will be used for Oracle Application Express [8080]: <strong>Take the default</strong></p>
<p>Specify a port that will be used for the database listener [1521]:<strong>Take the default</strong></p>
<p>Specify a password to be used for database accounts.  Note that the same<br />
password will be used for SYS and SYSTEM.  Oracle recommends the use of<br />
different passwords for each database account.  This can be done after<br />
initial configuration:<br />
Confirm the password:<strong>Enter a strong password</strong></p>
<p>Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:<strong>y</strong></p>
<p>Starting Oracle Net Listener&#8230;Done<br />
Configuring Database&#8230;Done<br />
Starting Oracle Database 10g Express Edition Instance&#8230;Done<br />
Installation Completed Successfully.<br />
To access the Database Home Page go to &#8220;http://127.0.0.1:8080/apex&#8221;</p>
<p>&nbsp;</p>
<p>To ensure Oracle is started</p>
<p style="padding-left:30px;"><em>service oracle-xe start</em></p>
<p>Starting Oracle Database 10g Express Edition Instance.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p style="padding-left:30px;">
<br />Filed under: <a href='http://survivalguides.wordpress.com/category/it-survival/'>IT Survival</a>, <a href='http://survivalguides.wordpress.com/category/it-survival/linux/'>Linux</a>, <a href='http://survivalguides.wordpress.com/category/it-survival/oracle/'>Oracle</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/survivalguides.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/survivalguides.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/survivalguides.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/survivalguides.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/survivalguides.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/survivalguides.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/survivalguides.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/survivalguides.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/survivalguides.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/survivalguides.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/survivalguides.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/survivalguides.wordpress.com/371/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/survivalguides.wordpress.com/371/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/survivalguides.wordpress.com/371/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=371&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://survivalguides.wordpress.com/2011/09/23/installing-oracle-xe-centos-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ab93ef4c2e3997552610538b6ca90be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">survivalguides</media:title>
		</media:content>
	</item>
		<item>
		<title>How to embed a video in WordPress blog</title>
		<link>http://survivalguides.wordpress.com/2011/08/30/how-to-embed-a-video-in-wordpress-blog/</link>
		<comments>http://survivalguides.wordpress.com/2011/08/30/how-to-embed-a-video-in-wordpress-blog/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 07:31:26 +0000</pubDate>
		<dc:creator>survivalguides</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://survivalguides.wordpress.com/?p=369</guid>
		<description><![CDATA[I am just starting you an internal blog site for various parts of the organisation to allow them to disseminate information to the masses, one of the requirements was to embed video into the blog. &#160; This is done via a plugin, which I would presume there are many, the one that I have found [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=369&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am just starting you an internal blog site for various parts of the organisation to allow them to disseminate information to the masses, one of the requirements was to embed video into the blog.</p>
<p>&nbsp;</p>
<p>This is done via a plugin, which I would presume there are many, the one that I have found and works brilliantly is from <a href="http://wordpress.org/extend/plugins/embedded-video-with-link/">here</a></p>
<p>The instructions are really easy.</p>
<p><strong>Tip</strong> the plugins folder is usually found /var/www/html/XXXX/wp-content/plugins</p>
<p>Where XXXX is the name of the folder that you created to hold the WordPress install (in a single site usually WordPress)</p>
<p>&nbsp;</p>
<p>Just remember that after you have you loaded the folder, ssh onto the server and navigate to the plugins folder and then</p>
<p style="padding-left:30px;"><em>chown -R apache:apache embedded-video-with-link/</em></p>
<p>&nbsp;</p>
<p>Follow the rest of the instructions and you will have a new plugin Icon when composing your posts</p>
<br />Filed under: <a href='http://survivalguides.wordpress.com/category/it-survival/linux/general-admin/wordpress/'>Wordpress</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/survivalguides.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/survivalguides.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/survivalguides.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/survivalguides.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/survivalguides.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/survivalguides.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/survivalguides.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/survivalguides.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/survivalguides.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/survivalguides.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/survivalguides.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/survivalguides.wordpress.com/369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/survivalguides.wordpress.com/369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/survivalguides.wordpress.com/369/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=369&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://survivalguides.wordpress.com/2011/08/30/how-to-embed-a-video-in-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ab93ef4c2e3997552610538b6ca90be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">survivalguides</media:title>
		</media:content>
	</item>
		<item>
		<title>How to change wordpress upload limit from 2MB</title>
		<link>http://survivalguides.wordpress.com/2011/08/30/how-to-change-wordpress-upload-limit-from-2mb/</link>
		<comments>http://survivalguides.wordpress.com/2011/08/30/how-to-change-wordpress-upload-limit-from-2mb/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 07:23:14 +0000</pubDate>
		<dc:creator>survivalguides</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://survivalguides.wordpress.com/?p=367</guid>
		<description><![CDATA[The WordPress upload limit when hosting your own site is set to 2MB, this is also probably the case if you have a hosted site as well, I am sure you guys will let me know. This I have found out (much searching) is down to the php.ini config. There are many posts out there [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=367&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The WordPress upload limit when hosting your own site is set to 2MB, this is also probably the case if you have a hosted site as well, I am sure you guys will let me know.</p>
<p>This I have found out (much searching) is down to the php.ini config.</p>
<p>There are many posts out there that try to give you instructions on what to do, but they always missed something, I came accross this <a href="http://wordpress.org/support/topic/increase-media-library-upload-file-size-limit">post</a> from bh_wp_fan that put me on the right path.</p>
<p>&nbsp;</p>
<p style="padding-left:30px;"><em>vi /etc/php.ini</em></p>
<p>&nbsp;</p>
<p>Find the lines upload_max_filesize, and post_max_size</p>
<p>Alter these to what every you want and away you go. There are a few more tips so by the poster so if need any help I would drop on this section.</p>
<p>&nbsp;</p>
<p>Would have loved to say that I found that out by myself but, bot this time <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<br />Filed under: <a href='http://survivalguides.wordpress.com/category/it-survival/linux/general-admin/wordpress/'>Wordpress</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/survivalguides.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/survivalguides.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/survivalguides.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/survivalguides.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/survivalguides.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/survivalguides.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/survivalguides.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/survivalguides.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/survivalguides.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/survivalguides.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/survivalguides.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/survivalguides.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/survivalguides.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/survivalguides.wordpress.com/367/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=367&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://survivalguides.wordpress.com/2011/08/30/how-to-change-wordpress-upload-limit-from-2mb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ab93ef4c2e3997552610538b6ca90be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">survivalguides</media:title>
		</media:content>
	</item>
		<item>
		<title>Pure-FTP configuration Linux</title>
		<link>http://survivalguides.wordpress.com/2011/08/23/pure-ftp-configuration-linux/</link>
		<comments>http://survivalguides.wordpress.com/2011/08/23/pure-ftp-configuration-linux/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 09:34:58 +0000</pubDate>
		<dc:creator>survivalguides</dc:creator>
				<category><![CDATA[General Admin]]></category>
		<category><![CDATA[IT Survival]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://survivalguides.wordpress.com/?p=359</guid>
		<description><![CDATA[Pure-FTP is a very good FTP server and is easy to install and set-up. There is a little trick to use to get it working but it will ensure that any users that are logged into the FTP session stay in their home folder. Download pure-ftp from here You need the GCC and make packages [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=359&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Pure-FTP is a very good FTP server and is easy to install and set-up. There is a little trick to use to get it working but it will ensure that any users that are logged into the FTP session stay in their home folder.</p>
<p>Download pure-ftp from <a href="http://www.pureftpd.org/project/pure-ftpd">here</a></p>
<p>You need the GCC and make packages to install this</p>
<p><em>yum install GCC</em></p>
<p><em>yum install make</em></p>
<p>&nbsp;</p>
<p>Once downloaded un-tar the file as per normal <em></em></p>
<p style="padding-left:30px;"><em>tar -xf xxxxx.tar</em></p>
<p>There is an install file that explains how to install the server, but the basics are</p>
<p style="padding-left:30px;"><em>./congure</em></p>
<p style="padding-left:30px;"><em>./make</em></p>
<p style="padding-left:30px;"><em>./make install</em></p>
<p>This will install the server. The clever bit is how to start the server. You do this by creating a file in the /etc/init.d directory and a start stop file</p>
<p style="padding-left:30px;"><em>cd /usr/local/sbin</em></p>
<p style="padding-left:30px;"><em>vi pure-ftp-start</em></p>
<p>Insert the following line</p>
<p style="padding-left:30px;"><strong>/usr/local/sbin/pure-ftpd -A -H -E -p 40000:50000 -c 20 -C 3 -I 5 -u 1 &amp;</strong></p>
<p>Save the file and then make the file executable</p>
<p style="padding-left:30px;"><em>chmod 755 pure-ftp-start</em></p>
<p style="padding-left:30px;"><em>vi pure-ftp-stop</em></p>
<p>Insert the following line</p>
<p style="padding-left:30px;">pkill pure-ftpd</p>
<p>Save the file and then make the file executable</p>
<p style="padding-left:30px;"><em>chmod 755 pure-ftp-stop</em></p>
<p style="padding-left:30px;"><em>cd /etc/init.d</em></p>
<p style="padding-left:30px;"><em>vi pureftpd</em></p>
<p>Insert the following lines &#8211; the basis of this has been copied from another startup. Really need to look at some of the stuff at the top, but it works. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>#!/bin/sh<br />
# chkconfig: 235 99 10<br />
# description: Start or stop the Webmin server<br />
#<br />
### BEGIN INIT INFO<br />
# Provides: pure-ftp<br />
# Required-Start: $network $syslog<br />
# Required-Stop: $network<br />
# Default-Start: 2 3 5<br />
# Default-Stop: 0 1 6<br />
# Description: Start or stop the pure-ftp server<br />
### END INIT INFO</p>
<p>start=/usr/local/sbin/pure-ftp-start<br />
stop=/usr/local/sbin/pure-ftp-stop</p>
<p>name=&#8217;pure-ftp&#8217;</p>
<p>case &#8220;$1&#8243; in<br />
&#8216;start&#8217;)<br />
$start &gt;/dev/null 2&gt;&amp;1 &lt;/dev/null<br />
;;<br />
&#8216;stop&#8217;)<br />
$stop<br />
;;</p>
<p>&#8216;restart&#8217;)<br />
$stop ; $start<br />
;;<br />
*)<br />
echo &#8220;Usage: $0 { start | stop }&#8221;<br />
;;<br />
esac<br />
exit</p>
<p>Save the file and then make the file executable</p>
<p style="padding-left:30px;"><em>chmod 755 pureftpd</em></p>
<p>To start the service manually</p>
<p style="padding-left:30px;"><em>service pureftpd start<br />
</em></p>
<p>To stop the service manually</p>
<p style="padding-left:30px;"><em>service pureftpd stop</em></p>
<p>To make the pure-ftp serever auto start then issue the following command</p>
<p style="padding-left:30px;"><em>chkconfig &#8211;levels 345 pureftpd on</em></p>
<p><em><br />
</em></p>
<br />Filed under: <a href='http://survivalguides.wordpress.com/category/it-survival/linux/general-admin/'>General Admin</a>, <a href='http://survivalguides.wordpress.com/category/it-survival/'>IT Survival</a>, <a href='http://survivalguides.wordpress.com/category/it-survival/linux/'>Linux</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/survivalguides.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/survivalguides.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/survivalguides.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/survivalguides.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/survivalguides.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/survivalguides.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/survivalguides.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/survivalguides.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/survivalguides.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/survivalguides.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/survivalguides.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/survivalguides.wordpress.com/359/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/survivalguides.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/survivalguides.wordpress.com/359/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=359&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://survivalguides.wordpress.com/2011/08/23/pure-ftp-configuration-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ab93ef4c2e3997552610538b6ca90be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">survivalguides</media:title>
		</media:content>
	</item>
		<item>
		<title>Copy data and create directory</title>
		<link>http://survivalguides.wordpress.com/2011/06/15/copy-data-and-create-directory/</link>
		<comments>http://survivalguides.wordpress.com/2011/06/15/copy-data-and-create-directory/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 10:37:09 +0000</pubDate>
		<dc:creator>survivalguides</dc:creator>
				<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://survivalguides.wordpress.com/?p=351</guid>
		<description><![CDATA[&#160; A script to copy data and create a directory &#160; today_date=`date +%e%m%y` #trims the space when date start with a 0 current_date=&#8221;${today_date#&#8221;${today_date%%[![:space:]]*}&#8221;}&#8221; # The directory that the orders will be backed upto backup_directory=/home/nisbets_copyorders/$current_date # The backup home directory backup_directory_home=/home/copyorders # The directory to copy the orders to to_directory=/home/incoming # The directory to copy the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=351&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>A script to copy data and create a directory</p>
<p>&nbsp;</p>
<p>today_date=`date +%e%m%y`</p>
<p>#trims the space when date start with a 0<br />
current_date=&#8221;${today_date#&#8221;${today_date%%[![:space:]]*}&#8221;}&#8221;</p>
<p># The directory that the orders will be backed upto<br />
backup_directory=/home/nisbets_copyorders/$current_date<br />
# The backup home directory<br />
backup_directory_home=/home/copyorders<br />
# The directory to copy the orders to<br />
to_directory=/home/incoming<br />
# The directory to copy the orders from<br />
from_directory=/home/xxx/incoming</p>
<p>echo $current_date<br />
echo $backup_directory<br />
echo $to_directory<br />
echo $from_directory</p>
<p>cd $backup_directory_home<br />
#if the backup directory exists then don&#8217;t do anything, if it does not then create it<br />
if [ ! -d "$backup_directory/" ]; then<br />
cd $backup_directory_home<br />
mkdir $current_date<br />
fi</p>
<p>cd $from_directory<br />
cp $from_directory/* $to_directory/<br />
cp $from_directory/* &#8220;$backup_directory/&#8221;</p>
<p>rm -f /home/xxx/incoming/*</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />Filed under: <a href='http://survivalguides.wordpress.com/category/it-survival/linux/scripting/'>Scripting</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/survivalguides.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/survivalguides.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/survivalguides.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/survivalguides.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/survivalguides.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/survivalguides.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/survivalguides.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/survivalguides.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/survivalguides.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/survivalguides.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/survivalguides.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/survivalguides.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/survivalguides.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/survivalguides.wordpress.com/351/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=survivalguides.wordpress.com&amp;blog=12461366&amp;post=351&amp;subd=survivalguides&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://survivalguides.wordpress.com/2011/06/15/copy-data-and-create-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7ab93ef4c2e3997552610538b6ca90be?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">survivalguides</media:title>
		</media:content>
	</item>
	</channel>
</rss>
