Road to OCP
Nov,21th 2004, I was in ZhongShan University.
It was very important step in my career. About 3.5 months’ home preparing, I won my Oracle Cerficated Profession.
Thank you,mum,you’re the greatest mum in my heart. I love you.
Nov,21th 2004, I was in ZhongShan University.
It was very important step in my career. About 3.5 months’ home preparing, I won my Oracle Cerficated Profession.
Thank you,mum,you’re the greatest mum in my heart. I love you.
SuSE 9.1 professional was installed on my office computer insteading of Red Hat Enterprise Linux 3.0 with Update 4. I found SuSE had more beautiful graphic interface than Red Hat series, it looks like Windows XP with green toolbar and colorful button. In fact, I do not like KDE in the first time, maybe GNOME has been used since I know linux.
There are total 5 CD to install SuSE 9.1 professional. After the operating system was installed successful, I found it was very difficult to input Chinese with Ping Yin.Many packages were tested,but only a tools named fcitx-3.0.2.Imgc.i686.rpm could be useful. After installed this rpm packages, press ctrl + space, then Chinese inputing tools bar was displayed in the screen.It’s very easy for me to type Chinese. Resolving this issue makes me very happy, because I even wanted to study the input method applied by SuSE 9 Professional , and installed a fresh operating system. Insisting is the key.
How to connect remote desktop and control them?
In the RHEL period, I used rdesktop tool to connect remote desktop and control it. SuSE linux provides a very easy graphic tool to do this. In the manu of SuSE, System – Remote Connect – Access, and type the following text in the input box:
rdp:/192.168.1.143
Note,there’s only one back slash in the above string. 192.168.1.143 is my Windows IP address. This experience seems as Windows Remote desktop connection.
How to mount windows directory in the networking?
My windows IP address is 192.168.1.143, and computer name is “powerlea-v3afhe”.The windows machine has a shared directory named ‘1103’. In the first test, I tried to use the following command as in Red Hat:
# mount -t smbfs -o username=Phillip,password=aaa //192.168.1.143/1103 /document/test
The error messages was displayed:
5440: session request to 192.168.1.143 failed (Called name not present)
5440: session request to 192 failed (Called name not present)
Why? and how could this error happens? I readed the mount help information and executed this modified command:
# mount -t smbfs -o username=Phillip,password=aaa //powerlea-v3afhe/1103 /document/test
Yeah!!! The windows directory was mounted successfully!!!
SuSE has Kmail tools to receive and send mail. I configured the character encode as gb2312, and when the mail will be sent, in the Kmail toolbar, View-Set Encoding-gb2312, this step could make the mail sent displaying in human read mode.
There is no Snapshoot iron or tools in SuSE. I found in GIMP manu, Acquire – Screenshow, then a dialog box will be displayed, which ask user to confirm the snapshoot range(Fullscreen or defined windows) and time(When will the picture will be taken?).It is very useful.
My computer in the office is installed Red Hat Enterprise Linux 3.0 Update4. I want to try MSN in this operating system. RHEL supplies gaim program which can be configured in MSN,ICQ and other instant message tools. First , in the user’s input box, I create my MSN account and set the proxy server that is tested ok in other Windows.And then, connect the MSN remote server. It seems everything goes well.But as the Gaim showes the sucessful connection message and group’s information, there is the following error breaking the Gaim program:
"unable to write to MSN server via http (error9)"
I’ve searched some document during the Internet, no useful resolution has been found. When I used gaim in FC3(with the latest kernal:2.6.12-1.1381), the MSN plus program works ok.
AMSN is other MSN tools in Linux operating system. I downloaded the latest amsn reversion 0.94 from its website. and then installed the “bin” by executing “# ./xxx.bin”. in the directory created,issue the following command:
# ./amsn
the graphic interface was displayed. New trouble happened.I could not type any character in the input-box and configuration list.
This problem was resolved later by issuing the following command:
# su - # cd /opt/amsn-0.94
where /opt/amsn was the amsn’s main directory.
# ./amsn
After all these steps, amsn would be input character and number,but this soft still could not support Chinese. I tried to download some pitch from a website of Taiwan,and the amsn was configured to traditional Chinese which I ‘m not able to type this in my office’s computer.
This moring, I opened evoluation and gaim at the same time,after some time,the graphic console has no responsibilty.I did not want to reboot the system,so I changed to console by pressing “alt+F2”, and then check the system’s status:
# top # ps -e
I killed evoluation and gaim procession, but the graphic console was still halted.OK,I tried to kill the X procession,then the console returned to log graphic,yes,I’ve done it and resolven this trouble! How happly I am!
1st Part : Introduction
———————————————————-
Oracle 9i offers comprehensive high-performance infrastructure including everything needed to develop,depoly and manage the internet applications:
Benifits:
1.Scalable from department to enterprise
2.Robust reliable available secure archetecture.
3.One development model, easy deployment options.
4.Leverage an organzation’s current skillset throught oracle applications(SQL,PL/SQL,XML,and Java)
5.One management interface
6.Industry standard technology.
Two productes:
1.Oracle9i Application Server
2.Oracle Database
Oracle Application Server runs all your applications:
1.Portal and website
2.Java transaction progress
3.Bussiness transaction process
Oracle database manage and store all the data:
1.object relational data
2.spreadsheet
3.work document
4.powerpoint presentations
5.XML
6.Multimedia file like Mp3,video and graphics.
Oracle 9i is object relational database management system.
1.Use defined types and objects
2.Full compatible with RDBMS
3.support multimedia and large objects
4.improve the performance and function in OLTP(online transaction process)
System development cycle life
1.strategy and analysis
2.design
3.build and document
4.transition
5.production
Database: an organized collection of information.
DBMS: is a progrom that could store,retrieve and modify the data in the database on request.
Four database: Flat-system,network,RDBMS,ORDBMS
RDBMS concepts:
1.1970,Dr E.F.Codd
2.RDBMS models consists the following:
collection of objects and relations
sets of operators act on relations
integraty of data for accuracy and consistency
RDBMS properties:
1.Can be accessed by executing SQL statement
2.Contains collection of tables with no physical points.
3.User operators.
ANSI(American National Standard Institute)
By useing SQL,
1.efficient
2.easy to learn and use
3.functional complete
—————————————————–
2nd Part : Write the basic SELECT statement
Syntax:
SELECT *|{[DISTINCT] column,expression [alias]}
FROM table
* : select all columns
DISTINCT: must following SELECT key word,it is used to encluding duplications.
Alias: 1.following the column
2.use AS key work
3.use double quatotion to include long strings.
DESC table
——————————————————-
3rd Part : Restricting and softing
Restricting by using WHERE clause:
Syntax:
SELECT *|{[DISTINCT] column,express[alias]}
FROM table
WHERE conditions
Conditions include:
1.=,>,>=,<,<=,<>
2.BETWEEN AND,IN(set),LIKE,NULL
3.NOT,AND,OR
In the WHERE conditions,the data and characters must be enclosed by singe quotations.
Softing:
Syntax:
ORDER BY column|expression ASC|DESC
We could also manipulate multiple columns.
——————————————–
4th Part : Sing row Functions
Character functions:
1.Case-sence: UPPER(column|expression)
LOWER(column|expression)
INITCAP(column|expression)
2.Manipulation functions:
CONCAT(column1|expression1,column2|expression2)
LENGTH(column|expression)
SUBSTR(column,m,n)
INSTR(column,m,n)
LPAD|RPAD(column,n,’strings’)
TRIM(leading|tailing|both,trim_string FROM trim_resouce)
REPLACE(test,seaching_String,replace_string)
Date functions:
MONTHS_BETWEEN(date1,date2)
ADD_MONTHS(date1,n)
NEXT_DAY(date,’strings’)
LAST_DAY(date)
ROUND(date,’string’)
TRUNC(date,’string’)
Numeric functions: Round(m,demical n)
TRUNC(m,n)
MOD(m,n)
Conversation functions:
TO_CHAR(date|number,’format’)
TO_NUMBER(character,’format’)
TO_DATE(character,’format’)
General functions:
NVL(expr1,expr2)
NVL2(expr1,expr2,expr3)
IFNULL(expr1,expr2)
COALESCE(expr1,expr2,expr3),return first non-null expression
Two expression: CASE, DECODE
CASE syntax:
CASE expr WHEN comparasion THEN returun_expr1
[WHEN comparasion THEN returun_expr2
WHEN comparasion THEN returun_expr3
]
ELSE exprn
END
DECODE syntax:
DECODE(expr1,search1,result1
search2,result2
…
default)
Next week,I will give Oracle training to some people.
It has important meaning.
Modify the kernel to make Linux run faster:
# cd /usr/src/linux-2.4 # make mrproper # make menuconfig
This step will display a dialog,and I exclude some items which will never be used, for example, Fiber channel,isdr,and pcmcia,(Type “N”),and then save the new configuration,issue the following command:
# make dep (it will take about 5 minutes) # make clean (5 seconds) # make bzImage (10 minutes) # make modules (it's long and will take about 30 minutes) # make modules_install
Note: it is “modules_install” which have no backspace between “modules” and “_install”. and if issue the “make modules -install”, the process will failed with error. The final step is issueing the “reboot”. I’ve tried all the above steps, and my Linux runs faster after rebooting.
nroff: emulate nroff command with groff.
# nroff -man man/libnet.3 | less
Issue the commands as other user account:
# su - username -c "ls"
For example, let root issues “ls” :
# su - root -c "ls"
Uncompress the “.bz” file:
# tar -jvxf xxx.bz
If the file “/etc/inittab” was modified, issue the following command to make the configuration activity.
# init q
Q or q, tell init to re-examine the /etc/inittab fill.
S or s, tell init to switch to single user mode.
Issue some continuous commands, and it will break as soon as error happens.
# command1 && command2 && command3
Uncompress the file included in rpm:
# cat xxx.rpm | rpm2cpio | pax -r
How to mount harddisk and directory owned by local Windows system or Remote windows system?
# mount -t smbfs -o username=x, password=x, //share_path /mnt/c
Ethereal — capture packets.
Create and use .iso file:
# mkisofs -J -r -o xxx.iso /test # mount -o loop xxx.iso /mnt/cdrom
Uncompress xxx.bz file:
# tar -I xxx.bz or # bunzip2 xxx.bz
Check the file’s rpm name:
# rpm -qf /usr/bin/ls
List description information:
# rpm - qpi
List file information:
# rpm - qpl
Configure the Memory limitation in Grub:
grub> kernel /boot/vmlinuz-2.4.19 20 boot=/dev/hda2 mem=120MB
Type Chinese output:
# ls --show-control-chars
Make a Linux boot disk:
# mkbootdisk --device /dev/fd0 2.4.20
Where 2.4.20 is directory in /lib/modules
Modify the ethernet device’s MAC address:
# ifconfig eth0 down # ifconfig eth0 hw ether 00:AA:BB:CC:DD # ifconfig eth0 up
A very important command which is used to check ethernet card’s statue:
# mii-tool -v
mii-tool -view, manipulate media-independent interface status.This utility checks or sets the status of a network interface Media Independent Interface(MII) .
-w watch monitor for link status changes
# du ./ --max-depth=1 # du -sm /directory
List the existed users account in the Linux:
# cat -fl -d: /etc/passwd
Find the MAC address of local ethernet card:
# arp # /sbin/arp
I have two computers in the office, the better one is installed RHEL3.0 update4. It used one Pentium4 775 3.2Ghz CPU and 4GB DDR2 memory,all these were based on Intel SE7221BA1-E engineer sample board. How fastly it runs! Another contains Celeron 533 and poorly 128MB memory,there are two operating system installed in this PC, windows 2000 Professional and Red Hat Linux 9.0.
The Lutos Notes is released by MI recently,and every employees must use this office system. I think the software is famous and be benifit for increasing work rate, but in facl it runs very very slowly so that I have no patience to wait. Through almost my work is done on Linux, I tried to control the Windows computer in my own Linux environment.
I found two tools, VNC and rdesktop. Both of these software were installed successfully, but it seemed that VNC could not response. Rdesktop would work but still could not connect to the windows. It said the windows refused connections. Why?
After reading some document in the Internet, I found that Windows 2000 Professional does not support remote connection ablity or terminal utility. However, Windows 2000 Server families could do this after installing external packages. Remote desktop was embeded in Windows XP and 2003 server. So, I installed a new Windows XP Professional in the PC whose cpu was celeron 533Mhz.
And then issue the rdesktop in the Linux command line:
# rdesktop -u phillip -g "1024*768" 192.168.1.143
“u” means username, phillip is an account of Windows XP
“g” configure the screen displayed in Linux environment
192.168.1.143, IP address of Windows machine.
By the way, the port number, for example 45272, could also be added to the following IP address.It will be useful when connecting to a server has firewall protecting. Everything of the Windows runs well in the Linux rdesktop connection session.
Often we want to execute parallel jobs consisting of standard UNIX commands.By “parallel” we mean the same command runs on multiple nodes of the cluster.Rocks provides a simple tools for this purpose called cluster-fork.
By default,cluster-fork uses a simple series of ssh connections to launch the task serially on every compute node in the cluster.
Cluster-fork is smart enough to ignore dead nodes.Usually the job is “blocking”,cluster-fork waits for the job to start on one node before moving to the next.
By using the “–bg” flag you can instruct cluster-fork to start the jobs in the background.
Often you wish to name the nodes your job is started on,this can be done by using SQL statement or by specifying the nodes using a specific shorthand.
1.frontend,use the SQL database on the frontend:
$ cluster-fork --query "select name from nodes where name like 'compute-1-%'" [cmd]
2.Second method
requires us to explicitly name each node:
--node=compute-0-%d:0-2 : compute-0-0,compute-0-1,compute-0-2 --node=compute-0-%d;0,2-3 : compute-0-0,compute-0-2,compute-0-3
Compute nodes Installation: 1.Login to the frontend as root; 2.Run a program which capture a compute node DHCP requestes and put their information into the Rocks MySQL database:
# insert-ethers
If the frontend and compute nodes are connected via a managed ethernet switch,select “Ethernet Switches”.”Insert-ethers” is waiting for new compute nodes.Power up the first compute node,when the frontend machine receives the DHCP request from the compute node,it indicates that insert-ethers received the DHCP request from the compute node,inserted it into the database and update all configuration files.
When reinstalling very large clusters,load is managed on the frontend by telling compute nodes to back off and retry if the server is too busy.Specially,if the number of concurrently running kickstart.cgi processes exceeds some threshold,the fronted will send a “negative acknowledge” in the form of 503 http error signal.When a compute node receive this signal,it takes a reasonable action and retries its installation later.While the load threshold is reasonable for most clusters,it may be adjusted in the /opt/rocks/etc/kcgive file.Once adjusted,the value is used immediately.
Crossing kickstart:Contain nodes of different hardware architectures.
Mount the CD’s as ISO format:
# mount -o loop *.iso /mnt/cdrom
Frontend installation
Required the following CDs: Rocks Base CD,HPC Roll CD,Kernel Roll CD.As soon as boot off from CD,type “frontend”.This step must be operated fastly before the screen displays the “boot” prompt,or the CD will be told to install a compute node,not frontend we need. We could access the kickstart system by pressing Alt+F3 and Alt+F4 respectively.According to IA-64,the following command should be used:
$ frontend driverload=ide-scsi(or hdb=ide-scsi)
Installation steps:
1.Input CDs,and type “frontend”;
2.Input the cluster information;
3.Partition (Automatic or Disk Druid),If select manual partitioning,you must specify at least 6GB for the root partition and you must create a sperate /export partition.
The default configuration is automatic.
4.Private cluster network configuration;
5.Public cluster network configuration,Note,DHCP is not supported,we must specify the IP address.
6.Configure the gateway and DNS entries;
7.Set the timezone and NTP server;
8.Input the root password;
Then the frontend will format it’s file systems,and install the packages.