In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Linux Core Secret Book
1. Linux system is strictly case-sensitive.
2. Linux everything is a file
3. Spaces are required between Linux commands
Network operation and maintenance course syllabus
Windows
Network technology (Cisco, Huawei)
Linux
1. The computer consists of hardware and software.
Hardware: visible and palpable (monitor / keyboard / mouse / chassis / motherboard / cpu/ memory / hard drive.)
Software:
System software windows/Linux/unix
Application software qq/360/office/...
two。 Computer classification
Almost 99% of personal computers are installed with Windows. At present, Windows 10 is the first choice.
Almost 90% of the servers are installed with Linux
I. installation of Linux system
1. Linux directory structure
/ starting point of the root partition Linux file system
There is only one root partition in the Linux system, and all the data in the Linux is stored under /.
/ bin commands used by ordinary users
Commands used by / sbin administrator
/ boot stores startup-related files, kernel vmlinuz...
/ root administrator's home directory
/ home the home directory of an ordinary user
/ dev storage device related, hard disk, CD-ROM drive, floppy disk, keyboard.
/ etc configuration file storage location
/ var stores data, related to log
/ tmp temporary file storage location
two。 File system
Concept: format of disk
Windows NTFS 、 Fat32
Linux XFS 、 ext2/ext3/ext4
Swap swap partition, virtual memory 8G
3. Create a new installation environment for CentOS7
Double-click the desktop VMware Workstation Pro icon / file / create a new virtual machine / customize, next / select to install the operating system later, next / select Linux,Red Hat Enterprise 7 64-bit, next / modify the virtual machine name CentOS7, install location change D:\ Virtual Machines\ CentOS7, next / next / memory 2048m, next / hard disk modify to SATA, next / next / disk adjustment to 80g Next step / finish
4. Install CentOS7 in VMware
a. Put it into the installation CD
Select CD/DVD (SATA) / choose to use the ISO image file / D:\ net worker package\ package\ ISO\ CentOS-7-x86_64-Everything-1511.iso/ to ensure that the above device status is selected / determined
b. Start the virtual machine power, select Install CentOS 7, and enter
c. Installation language selection Chinese, simplified Chinese, continue, keyboard / options / ctrl+shift/ complete
SECURITY/ shutdown / complete
Software selection / GNOME/ completion
d. Installation location / I want to configure partition / complete / select standard partition
Click + / mount point select / boot, size 200m, add mount point /
Click + / mount point selection /, size 20000m, add mount point /
Click + / mount point to select swap, size 8192 M
Complete / start installation
e. Click the root password, set the password to centos, and complete / restart
f. Initialization after installation (if text interface): 1-> 2-- > c-> c
2. Basic operation of Linux system
1. Account management
Windows administrator administrator
Linux administrator root
two。 Switching between graphical desktop and command line interface
Centos7 provides six terminal environments from F1 to F6, where F1 is a graph and F2-F6 is a character
Enter the character interface Ctrl + Alt + (F2-F6) from the graphical desktop
Character interface enters graphical desktop Alt + F1
Switching between character interfaces Alt + (F2-F6)
Exercise:
1) press Ctrl + Alt + F2 to switch to the second character console
Enter root after login: and press Enter to confirm
Enter the password of the root user after password: and press the Enter key to log in
2) press Alt + F3 to switch to the third character console
Enter root after login: and press Enter to confirm
Enter the password of the root user after password: and press the Enter key to log in
3) enter exit to exit the third character console
4) Press Alt + F1 to return to the graphical desktop environment
The 3.Linux command is basically used
Pwd prints the current working directory, which is equivalent to the windows address bar
Cd changes directories
Cd. The current directory remains unchanged
Cd.. Return to the previous directory
Cd.. /.. Return to the next level of the directory.
Cd-returns the directory where it was last located
Cd ~ = cd returns the home directory of the current user
Ls lists the contents of the current directory
-l long format to display the contents of the current directory
Double-click a directory under Windows = cd + ls in Linux
The role of colors under 4.Linux
Blue indicates the folder
Red compressed file
Green executable file
Black ordinary file
× × device file
Eg:
[root@localhost ~] # cd / /
[root@localhost ~] # pwd / /
/ root
[root@localhost] # cd. / /
[root@localhost ~] # pwd / /
/ root
[root@localhost] # cd. / /
[root@localhost /] # pwd / /
/
[root@localhost /] # cd.. / /
[root@localhost /] # pwd / /
/
[root@localhost /] # cd / etc/pki/CA
[root@localhost CA] # pwd
/ etc/pki/CA
[root@localhost CA] # cd.. /..
[root@localhost etc] # pwd
/ etc
[root@localhost etc] # pwd
/ etc
[root@localhost etc] # cd / root/
[root@localhost ~] # pwd
/ root
[root@localhost ~] # cd-
/ etc
[root@localhost etc] # pwd
/ etc
5. Configure the network
# ifconfig to view current network information (IP address, subnet mask)
# route-n View Gateway
# cat / etc/resolv.conf View dns address
# hostnamectl View hostname
Graphical configuration network
Alt+F2
Nm-connection-editor
Reactivate the network in the upper right corner
Verification
Hostnamectl-sethostname xxx.xxx.xxx
[root@localhost ~] # hostnamectl
[root@localhost ~] # hostnamectl set-hostname teacher.tedu.cn
[root@localhost ~] # hostnamectl
Static hostname: teacher.tedu.cn
Icon name: computer-vm
Chassis: vm
Machine ID: d3f0970c5308449d950e3453c9a449ba
Boot ID: c5799a77789d47ca9a670064a03655eb
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-327.el7.x86_64
Architecture: x86-64
Command to configure the network
# nmcli device status lists all network card devices
# nmcli connection show lists configured network connections
Manually set the IP address / mask to allow automatic connection
Nmcli con mod "connection name" ipv4.method manual ipv4.address "IP address / mask bits"
# nmcli connection modify eth0 ipv4.method manual ipv4.addresses "10.0.0.10 Compact 255.255.255.0"
Nmcli con mod connection name connection.autoconnect yes
# nmcli connection modify eth0 connection.autoconnect yes
Manually specify default gateway, DNS address
# nmcli con mod "connection name" ipv4.gateway default gateway address
# nmcli con mod connection name ipv4.dns DNS address
# nmcli connection modify eth0 ipv4.gateway 10.0.0.254
# nmcli connection modify eth0 ipv4.dns 4.4.4.4
Deactivate the specified connection
Nmcli con down connection name
Activate the specified connection
Nmcli con up connection name
# nmcli connection down eth0
# nmcli connection up eth0
# ifconfig
Eno16777736: flags=4163 mtu 1500
Inet 10.0.0.10 netmask 255.255.255.0 broadcast 10.0.0.255
# route-n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.0.254 0.0.0.0 UG 100 00 eno16777736
# cat / etc/resolv.conf
# Generated by NetworkManager
Search tedu.cn
Nameserver 4.4.4.4
Additional experiments:
1. Baidu "go to IOE"
Exercise (command line mode):
1) press Ctrl + Alt + F2 to switch to the second character console
Enter root after login: and press Enter to confirm
Enter the password of the root user after password: and press the Enter key to log in
2) check which directory you are currently in
# pwd
/ root
3) change to the / boot directory to view the current directory location
# cd / boot
# pwd
/ boot
4) check what documents are in the current directory
# ls
5) return to the / root directory
# cd / root [or cd]
6) check what documents are in the current directory, / boot, / directory respectively
# ls
# ls / boot
# ls /
[# ls / root / boot /]
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.