Tuesday, July 24, 2007
GCC 4.1.2 GCC 4.1.2 Install Intructions
http://hpux.cs.utah.edu/hppd/cgi-bin/wwwtar?
/hpux/Gnu/gcc-4.1.2/gcc-4.1.2-src-11.11.tar.gz+gcc-4.1.2/
HPUX.Install+text
ANSI C patches details
http://hpux.connect.org.uk/hppd/answers/4-4.html
Tuesday, June 26, 2007
Adding .flv MIME type in IIS
2) Under HTTP Headers Tab, select "File Types" under the MIME Map section and select "New Type"
3) Type ".flv" as the associated extension and "video/x-flv" as the content type.
4) Select "OK" and you're ready to fly!
Tuesday, June 19, 2007
Oracle 9i Install Guide for Linux (Ubuntu 7.04) - 32bit
Oracle 9i Install Guide for Linux (Ubuntu 7.04) - 32bit
Pre Install Steps
1) Get JRE 1.3.1 (jre1.3.1_20)
1.a) Install this at /opt/jre1.3.1_20
1.b) cd /opt/jre1.3.1_20/bin
1.c) ln -s java jre
1.d) cd /opt/jre1.3.1_20/bin/i386/native_threads
1.e) ln -s java jre
2) Apply patch for Oracle 9i
2.a) unzip p3006854_ 9204_LINUX.zip
2.b) cd 3006854
2.c) sudo sh rhel3_pre_install.sh
3) Set Kernel Parameters
3.a) sudo vim /etc/sysctl.conf
3.b) Add -
kernel.sem = 250 32000 100 128
kernel.shmmax = 2147483648
kernel.shmmni = 128
kernel.shmall = 2097152
kernel.msgmnb = 65536
kernel.msgmni = 2878
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 6500
3.c) execute "sysctl -p" or reboot system to apply above settings
4) Create Oracle account
4.a) groupadd dba
4.b) usradd -g dba oracle
5) Setting Oracle Enviroment *
5.a) sudo mkdir /u01
5.b) sudo mkdir /u01/app
5.c) sudo mkdir /u01/app/oracle
5.d) sudo chown oracle:dba /u01/app/oracle
5.e) sudo vim /etc/profile
5.f) ORACLE_BASE=/u01/app/oracle
ORACLE_SID=WOORAU
export ORACLE_BASE ORACLE_SID
ORACLE_HOME=/home/oracle/OraHome1
export ORACLE_HOME
export PATH:$PATH:$ORACLE_HOME/bin
6) Get Oracle 9i from www.oracle.com
6.a) Login as user oracle
6.b) mkdir Oracle9i
6.c) cd Oracle9i
6.d) Copy all the 3 files here as downloaded
6.e) gunzip ship_9204_linux_disk1.cpio.gz
6.f) gunzip ship_9204_linux_disk2.cpio.gz
6.g) gunzip ship_9204_linux_disk3.cpio.gz
6.h) cpio -idmv <>7) Fix JRE PATH
7.a) sudo vim Disk1/install/linux/oraparam.ini
7.b) JRE_LOCATION=/opt/jre1.3.1_20
8) Run Installer
8.a) ./runInstaller
8.b) edit the JRE_LOCATION setting in the $ORACLE_BASE/oui/oraparam.ini
sudo vim $ORACLE_BASE/oui/oraparam.ini
8.c) JRE_LOCATION=/opt/jre1.3.1_20
Post Install
9) Creating Listner and Database
Installer will create Listener, Database and set Apache server. In case this is not done at that tim we can use these tools to achieve the same.
9.a) For Database use dbca tool in $ORACLE_HOME/bin.
9.b) For creating Listner and Local Service use netca in $ORACLE_HOME/bin.
10) Start and stop script.
10.a) Oracle start script
sqlplus /nolog <<>
* - Additional Settings Fedora Core 2,3,4 only
LD_ASSUME_KERNEL=2.4.1
THREADS_FLAG=native
Note -
In case of error while running runInstaller edit it and change
if [[ ($RHVER = $Check1) || ($RHVER = $Check2) ]];
then
export LD_ASSUME_KERNEL=2.4.19
fi
to
#if [[ ($RHVER = $Check1) || ($RHVER = $Check2) ]];
#then
# export LD_ASSUME_KERNEL=2.4.19
#fi
VCEESetup
Note: If you are using Microsoft Visual Studio Professional, there is no need to apply any of the steps listed below.
The following install packages are required:
| ISO | IMG | |
| Microsoft Visual C++ 2005 Express Edition | download | download |
| Microsoft ® Windows Server® 2003 R2 Platform SDK | download | download |
Steps:
1. Microsoft VCEE
1.1. Install Microsoft Visual C++ 2005 Express Edition
1.2. Start the IDE and follow the instructions from the start page.
2. Platform SDK
2.1. Install Microsoft Windows Server 2003 R2 Platform SDK
2.2. Follow the instructions to add your source, include and library paths (Tools->Options->Projects and Solutions->VC++ Directories) and modify corewin_express.vsprops file.
2.3. Add the additional include directory : $(platformsdkdir)\\Include\\atl, where $(platformsdkdir) is where your SDK is installed. You can set an environment variable in vsvars32.bat to reflect that.
2.4. Modify the following in the atlbase.h (the file should reside in $(platformsdkdir)\\Include\\)
Starting at line 287 in the original file:
/*
PVOID __stdcall __AllocStdCallThunk(VOID);
VOID __stdcall __FreeStdCallThunk(PVOID);
#define AllocStdCallThunk() __AllocStdCallThunk()
#define FreeStdCallThunk(p) __FreeStdCallThunk(p)
#pragma comment(lib, "atlthunk.lib")
*/
#define AllocStdCallThunk() HeapAlloc(GetProcessHeap(), 0, sizeof(_stdcallthunk))
#define FreeStdCallThunk(p) HeapFree(GetProcessHeap(), 0, p)
2.5. It is a very good idea to try to create and build a simple Win32 project in order to verify that all the modifications undertaken are in place.
3. Service Packs
Tuesday, June 12, 2007
JRE for HPUX 11.11
http://www.hp.com/cgi-bin/products1/unix/java/mailform_hm.pl/download_jre_5.0.08_pa-risc.html
OR
wget http://ftp.hp.com/pub/gsy/jre15_15008_pa.tar.Z
OR
wget ftp://ftp.hp.com/pub/gsy/jre15_15008_pa.tar.Z
Friday, June 08, 2007
Using port forwarding with PuTTY
Using port forwarding with PuTTY
This page briefly describes how to use port forwarding using the PuTTY SSH client. Port forwarding is useful when you need to use certain services which are normally only available within the institute.
Suppose you want to setup your PC at home to use our internal proxy server.
First, start PuTTY, specify the host you want to connect to, e.g. shell.cs.uu.nl and the SSH protocol:
Then, click the "Tunnels" tab and specify local port, remote host and port and click the [Add] button:
Finally, press the [Open] button to start the session:
You can, of course, save your settings in the first tab (Session) before you press the [Open] button.
The above example is the equivalent to the UNIX 'ssh' command:
It will forward the local port 3128 to host 'proxy', port 3128, via the SSH connection. PuTTY is an SSH client, so it will still spawn a terminal window. When you're finished using your forwarded connection(s) you can close this window.ssh -L 3128:proxy:3128 your_username_here@shell.cs.uu.nl
Setting up a PDF printer in CUPS (in my case in Slackware)
mkdir /usr/lib/cups/pdf
vim /usr/lib/cups/pdf/ps2pdf.cups
i
Then highlight the following script with the mouse, and middle-click into the terminal session with vim open.
#!/bin/sh
# Convert PostScript to PDF.
umask 002
OPTIONS=""
while true
do
case "$1" in
-*) OPTIONS="$OPTIONS $1" ;;
*) break ;;
esac
shift
done
if [ $# -lt 1 -o $# -gt 2 ]; then
echo "Usage: `basename $0` [options...] input.ps [output.pdf]" 1>&2
exit 1
fi
infile=$1;
if [ $# -eq 1 ]
then
outfile=$1
else
outfile=$2
fi
# Doing an initial 'save' helps keep fonts from being flushed between pages.
exec gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
-sOutputFile=$outfile $OPTIONS -c save pop -f $infile
exec chmod a+r $outfile
chmod 755 /usr/lib/cups/pdf/ps2pdf.cups
2. Create the backend
The next bit of our PDF printer driver goes into /usr/lib/cups/backend
The back-end directory holds several binary executables that take care of varied printing methods, e.g. parallel, usb, ...
We're now going to add a shell-script that handles pdf-files!
vim /usr/lib/cups/backend/pdf
i
#!/bin/sh
#
umask 002
PDFBIN=/usr/lib/cups/pdf/ps2pdf.cups
FILENAME=
# filename of the PDF File
PRINTTIME=`date +%Y-%m-%d_%H.%M.%S`
# no argument, prints available URIs
if [ $# -eq 0 ]; then
if [ ! -x "$PDFBIN" ]; then
exit 0
fi
echo "direct pdf \"Unknown\" \"PDF Creator\""
exit 0
fi
# case of wrong number of arguments
if [ $# -ne 5 -a $# -ne 6 ]; then
echo "Usage: pdf job-id user title copies options [file]"
exit 1
fi
# get PDF directory from device URI, and check write status
PDFDIR=${DEVICE_URI#pdf:}
if [ ! -d "$PDFDIR" -o ! -w "$PDFDIR" ]; then
echo "ERROR: directory $PDFDIR not writable"
exit 1
fi
# generate output filename
OUTPUTFILENAME=
if [ "$3" = "" ]; then
OUTPUTFILENAME="$PDFDIR/unknown.pdf"
else
if [ "$2" != "" ]; then
OUTPUTFILENAME="$PDFDIR/$2-$PRINTTIME.pdf"
else
OUTPUTFILENAME="$PDFDIR/$PRINTTIME.pdf"
fi
echo "PDF file: $OUTPUTFILENAME placed in: $PDFDIR" >> $LOGFILE
fi
# run ghostscript
if [ $# -eq 6 ]; then
$PDFBIN $6 $OUTPUTFILENAME >& /dev/null
else
$PDFBIN - $OUTPUTFILENAME >& /dev/null
fi
exit 0
And as before, this script needs to be made executable, too.
chmod 755 /usr/lib/cups/backend/pdf
3. Download and install distiller.ppd
The printer definition file for distiller is freely available from the adobe-website, if you have a windows-installation handy follow steps 1 to 5 of the instructions...
If you don't: there's some other sites on the web that hold just the ppd rather than an installer. Google is your friend.
Once you have downloaded it add it to your CUPS' printer-model
directory:
cp distiller.ppd /usr/share/cups/model/distiller.ppd
and then, the second to last step:
4. Create the printer object
To be able to use all the pre-requisits that held us up ....
lpadmin -p PDF -v pdf:/directory/of/your/choice/ -E -P /usr/share/cups/model/distiller.ppd
5. Re-start CUPS
Now that all the set-up and installation is done, we need to let the CUPS daemon know about the new printer, too.
To achieve that we restart the daemon.
/etc/rc.d/rc.cups restart
And if all went well we should now have a printer-object that will create PDFs for us.
Tuesday, June 05, 2007
Increading ASP Buffer Limit in IIS 5.0
cd C:\Inetpub\AdminScripts
adsutil set w3svc/aspbufferinglimit 500000000
iisreset
Monday, April 30, 2007
Using cygwin to view a remote xwindow
1) start cygwin vask shell
2) type startx
3) in the x~ window that appears, type:
xhost
where
4) connect to machine using nortel
5) check the IP address of this machine in the nortel connection (e.g. 143.5.x.x)
6) launch a terminal window and connect a terminal window to Host machine ie JOE, REPETE
7) type export DISPLAY=
8) you can now run the x application on the remote machine and all going well, it should appear on the local box (try xclock)
Saturday, April 14, 2007
PHP Compile process in HPUX and Linux
b) run
./configure --enable-libgcc --with-apxs2=/opt/hpws/apache/bin/apxs --with-oracle=/opt/oracle/rtcis/product/9.2.0 --with-oci8=/opt/oracle/rtcis/product/9.2.0 --with-dom -with-zlib
This builds the PHP with support of Oracle (tested with 8i and 9i), XML and Zlib.
c) vi ./libtool
search for deplibs_check_method and replace that with deplibs_check_method="pass_all"
d) make
e) Module build. :)
Thursday, November 09, 2006
Thursday, July 13, 2006
Saturday, July 08, 2006
Memory Leak Detection in C++
01) dmalloc
02) ccmalloc
03) NJAMD
04) YAMD
05) Valgrind
06) mpatrol
07) Insure++
More info is available at http://www.linuxjournal.com/article/6556
Other Linux Development Tools - http://www.hotfeet.ch/~gemi/LDT/tools_deb.html
Install Guides for PHP, APACHE and Oracle
http://www.oracle.com/technology/tech/php/htdocs/inst_php_apache_windows.html
Linux
http://www.oracle.com/technology/tech/php/htdocs/inst_php_apache_linux.html
Oracle Database 10g Express Edition
10.2
http://www.oracle.com/technology/products/database/xe/
Apache HTTP Server
2.0.58
http://httpd.apache.org/download.cgi
PHP Hypertext Processor
5.1.3
http://www.php.net/downloads.php
Underground Guide for PHP n Oracle
http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf
Other PHP - Oracle Install Guides
http://www.oracle.com/technology/tech/php/index.html
Wednesday, July 05, 2006
CSS Tips
Tuesday, June 13, 2006
Saturday, June 10, 2006
Doxygen Tips
01) EXTRACT_ALL - Set this to YES to pull the comments from non-class files.
02) PREDEFINED - Define the PreProcessor like D3_OBJECT_LINKS so that Doxygen can parse the content under them.
Friday, May 26, 2006
PHP 5.1.2 on Windows with ICE Enabled
=======================================
Install Process mentioned below is tested under environment.
Windows 2003
IIS 6.0
PHP 5.1.2
In order to install PHP 5.1.2 on Windows Server 2003 & configured the PHP on IIS.Here are the steps -
01. Download the source code, installer & binary of PHP 5.1.2 for windows. These are available at http://www.php.net/.
02. Run the installer in order to fetch all the dlls, which are unavailable in the binary, it will ask for the path use C:/PHP.
03. Use the binaries, extract the zipped folder & copy all the stuff to C:/PHP, you can check C:/PHP/ext will conatin all the dlls.
04. Move php5ts.dll to c:\windows\php5ts.dll.
Installation of PHP 5.1.2 on Windows Server 2003 is over. PHP5 is now installed on your computer, but you still need to configure it to work with IIS, which we will do in the next step.Now, configured the PHP on IIS -
01. Under Internet Information Services (IIS) Manager, right-click on "Web Service Extensions" in the menu on the left.
02. Then select "Add a new Web service extension..." from the list.
03. Put extension name as "PHP".
04. Browse the file, by clicking at ADD, use C:\PHP\php5isapi.dll for php extension( Used php5isapi.dll for php extension, to avoid CGI error ).
05. Make sure you check the "Set extension status to Allowed" checkbox.
06. In "Internet Information Services (IIS) Manager", left-click on "Web Sites" in the menu on the left and select "Properties". Next, select the "Documents" tab and click on "Add".To ensure that index.php documents open as a default they should be added as a "Content Page".
07. Copy php.ini-recommended from c:\PHP to C:\windows\phpini.
We have to upgrade the PHP for XSL and XSLT by entering the following into
c:\windows\php.ini - extension=php_xsl.dll & set extension_dir= "C:/PHP/ext".
After, this we will do the following for Ice extension for PHP:-
01. Install ICE Ice-3.0.0. This can be downloaded from http://www.zeroc.com/download.html.
02. Build the "IcePhp 3.0.1". (Use the source code for PHP5, for including the library paths) Dependency: Requires Ice for C++ and PHP 5.0.5 or 5.1.2. Here we are using PHP 5.1.2.IcePHP is available at http://www.zeroc.com/download.html.
03. Copy the php_ice.dll to the folder "C:/PHP/ext" from "IcePHP-3.0.1\bin\release".
04. Also copy all the dependencies of IcePhp Use Dependency Viewer Tool to identify this.
- icecpp.exe
- bzip2.dll
- msvcp71.dll
- msvcr71.dll
- ice30.dll
- iceutil30.dll
- slice30.dll
to c:/windows/system32.
05. After, this add the following lines in php.ini -extension=php_ice.dllice.slice = "-IC:/Development/APAL6/D3 C:/Development/APAL6/D3/D3I.ice -IC:/Development/APAL6/APAL3 C:/Development/APAL6/APAL3/APAL3I.ice"so that, the web pages can interact with the C++ APAL6 engine through ICE.
06. Also, make sure that, the PHP pages are using 07. Start the Service & enjoy the web pages on IIS!!.
Thursday, May 25, 2006
Wiki - Three simple rules to edit pages
WordsWithCapitalLetters: All words with embedded capital letters are automatically treated as links to other documents. In this case, wiki would initially show the word wordsWithCapitalLetters like so (WordsWithCapitalLetters)? and allow you to click the hyperlinked question mark to edit/create the page. Once created, wiki would show the word like WordsWithCapitalLetters. The rule goes: if the first lowercase letter is preceeded by an uppercase letter and the word has more uppercase letters following the first lowercase letter the word will be hyperlinked.
((words between double braces)): All words enclosed with double braces are automatically treated as links to other documents. In this case, wiki would initially show the expression ((words between double braces)) like so (words between double braces)? and allow you to click the hyperlinked question mark to edit/create the page. Once created, wiki would show the word like words between double braces
D''''''ontLinkThis, A''''''ndThis, APAL3Test, allOrNothing, APAL3T''''''estCase, APAL3isCool: The six single quotes rule can be used to stop wiki from hyperlinking expressions which should not be hyperlinked. In these examples, wiki would strip the six single quotes simply display: DontLinkThis, AndThis, APAL3Test, allOrNothing, APAL3TestCases, APAL3isCool. The rule goes: if the first lowercase letter is preceeded by an uppercase letter and the word has more uppercase letters following the first lowercase letter the word will be hyperlinked unless you insert six single quotes immediately preceeding the first lowercase letter.
Tuesday, May 16, 2006
J2ME
Got a chance to learn the J2ME from Experts. I hope it happens on Saturday (05/20/2006).
Looking forward to this.
Cheers