快速业务通道

LinuxCBT_EL-5_Edition_Notes(1)

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-03-29

###LinuxCBT EL-5 Edition###
Focuses on: RedHat Enterprise v5x
Successor to LinuxCBT EL-4 Edition, which succeeds LinuxCBT Classic Edition

Features:
1. 2.6x kernel (2.6.18)
a. ''uname a'' returns OS/Kernel information
Note: ''uname -a'' returns the following usefull info:
1. OS - Linux
2. Full Qualified Domain Name (FQDN)
3. Kernel version - 2.6.18...
a. 2.6 = major version
b. .18 = minor version
c. anything else after the minor version indicates that the kernel was patched by the distributor
4. Date and timie that the kernel was compiled

2. Supports multiple versions:
a. Basic - Red Hat Enterprise Linux Server
a1. supports 2 physical (Socket) CPUs
a2. Up to 4 virtual guests

b. Advanced Plateform
b1. Supports unlimited physical CPUs
b2. Supports unlimited virtual guests

Note: Virtualization limits pertain to the virtualization technology included with Red Hat Enterprise Linux. NOT third-party software (VMWare)


3. Supports the following platforms:
a. 英特尔 32/64-bits
b. AMD 32/64-bits
c. IBM - POWER and z-series, S/390

Note: Memory limitation is based on hardware


Note: Common uses of the various versions of RHEL
1. RHEL Basic Version
a. File & Print
b. Web server
c. Infrastructure server (DHCP, DNS, Proxy, etc.)

2. RHEL Advanced Version
a. Application server (Apache Tomcat, JBOSS, Weblogic, WebSphere, etc.)
b. Database server (MySQL, PostgreSQL, Oracle, Ingres, etc.)
c. Clustering



###INSTALL RH5 USING THE NETWORK - HTTP###

Empire CMS,phome.net

Setps:
1. Download DVD ISO image for RH5
2. Create a directory beneath your web root: /srv/www/linuxcbt.com/RH5/i386
3. Mount the DVD ISO image to the web root:
a. mount -t iso9660 -o loop source_file.iso /srv/www/linuxcbt.com/RH5/i386
4. Test the accessibility using a web browser
Note: Ensure that web server permits directory browsing (indexes)

5. Create boot CD-ROM using http://192.168.75.100/RH5/i386/images/boot.iso OR optionally boot with:
a. First CD-ROM of five
b. DVD-ROM

5. Boot the server with the bootable media and indicate ''linux askmethod''

###Kickstart Configurator###

Features:
1. Hands-free, automated installation
2. Scripted installation
3. Script can be used on multiple systems

Note: ''system-config-kickstart'' is NOT installed by default

Steps:
1. Open previously created ''anaconda-ks.cfg'' file and modify
2. Defune partitions accordingly
3. Confirm settings
4. Publish the ''ks.cfg'' file to HTTP server
5. Install server using the following at the main menu:
''linux ks=http://192.168.75.100/ks.cfg''

Note: The following can be used to boot a kickstart installation:
1. boot.iso CD-ROM
2. First CD-ROM of the RH5 installation set
3. The DVD-ROM of the RH5 isntallation set
4. USB Pen/Stick - diskboot.img (use dd)


###FTP INSTALLATION###

Steps:
1. Create FTP user account on FTP server
a. ''useradd -s /bin/false -d /srv/www/linuxcbt.com linuxinstall''
b. ''passwd linuxinstall''
2. Confirm FTP connectivity as the user ''linuxinstall''

3. Reboot server with ''boot.iso'' CD and type ''linux askmethod''



Power On -> BIOS (RAM, Keyboard, mouse, storage, etc.) -> Bootable Media (MBR 512bytes - bootcode(Stage 1 GRUB)) -> GRUB(Stage 1.5) -> Menu(Stage 2) -> INIT -> /etc/inittab -> sets up the appropriate runlevel
Empire CMS,phome.net



###BASIC LINUX COMMANDS###

1. tty -reveals the current terminal
2. whoami - reveals the currently logged-in user
3. which - reveals where in the search path a program is located
4. echo - prints to the screen
a. echo $PATH - dumps the current path to STDOUT
b. echo $PWD - dumps te contents of the $PWD variable
c. echo $OLDPWD - dumps the most recently visited directory
5. set - prints and optionally sets shell variables
6. clear - clears the screen or terminal
7. reset - resets the screen buffer
8. history - reveals your command history
a. !690 - executes the 690th command in our history
b. command history is maintained on a per-user basis via:
~/.bash_history
~ = user''s $HOME directory in the BASH shell
9. pwd - prints the working directory
10. cd - changes directory to desired directory
a. ''cd '' with no options changes to the $HOME directory
b. ''cd ~'' changes to the $HOME directory
c. ''cd /'' changes to the root of the file system
d. ''cd Desktop/'' changes us to the relative directory ''Desktop''
e. ''cd ..'' changes us one-level up in the directory tree
f. ''cd ../..'' change us two-levels up in the directorytree
11. Arrow keys (up and down) navigates through your command history
12. BASH supports tab completion:
a. type unique characters in the command and press ''Tab'' key
13. You can copy and paste in GNOME terminal windows using:
a. left button to block
b. right button to paste OR Ctrl-Shift-v to paste
14. ls - lists files and directories
a. ''ls /'' - lists the contents of the ''/'' mount point
b. ''ls -l'' - lists the contents of a direcoty in the long format:
Includes: permissions, links, ownership, size, date, name
Empire CMS,phome.net

