> JIRA
1. Edit conf/server.xml and ensure there is no context path set.
<Context path="" docBase="${catalina.home}/atlassian-jira" swallowOutput="true" reloadable="false">
> Tomcat
1. Edit conf/server.xml and ensure the AJP/1.3 Connector node is uncommented.
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
> Connector
1. Create the following directories and files (update paths if required):
Further to my post about multiple webroots and domains in a single instance, to have multiple domains point to a single webroot (.war) you need to do the following:
> JBoss:
1. Edit your jboss-web.xml file (jboss/server/default/deploy/cf_website1.war/WEB-INF/jboss-web.xml) and make sure you have a virtual-host node.
<jboss-web>
<context-root>/</context-root>
<virtual-host>cf_website1</virtual-host>
</jboss-web>
Further to my previous post about setting up Jboss, ColdFusion, Apache on Linux/Mac you can run multiple webroots (.war's) and domains in a single jboss instance if you do the following:
> JBoss:
Contents of jboss/server/default/deploy/ that you need to be concerned with:
>cf_website1.war
>> CFIDE
>> website1
>> WEB-INF
>>> jboss-web.xml
>cf_website2.war
>> CFIDE
>> website2
>> WEB-INF
>>> jboss-web.xml
>jbossweb.sar
>> server.xml
> JBoss:
1. Download JBoss from http://www.jboss.org/jbossas/downloads/.
2. Unzip the downloaded file and put it somewhere convienient.
3. Remove the version (eg. change jboss-5.0.0.GA to jboss).
4. Create a log folder (jboss/server/default/log).
5. Delete the jboss/server/default/deploy/ROOT.war folder.
6. Open the jboss/bin folder and create the following three files (update paths).
Normally when scripting using Windows FTP I use something like this:
Contents of ftp_backup.bat:
ftp -n -s:ftp.scr
Contents of ftp.scr:
open 123.456.789.101
user
username
password
cd BACKUPS
put C:\BACKUPS\mybackups.zip
quit
This automatically uploads mybackups.zip to my FTP everytime the batch script is secheduled to run. Normally this would be fine but it does have its limitations as you can't use varaibles like date in your script. So after playing around for a little while I worked out that I can do the above in a single batch file allowing me to use variables.
I came across this today, Backup all MySQL Databases to individual files. I had been looking for a nice way to do this for quite a while and I think this is simplest and easiest way I've come across to date.
I used their second solution:
for I in `echo "show databases;" | mysql | grep -v Database`; do mysqldump $I > "$I.sql"; done
But had to add in authentication details:
for I in `echo "show databases;" | mysql -u myuser --password="password" | grep -v Database`; do mysqldump -u myuser --password="password" $I > "$I.sql"; done
I've started using s3-bash in a few of my ec2 scripts. It took me a little while to work out the exact syntax so I thought I'd share:
> Get bucket listing:
s3-get -k {accesskey} -s /{path}/{secretid} /{bucketname}
> Get file from bucket:
s3-get -k {accesskey} -s /{path}/{secretid} /{bucketname}/{filename} > {filename}
As part of Amazon's ec2 offering you can take advantage of their Elastic Block Store's. An Elastic Block Store is storage that persists independently from the life of an instance. One of the many advantages this gives you over and above persistent storage is it gives you the ability to take a snapshot of the store at any given time. Over time with multiple stores this can add up to quite a few snapshots. Your limited to 500 snapshots and it can be a painstaking task to clear these out once you reach the limit. So I decided to write a script to do the work for me.
Running ec2-describe-snapshots gives you a listing of your snapshots in chronological order, like so:
SNAPSHOT snap-5c27e636 vol-99c96cf2 completed 2009-06-04T23:08:06+0000 100%
SNAPSHOT snap-5027e640 vol-bff814d8 completed 2009-06-04T23:08:19+0000 100%
SNAPSHOT snap-9c30f0f6 vol-99c96cf2 completed 2009-06-07T23:55:59+0000 100%
SNAPSHOT snap-9330f0fb vol-bff814d8 completed 2009-06-07T23:56:09+0000 100%
If you copy all the records from the output that you want to delete and put them in a file called snaps, you can run the following to turn this into a delete script:
I asked myself this exact question today. Locating my apache httpd binary and running:
./httpd -v
Server version: Apache/2.2.8 (Unix)
Server built: Feb 20 2008 12:01:56
Told me I had Apache 2.2.8 which was cool but I wanted to know what aracheture is was, 32-bit or 64-bit. A little playing round lead me to find out the following way to work out the aracheture of my apache install.
Locate your apache httpd binary and run:
I found the following query a while ago for displaying the progress of a running import, I thought it might useful to someone else so I thought I'd post it up.
--Progress of running import
select substr(sql_text,instr(sql_text,'INTO "'),30) table_name,rows_processed,
round((sysdate-to_date(first_load_time,'yyyy-mm-dd hh24:mi:ss'))*24*60,1) minutes,
trunc(rows_processed/((sysdate-to_date(first_load_time,'yyyy-mm-dd hh24:mi:ss'))*24*60)) rows_per_min
from sys.v_$sqlarea
where sql_text like 'INSERT %INTO "%' and command_type = 2 and open_versions > 0;