 |
|
The gedit Text
Editor
Oracle Database Tips by Donald Burleson |
The text editor
geditis extremely easy to use because it is intuitive.
It can be called from a command line as long as the terminal is open
in an XWindows environment. To edit a particular file, type the
command gedit
</path/filename>. Of course, the
gedit editor can also be called from the command line without
naming a file. If the gedit
button has been added to the taskbar as described at the end of
chapter two, simply clicking this button will launch the
gedit text editor.
So the obvious question is, ?if
geditcan be used, why use
vi??
The answer is that vi can be
launched from and remain within a command line context, important when
using telnet or sshto connect
remotely. Therefore, it is important to become familiar with
vi.
Run Levels
?Run level? is the term used to describe the mode
that the operating system is running in at any given time. The list is
easy to understand and remember. Fedora boots to run level 5 by
default, which means it will boot into a graphical user interface. The
following list describes the available run levels:
Run Level Description
0 Halt - Turn off the computer
1 Single user mode
2 Multiuser, without networking
3 Full multiuser mode, with networking
4 Unused
5 X11 - Graphical User Interface
6 Reboot
The file /etc/inittab sets the run level at boot.
The command grep "default:" /etc/inittab
will display the line in this file which sets the default run level.
The init
command can be used to change the run level, which will require a
shutdown or reboot. Use the command
init 0 to shutdown a node. Use the command
init 6 to reboot. This
command must be run as root.
Refer to Appendix E for instructions on changing
the default run level to 3 in order to launch different windows
managers.
Starting and Stopping
Services
Linux runs programs in the background called
services or daemons. Use the service command to start or stop a
service or to view a list of all the services and their corresponding
statuses. Examples of the service command are as follows:
### start the vsftpd service (ftp server daemon):
service vsftpd start
### stop the vsftpd service:
service vsftpd stop
### restart the vsftpd service:
service vsftpd restart
### view a list of services and the status of each
one:
service -'status -all
Turning a Service
On/Off
When a Linux server boots up, it lists all of the
services it is starting (type [alt+d] when the graphical interface
appears). Many of those services are unnecessary for this Oracle
Project and certainly slow the machine down at least slightly. With
all of those services to start, booting up can take an unbearably long
time.
Use the
chkconfig command to change the operating system configuration
so that a given service starts or does not start at boot time. The
sendmail service is the best
example of a service that does not need to be started at boot time. It
can easily take 5 minutes just to start that one service. The
following are a number of examples of how to use
chkconfig to toggle
sendmail to turn on and off:
### list statuses of each service
chkconfig ?list
### list one service
chkconfig -?list sendmail
### configure so that sendmail never starts on
boot
chkconfig sendmail off
### configure so that sendmail starts when booting
## to runlevel 3
chkconfig ?-level 3 sendmail on
For this project, the following services can be
turned off with chkconfig to speed up the boot process and lighten the
load on the system. If you install the author's suggested list instead
of ?everything,? then only the sendmail and PCMCIA will be installed.
chkconfig sendmail off # email subsystem
chkconfig pcmcia off # support for laptop pcmcia cards
chkconfig hpoj off # HP printer drivers
chkconfig spamassassin off # spam filter
chkconfig privoxy off # web proxy server
chkconfig canna off # Japanese language support
chkconfig FreeWnn off # Japanese language support
Command Line Basics
The command line or shell prompt used by Linux
offers a wide range of commands. Appendix A lists many commands that
will be used as you install and administer Oracle on Linux. There are
a number of shells available on Linux. The default shell or command
line interpreter is BASH. All of the work done in this project is
completed in the BASH shell. Changing shells is unnecessary and not
recommended for this project.
Variables and
Environmental Variables
A number of variables are used by the Bash shell
for its configuration. For example the prompt itself is defined by the
variable PS1, which by default equals '[\u@\h \W]\$ '. This odd group
of symbols is interpreted by the shell which outputs the prompt that
is normally seen when a terminal is open. That prompt can be changed.
To save space, many of the screen-shots captured for this book use a
shorter prompt. This is done by making the variable PS1 equal to
'[\u]\$ '.
Figure 3.6 illustrates the difference between a
variable and an environmental variable. To begin, the
env command returns a list
of all environmental variables which is piped into or combined with
grep PS1. Nothing is found.
Next, the set command, which lists all variables, is piped into
grep PS1. This time, PS1 is
found. Therefore, PS1 is a variable, but not an environmental
variable.
To make PS1 an environmental variable, the export
command is used. Next, var1 and var2 are created, but only var2 is
exported into the environment. Then an xterm is launched. Xterm is a
child process of the gnome-terminal.
It inherits only the environmental variables PS1 and var2.
Environmental variables are important to the
Oracle Database Administrator. They are used to pass information to
the Oracle processes that are launched from the command line.
 |
If you want to learn RAC at home, get the bestselling book "Personal
Oracle Real Application Clusters" by Edward Stoever.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts. |
|