/ string
Find string
Start line, end line S/string to replace/new string to replace /g
% refers to the full text, S refers to the start, g refers to the global variable, without global, the cursor is placed on the line modification is the line
The default Mysql port is 3306.
Main Contents:
Lib: stores the most basic dynamic link shared library of the system.
MNT: used to temporarily mount file systems and provide default mount points for some devices.
Root: home directory of the system administrator
Lost +found: Indicates the directory where files are found after the file system is damaged.
Opt: indicates the installation location of a third-party software provider.
Medir: directory for mounting file systems such as cd-rom and USB disk.
Language Notes:
-
1. When creating a Linux partition, be sure to create the two partitions: root and swap.
-
2. On a computer with 8GB memory, the size of the switch area is usually 16GB. (2)
-
3.MKDIR Create a new directory. If the parent directory exists, the option to create a parent directory first is (-p).
-
4.Linux provides three commands for viewing files. To view file contents by moving the cursor up and down, run the less command.
-
5. To shutdown the Linux system without restarting it, run the halt.shutdown -h command.
-
6. In order to mount a newly created file system to the system, you also need to specify the location, or mount point, of the file system in the entire directory structure.
-
7. Reboot and shutdown -r restart the Linux OPERATING system.
-
8. Chmod Changes file permissions in Linux.
-
9. Which directory do most major Linux system files reside in, /bin/?
-
10. View more, less, and cat files.
-
Seo: Search engine optimization.
-
12. View system mount: mount.
-
13. Run the uname -n command to display the system host name.
-
14. Can list details when packing and filing: tar-t.
-
15. Run the w command to view the system load
-
16. In the vi editor, the dd command is used to delete the current line.
-
17. The Ping command is used to check the network connectivity.
-
18. The Linux file system describes all files through nodes (inodes), one for each directory, file, and device, and only one for each. Node, which contains two basic parameters; File description information and index table.
-
19. Process is a dynamic concept, which describes a running activity of the program. It is a dynamic entity that the operating system can perceive and control, and a basic unit for the system to allocate various resources and schedule.
-
20.GNU stands for GNU Is not UNIX, the name of a project by the Free Software Foundation that seeks to develop a freely distributed and portable operating system similar to UNIX.
-
21. A file is a collection of programs or data. In an operating system, a file is defined as a collection of related character streams with names, or a collection of related records with symbols.
Linux environment configuration:
Image file
vi /etc/sysconfig/network-scripts/ifcfg-ens33
Content:
BOOTPROTO=static ONBOOT=yes IPADDR=192.168.0.235 (VM IP address) NETMASK=255.255.255.0 (subnet mask) GATEWAY=192.168.0.1 (GATEWAY) DNS2=223.6.6.6 (Ali server resolver)Copy the code
Network environment [Failed] Failed to get up, cause, solution:
There are two conflicting networks in Linux. Shut down NetManager.
service NetworkManager stop
chkconfig NetworkManager off
service network restart
Pseudo-distributed construction:
Wget+ download JDK, Hadoop
# Hadoop pseudo-distribution setup**1.1 changing hostname ** vim /etc/hostname Master **1.2 changing IP address ** > Enter the Linux GUI -> right click on the two small computers in the upper right -> Edit Connections -> Select the current network System eth0 -> Click the Edit button -> Select IPv4 -> Set method to manual -> Click the Add button -> Add IP: 192.168.1.101 Subnet mask: 255.255.255.0 Gateway: 192.168.1.1 -> apply > second option: Vim /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0"
BOOTPROTO="static" # Enable static IP address
HWADDR="00:0C:29:3C:BF:E7"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="ce22eeca-ecde-4536-8cc2-ef0dc36d4a8c"
IPADDR="192.168.1.101" Set the IP address
NETMASK="255.255.255.0"Subnet mask GATEWAY="192.168.1.1" # set gatewayDNS1=223.5.5.5 DNS2=223.6.6.6 **1.3 Modifying the Mapping between the host name and THE IP address ** vim /etc/hosts 192.168.1.101 Master **1.4 Disabling the firewall **</br> > Centos6 is availableCheck the firewall status
service iptables status
# disable firewall
service iptables stop
Check the firewall startup status
chkconfig iptables --list
# Turn off firewall startupChkconfig iptables off > Centos7 Solution Cannot be usedThe iptables command cannot be used as the installation sourceYum install -y iptables-services // Disabling the firewall Service iptables stop Redirecting to /bin/systemctl stop iptables.service Service iptables status Redirecting to /bin/systemctl status iptables. Service iptables. Service - IPv4 firewall with iptables Loaded: loaded (/usr/lib/systemd/system/iptables.servicedisabled; Vendor preset: disabled)Active: inactive(dead) **1.5 Restarting Linux** reboot# 2. Install JDK2.2 Decompressing the JDK tar -zxvf JDK-7U55-linux-i586.tar. gz -c /home/hadoop/app 2.3 Adding Java to the environment variable vim /etc/profile# add at the end of the file
export JAVA_HOME=/home/hadoop/app/jdk-7u_65-i585
export PATH=$PATH:$JAVA_HOME/bin **2.4 Add Hadoop to environment variables ** First way vim ~/. Bash_profile bottom add: HADOOP_HOME=/usr/local/ hadoop/hadoop - 2.6.4 PATH =$PATH:$HADOOP_HOME/bin
exportHADOOP_HOME PATH The second method is vim /etc/profileexport JAVA_HOME=/usr/local/ Java/jdk1.8.0 _171export HADOOP_HOME=/usr/local/ hadoop/hadoop - 2.6.4export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin ** Refresh the configuration **source /etc/profile
source ~/.bash_profile
# 3. Install hadoop2.6.4* Pseudo-distributed requires 5 configuration files to be modified, which are in the etc directory## 3.1 Configure Hadoop> First configuration file name: hadoop-env.sh vim hadoop-env.sh# 27
exportJAVA_HOME=/usr/ Java /jdk1.7.0_65 > Second configuration file name: vim core-site.xml <! -- Specify the file system schema (URI) used by HADOOP, --> <property> <name>fs.defaultFS</name> <value> HDFS ://weekend-1206-01:9000</value> </property> <! <property> <name>hadoop.tmp.dir</name> <value>/home/hadoop/hadoop-2.4.1/ TMP </value> </property> > third configuration file: hdFs-site.xml <! Replication </name> <value>1</value> </property> > fourth configuration file: mapred-site.xml cp mapred-site.xml.template mapred-site.xml <! Mapreduce.framework. name</name> <value> YARN </value> </property> > yarn-site.xml <! - specify the YARN (ResourceManager) address - > < property > < name > YARN. The ResourceManager. The hostname < / name > <value>weekend-1206-01</value> </property> <! Mapreduce_shuffle </value> </property> <name> map.nodeManager. aux-services</name> <value>mapreduce_shuffle</value> </property>Format the namenode.
hadoop namenode -format
Start HadoopStart HDFS sbin/start-dfs.sh and start YARN sbin/start-yarn.shVerify that the startup is successfulRun the JPS command to verify 27408 NameNode 28218 JPS 27643 SecondaryNameNode 28066 NodeManager 27803 ResourceManager 27512 DataNode http://192.168.1.101:50070 (HDFS management interface) http://192.168.1.101:8088 management interface (MR)Copy the code