The recent study of Hadoop, which requires Linux, has not been exposed before, so in the process of learning Hadoop, some basic knowledge of Linux has been accumulated, as follows:
1. Network Configuration
Ifconfig viewing network interface information;
Ping–c 4 192.168.0.144 Send a specified number of network test packages
Hostname Display the current host name
Setup invoke Settings interface
Service Network restart Restart networking service
Service iptables Status View firewall state
2. Turn off SELinux
Permanently valid:
Modify the Selinux= "" in the/etc/selinux/config file to Disabled, and then restart.
Immediate effect Setenforce 0
3. Turn off the firewall
Permanent effect
Open: Chkconfig iptables on
OFF: Chkconfig iptables off
Immediate effect, fail after reboot
Open: Service iptables start
Close: Service iptables stop
4. Delete command
The command to delete the directory under Linux is "RM";
Some of the parameters we used are "-f-i-r-v";
-I ask for confirmation before deleting.
-F Even if the original file property is set to read-only, forced deletion, the system will not let us confirm each.
-R Delete the directory and the following files. Note: If RM does not have this parameter, the directory cannot be deleted.
-V or--verbose displays the result information after the instruction executes.
5. Host and IP bindings
Edit: vi/etc/hosts Add a line
Verify: Ping–c 4 host Name
6. Extracting files
*.tar Unzip with tar xvf
*.gz extract with gzip-d or gunzip
*.tar.gz and *.tgz unzip with tar XZVF
*.BZ2 with bzip2-d or with BUNZIP2 decompression
*.TAR.BZ2 Unzip with tar XJF
*. Z Extract with Uncompress
*.tar. Z Unzip with tar Xzf
*.rar with Unrar e decompression
*.zip decompression with unzip
7. Modify the current host name
Immediate EFFECT: hostname XXX modifies the current host name
Permanently valid: Vi/etc/sysconfig/network
8. Set up SSH
SSH-KEYGEN-T RSA generates secret key with RSA algorithm
cd. SSH into the. SSH directory
LS view files in this directory: Id_rsa id_rsa.pub
More Id_rsa.pub View key contents
CP id_rsa.pub Authorized_keys copy secret key
SSH localhost login verification
9. View and set the time
Clock--show viewing hardware time
Clock--set--date= "05/09/15 23:25" Set hardware time
Date View system time
Clock--hctosys synchronizing system clocks with hardware clocks
NOTE: HC represents hardware time, SYS represents system time
10. Error logging
1.q:error,some other host already uses address;
A: Edit the file/etc/sysconfig/network-scripts/ifup-eth and comment out the following text:
if! Arping-q-C 2-w ${arping_wait:-3}-d-i ${realdevice} ${ipaddr}; Then
Net_log $ "Error, some other host already uses address${ipaddr}."
Exit 1
Fi
Restart Network Service
Linux Learning Notes (i)--Beginner operations