Ten
)
Partitioning principle
Windows
Linux
If it is Linux, you must ensure that it has at least two partitions (root partition, one swap partition)
Root partition: The entire Linux file structure
Swap partition: Swap partition, when system memory is low, the system will run as part of memory using swap partition
Swap partition Size setting: If the memory is less than 1G recommended, using twice times the memory, if the system memory 1G or more , it is recommended to use 1G to format the partition
A ) to create Partitioning
First, for security reasons, we recommend that you create a boot partition
Size is 100M, click OK
Create swap partition to 1G
Create a root partition
- ) Set boot partition
1 4 ) network configuration, default
1 5 ) Firewall Settings
1 6 ) Language Support
1 7 ) Select time Zone
1 8 ) Create an administrator password
1 9 ) Software Installation Select Custom
- ) to Custom-made software
X Window System
GNOME desktop system or KDE desktop system
Editor (VI)
Graphic Internet with text Internet (Firefox browser)
Server (PHP)
World Wide Web server
Window File Server
FTP Server
SQL database
Network server
Development tools
Management tools ) Next, boot the system installation
A ) when the following interface appears, insert the next Zhang CD
at ) Select disc, connect Connection , continue to install
Four , in Linux the directory structure
L/bin: System Command Directory
L/dev: System Equipment Catalog
L/home: User's home, in Linux, per user (non-root admin) Wang
/home/wang/home/li
L/lib: System library file. So dynamic library. A static library
L/media: System multimedia Directory (floppy drive, optical drive)
L/MNT: System mount Directory (external U-disk)/mnt/usb
L/proc: System memory Directory
L/sbin: Super Admin root Command directory
L/TMP: System Cache Directory
L/var: System temp directory (frequent change) database file, Web page file, log file
L/boot: System startup Directory
L/ETC: System Configuration file directory
L/lost+found: Lost and claimed office
L/opt: Third party program directory (QQ, WPS)
L/root: The home of the Super admin
L/USR: System program directory (Apache, PHP, MySQL) five , Shell command 1, Shell schematic
2. Common shell Directives 1) basic format
Directive option parameters
Directive options
Instruction parameters
Directive 2) common directives
LS: View current path file information
-L: View file details
The above instructions can also be written in ll form, can also achieve the above effect
-A: View all information about a file (including hidden files)
The above options can also be written together as follows
Note: For many students if you can't remember what attachment parameters or options The shell has, you can use the man (manual abbreviation) command to query the current instruction information.
After reading, you can exit by letter Q
PWD: Viewing the current workspace
CD: Switch directories
CD Space/home/zhangsan
CD Space: Skip to top level directory
CD Space ~ Back to Super Admin home
Clear Clear Screen operation
Login: Login
Logout: Logout (Logout)
The above two commands are primarily for the character interface
Graphical interface: CTRL+ALT+F7
Character Interface: Ctrl+alt+f1~f6
Shutdown: Shut down the machine
-H: How many minutes after the shutdown shutdown–h minutes (if 0 is immediately shutdown)
–r: Number of minutes after the restart Shutdown–r minutes (if 0 is immediately restarted)
–k: Warning number of minutes after the shutdown shutdown–k minutes (do not perform shutdown instructions, just a warning message)
-C: Abort shutdown instruction (usually with CTRL + C abort shutdown command)
Halt: Shut Down (Linux only, but not power off)
Reboot: Restart six , vi editor
Visual Interface vi Editor (Notepad) 1, enter vi
The VI Editor can be opened by entering the VI command in the terminal
2) Three modes of the VI editor
L Command mode
When the VI editor is opened, the mode in which the system is located is the command mode
L Insert Mode input
When we enter the letter A or letter I, the system automatically enters the input mode
L Last line mode
When we enter ESC, the system automatically enters the last line mode 3)VI common Directives
VI FileName: Open or create a file
When we have a VI file name, the file is automatically created when the file does not exist, or the file is opened automatically.
VI + FileName: Open the file and position the file cursor as the last line
VI +n FileName: Open file and position file cursor to Nth line
VI +/string FileName: Open file and Highlight string string
VI filename FileName: Open or create multiple files at the same time
In the last line mode, you can use the
:p Rev Switch to previous file
: Next or: N switches to the next file 4) commonly used end-line commands
: w: Save current file
: Q (Quit): Exit the current file
: Wq: Save and exit
: q! : Forced exit
: wq! : Force Save to exit
: Set Nu: Displays the current file line number
: Set Nonu: Hides the current line number
: Noh: Suppress highlighting
: u: Undo 5) Common Command mode
DD: cut when moving forward
YY: Copy the current flight
P: Paste 6) three mode diagram
Seven , RPM binary package software Installation
If we want to query, install, uninstall, upgrade, manage and so on RPM package software, then we must use RPM instruction 1, find installed software
Find installed packages with RPM–QA
If you want to find an exact software, you can do so by piping command grep.
The basic syntax is as follows:
Rpm–qa |grep Keywords
2. Uninstalling installed RPM packages
Basic syntax:
Rpm–e Software Name
If the software uninstallation fails (there is a dependency) it can be forced to unload with-nodeps
Note: Please do not force uninstall 3, install rpm software If no special instructions from Ko Tao
Install VI Software
Location: Disc 2
Software: vim-enhanced-6.3.035-3.i386.rpm
If you need to install the disc, insert the disc, and before inserting it, you can unmount the optical drive by eject instructions
Then select Disc 2, and click Connected
Note: Since we are using an optical drive device, the Linux system will automatically map the optical drive files to the/media multimedia directory, which can be accessed via CD instructions
If we can't remember the usual directories or commands, we can use the tab button to
Go to Redhat folder
Enter RPMs, all of our disc rpm files are stored in this folder 4) Installation Instructions
RPM–IVH Software Name
-I: Installing the Software
-VH: Show Installation progress
The following prompt appears:
Note: Since the VIM software has dependencies, you need to install the Vim-common file first
Eight , single-user mode hack
1, restart the Linux system, and then enter the letter E in a few seconds interface, the following interface appears
2. Enter the letter E again to enter the following interface
3. Select the second option and enter the letter E again
4, delete the following letters, and write to single, enter (enter)
5, enter the following interface, input the letter B restart System
6. Enter passwd root (reset root user password)
Repeat the password two times: (more than 6 recommended)
The following interface appears, representing the reset success
Restart Linux system, enter reboot (restart)
Through the password just set to log on the system, found that everything is normal.
For real-machine systems, it is strongly recommended that you set the GRUB load password to prevent users from cracking the Linux system in single-user mode.
20150306+linux installation + Common Commands-02