c. ''ls -ld /etc'' - list properties of the directory ''/etc'', NOT the contents of the ''/etc''
d. ''ls -ltr'' - sorts chronologically from older to newer (bottom)
e. ''ls --help'' - returns possible usage information
f. ''ls -a'' - reveals hidden files. e.g. ''.bash_history''
Note: files/directories prefixed with ''.'' are hidden. e.g. ''.bash_history''

15. cat - catenates files
a. ''cat 123.txt'' - dumps the contents of ''123.txt'' to STDOUT
b. ''cat 123.txt 456.txt'' - dumps both files to STDOUT
c. ''cat 123.txt 456.txt > 123456.txt'' - creates new catenated file

16. mkdir - creates a new directory
a. ''mkdir testRH5'' - creates a ''testRH5'' directory

17. cp - copies files
a. ''cp 123.txt testRH5/''
Note: By default, ''cp'' does NOT preserve the original modification time

b. ''cp -v 456.txt testRH5/''

18. mv - moves files
a. ''mv 123456.txt testRH5/'' - moves the file, preserving timestamp

19. rm - removes files/directories
a. ''rm 123.txt''
b. ''rm -rf 456.txt'' - removes recursively and enforces

20. touch - creates blank file/updates timestamp
a. ''touch test.txt'' - will create a zero-byte file, if it doesn''t exist
b. ''touch 123456.txt'' - will update the timestamp
c. ''touch -t 200301091530 123456.txt'' - changes timestamp

21. stat - reveals statistics of files
a. ''stat 123456.txt'' - reveals full attributes of file

22. find - finds files using search patterns
a. ''find / -name ''fstab''''

Note: ''find'' can search for fields returned by the ''stat'' command

23. alias - returns/sets aliases for commands
a. ''alias'' - dumps current aliases
b. ''alias copy=''cp -v''''
Empire CMS,phome.net



###Linux Redirection & Pipes###
Features:
1. Ability to control input and output

Input redirection ''<'':
1. ''cat < 123.txt''
Note: Use input redirection when program does NOT default to file as input

Output redirection ''>'':
1. ''cat 123.txt > onetwothree.txt''
Note: Default nature is to:
1. Clobber the target file
2. Populate with information from input stream

Append redirection ''>>'':
1. ''cat 123.txt >> numbers.txt'' - creates ''numbers.txt'' if it doesn''t exist, or appends if it does
2. ''cat 456.txt >> numbers.txt''


Pipes ''|'':
Features: Connects the output stream of one command to the input stream of a subsequent command

1. ''cat 123.txt | sort
2. ''cat 456.txt 123.txt | sort
3. ''cat 456.txt 123.txt | sort | grep 3


###Command Chaining###
Features:
1. Permits the execution of multiple commands in sequence
2. Also permits execution based on the seccess or failure of a previous command

1. ''cat 123.txt; ls -l'' - this runs first command, then second commmand without regards for exit status of the first command

2. ''cat 123.txt && ls -l'' - this runs second command, if first command successful
3. ''cat 1234.txt && ls -l''

4. ''cat 123.txt || ls -l'' - this runs second command, if first command fails

24. more|less - paginators, which display text one-page & a time
a. ''more /etc/fstab''
b. ''less 1thousand.txt''

25. seq - echoes a sequence of numbers
a. ''seq 1000 > 1thousand.txt'' - creates a file with numbers 1-1000

26. su - switches users
a. ''su'' - with no options attempts to log in as ''root''
Empire CMS,phome.net


27. head - displays opening lines of text files
a. ''head /var/log/messages''

28. tail - displays the closing lines of text files
a. ''tail /var/log/messages''

29. wc - counts words and optionally lines of text files
a. ''wc -l /var/log/messages''
b. ''wc -l 123.txt''

30. file - determines file type
a. ''file /var/log/messages''


###Tar, Gzip, Bzip2, Zip###
Features:
1. Compression utilities (gzip, bzip2, zip)
2. File rollers (the ability to represent many files as one)


Gzip:
Includes:
1. gzip - compresses/decompresses files
2. gunzip - decompresses gzip files

Tasks:
1. compress ''1million.txt'' file using gzip
a. ''gzip -c 1million.txt > 1million.txt.gz

Note: gzip aoto-dumps to STDOUT, by default

b. ''gzip -l 1million.txt.gz'' - returns status information
c. ''gunzip 1million.txt.gz'' - dumps to file, and removes compressed version
d. ''gzip -d 1million.txt.gz'' - dumps to file, and removes compressed version
e. ''zcat 1million.txt.gz'' - dumps the contents to STDOUT
f. ''less 1million.txt.gz'' - dumps the contents of gzip files to STDOUT


Bzip2:

1. ''bzip2 -c 1million.txt > 1million.txt.bz2''

Note: Bzip2 tends to outperform gzip on large files
2. ''bunzip2 1million.txt.bz2''
3. ''bzip2 -d 1million.txt.bz2''
4. ''bzcat 1million.txt.bz2'' - dumps contents to STDOUT
5. ''less 1million.txt.bz2'' - also dumps the contents to STDOUT


Zip & unzip:
1. ''zip filename.zip path/'' - general usage
2. ''zip 1million.txt.zip 1million.txt''
Note: zip differs slight from gzip and bzip2 in that the destination file (resultant zip file) is specified before the source
Empire CMS,phome.net

c. ''yum -y install dhcp gftp'' installs 2 packages

3. Remove Package
a. ''yum -y remove gftp''


###Cron - Scheduler###

Features:
1. Scheduler
2. Rules Cron entries) are based on times:
a. minute (0-59)
b. hour (0-23)
c. day of the month (1-31)
d. month (1-12)

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号