Hadoop前期准备--centos7
vi /etc/hostname
vi /etc/hosts
[root@hadoop-senior01 network-scripts]# vi /etc/sysconfig/network-scripts/ifcfg-ens33
vi /etc/sudoers
vi /etc/selinux/config
vi /etc/profile
第一、启动、终止、重启
systemctl start httpd.service #启动
systemctl stop httpd.service #停止
systemctl restart httpd.service #重启
第二、设置开机启动/关闭
systemctl enable httpd.service #开机启动
systemctl disable httpd.service #开机不启动
第三、检查httpd状态
systemctl status httpd.service
[BEGIN] 2019/5/29 11:56:32改主机名 [root@localhost ~]# hostname localhost.localdomain [root@localhost ~]# hostname hadoop-senior01 [root@localhost ~]# hostname hadoop-senior01 [root@localhost ~]# vi /etc/hostname [root@localhost ~]# hostnamectl set-hostname hadoop-senior01 [root@localhost ~]# reboot 重启ip和主机名映射 [root@hadoop-senior01 ~]# vi /etc/hostname [root@hadoop-senior01 ~]# vi /etc/hosts系统信息 [root@hadoop-senior01 ~]# uname -r 3.10.0-693.el7.x86_64cpu信息 [root@hadoop-senior01 ~]# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 23 model : 17 model name : AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx stepping : 0 microcode : 0x810100b cpu MHz : 1996.843 cache size : 512 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc art rep_good nopl tsc_reliable nonstop_tsc extd_apicid eagerfpu pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec arat overflow_recov succor bogomips : 3992.47 TLB size : 2560 4K pages clflush size : 64 cache_alignment : 64 address sizes : 43 bits physical, 48 bits virtual power management:使用内存情况 [root@hadoop-senior01 ~]# cat /proc/meminfo MemTotal: 999696 kB MemFree: 156020 kB MemAvailable: 484588 kB Buffers: 2116 kB Cached: 435276 kB SwapCached: 0 kB Active: 236388 kB Inactive: 396368 kB Active(anon): 196340 kB Inactive(anon): 6508 kB Active(file): 40048 kB Inactive(file): 389860 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 2097148 kB SwapFree: 2097148 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 195392 kB Mapped: 90104 kB Shmem: 7484 kB Slab: 102668 kB SReclaimable: 52764 kB SUnreclaim: 49904 kB KernelStack: 5760 kB PageTables: 14124 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 2596996 kB Committed_AS: 1252180 kB VmallocTotal: 34359738367 kB VmallocUsed: 180720 kB VmallocChunk: 34359310332 kB HardwareCorrupted: 0 kB AnonHugePages: 32768 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 75648 kB DirectMap2M: 972800 kB DirectMap1G: 0 kB查看系统时间 [root@hadoop-senior01 ~]# date 2019年 05月 29日 星期三 14:46:45 CST [root@hadoop-senior01 ~]# cal 20192019 一月 二月 三月 日 一 二 三 四 五 六 日 一 二 三 四 五 六 日 一 二 三 四 五 六1 2 3 4 5 1 2 1 26 7 8 9 10 11 12 3 4 5 6 7 8 9 3 4 5 6 7 8 9 13 14 15 16 17 18 19 10 11 12 13 14 15 16 10 11 12 13 14 15 16 20 21 22 23 24 25 26 17 18 19 20 21 22 23 17 18 19 20 21 22 23 27 28 29 30 31 24 25 26 27 28 24 25 26 27 28 29 3031四月 五月 六月 日 一 二 三 四 五 六 日 一 二 三 四 五 六 日 一 二 三 四 五 六1 2 3 4 5 6 1 2 3 4 17 8 9 10 11 12 13 5 6 7 8 9 10 11 2 3 4 5 6 7 8 14 15 16 17 18 19 20 12 13 14 15 16 17 18 9 10 11 12 13 14 15 21 22 23 24 25 26 27 19 20 21 22 23 24 25 16 17 18 19 20 21 22 28 29 30 26 27 28 29 30 31 23 24 25 26 27 28 2930七月 八月 九月 日 一 二 三 四 五 六 日 一 二 三 四 五 六 日 一 二 三 四 五 六1 2 3 4 5 6 1 2 3 1 2 3 4 5 6 77 8 9 10 11 12 13 4 5 6 7 8 9 10 8 9 10 11 12 13 14 14 15 16 17 18 19 20 11 12 13 14 15 16 17 15 16 17 18 19 20 21 21 22 23 24 25 26 27 18 19 20 21 22 23 24 22 23 24 25 26 27 28 28 29 30 31 25 26 27 28 29 30 31 29 30十月 十一月 十二月 日 一 二 三 四 五 六 日 一 二 三 四 五 六 日 一 二 三 四 五 六1 2 3 4 5 1 2 1 2 3 4 5 6 76 7 8 9 10 11 12 3 4 5 6 7 8 9 8 9 10 11 12 13 14 13 14 15 16 17 18 19 10 11 12 13 14 15 16 15 16 17 18 19 20 21 20 21 22 23 24 25 26 17 18 19 20 21 22 23 22 23 24 25 26 27 28 27 28 29 30 31 24 25 26 27 28 29 30 29 30 31查看系统磁盘信息 [root@hadoop-senior01 ~]# df -lh 文件系统 容量 已用 可用 已用% 挂载点 /dev/mapper/centos-root 47G 3.8G 44G 8% / devtmpfs 473M 0 473M 0% /dev tmpfs 489M 0 489M 0% /dev/shm tmpfs 489M 7.2M 481M 2% /run tmpfs 489M 0 489M 0% /sys/fs/cgroup /dev/sda1 1014M 161M 854M 16% /boot tmpfs 98M 12K 98M 1% /run/user/42 tmpfs 98M 0 98M 0% /run/user/0 tmpfs 98M 0 98M 0% /run/user/1000查看目录 [root@hadoop-senior01 ~]# pwd /root查看一个目录大小 [root@hadoop-senior01 ~]# du -sh /home/king/ 151M /home/king/查看磁盘信息 [root@hadoop-senior01 ~]# fdisk -l磁盘 /dev/sda:53.7 GB, 53687091200 字节,104857600 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 磁盘标签类型:dos 磁盘标识符:0x000b1758设备 Boot Start End Blocks Id System /dev/sda1 * 2048 2099199 1048576 83 Linux /dev/sda2 2099200 104857599 51379200 8e Linux LVM磁盘 /dev/mapper/centos-root:50.5 GB, 50457477120 字节,98549760 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节磁盘 /dev/mapper/centos-swap:2147 MB, 2147483648 字节,4194304 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节[root@hadoop-senior01 ~]# fsck /dev/sda fsck,来自 util-linux 2.23.2 e2fsck 1.42.9 (28-Dec-2013) /dev/sda is in use. e2fsck: 无法继续, 中止.修复磁盘 [root@hadoop-senior01 ~]# fsck /dev/mapper/centos-swap fsck,来自 util-linux 2.23.2查看挂载磁盘信息 [root@hadoop-senior01 ~]# mount sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=483924k,nr_inodes=120981,mode=755) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd) pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio,net_cls) cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event) configfs on /sys/kernel/config type configfs (rw,relatime) /dev/mapper/centos-root on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota) selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=35,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13330) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel) debugfs on /sys/kernel/debug type debugfs (rw,relatime) mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel) nfsd on /proc/fs/nfsd type nfsd (rw,relatime) /dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) tmpfs on /run/user/42 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=99972k,mode=700,uid=42,gid=42) tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=99972k,mode=700) tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=99972k,mode=700,uid=1000,gid=1000)查看系统内存使用情况 [root@hadoop-senior01 ~]# free -mtotal used free shared buff/cache available Mem: 976 296 149 7 530 472 Swap: 2047 0 2047各个进程内存的使用情况 [root@hadoop-senior01 ~]# top top - 15:04:13 up 3:05, 2 users, load average: 0.00, 0.01, 0.05 Tasks: 145 total, 2 running, 142 sleeping, 1 stopped, 0 zombie %Cpu(s): 0.0 us, 28.6 sy, 0.0 ni, 71.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem : 999696 total, 152052 free, 304312 used, 543332 buff/cache KiB Swap: 2097148 total, 2097148 free, 0 used. 483700 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3771 root 20 0 157716 2140 1492 R 4.8 0.2 0:00.07 top 1 root 20 0 128164 6828 4064 S 0.0 0.7 0:02.06 systemd 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root 20 0 0 0 0 S 0.0 0.0 0:00.20 ksoftirqd/0 5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H 7 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0 8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh 9 root 20 0 0 0 0 R 0.0 0.0 0:00.34 rcu_sched 10 root rt 0 0 0 0 S 0.0 0.0 0:00.08 watchdog/0 12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs 13 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns 14 root 20 0 0 0 0 S 0.0 0.0 0:00.01 khungtaskd 15 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 writeback 16 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd 17 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset 18 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd 19 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 md 以MB显示 [root@hadoop-senior01 ~]# top -m top: unknown option 'm' Usage:top -hv | -bcHiOSs -d secs -n max -u|U user -p pid(s) -o field -w [cols] [root@hadoop-senior01 ~]# top -M top: unknown option 'M' Usage:top -hv | -bcHiOSs -d secs -n max -u|U user -p pid(s) -o field -w [cols] [root@hadoop-senior01 ~]# top top - 15:05:52 up 3:06, 2 users, load average: 0.00, 0.01, 0.05 Tasks: 145 total, 1 running, 143 sleeping, 1 stopped, 0 zombie %Cpu(s): 0.0 us, 6.2 sy, 0.0 ni, 93.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem : 999696 total, 152044 free, 304304 used, 543348 buff/cache KiB Swap: 2097148 total, 2097148 free, 0 used. 483712 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3782 root 20 0 157716 2156 1492 R 6.2 0.2 0:00.02 top 1 root 20 0 128164 6828 4064 S 0.0 0.7 0:02.06 systemd 2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd 3 root 20 0 0 0 0 S 0.0 0.0 0:00.20 ksoftirqd/0 5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H 7 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0 8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh 9 root 20 0 0 0 0 S 0.0 0.0 0:00.34 rcu_sched 10 root rt 0 0 0 0 S 0.0 0.0 0:00.08 watchdog/0 12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs 13 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns 14 root 20 0 0 0 0 S 0.0 0.0 0:00.01 khungtaskd 15 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 writeback 16 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd 17 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset 18 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd 19 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 md 25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kswapd0 26 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd 27 root 39 19 0 0 0 S 0.0 0.0 0:00.12 khugepaged 28 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 crypto 36 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kthrotld 38 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kmpath_rdacd 修改网络改为静态ip [root@hadoop-senior01 ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33 查看java版本 [root@hadoop-senior01 ~]# rpm -qa | grep java tzdata-java-2017b-1.el7.noarch python-javapackages-3.4.1-11.el7.noarch java-1.8.0-openjdk-1.8.0.131-11.b12.el7.x86_64 java-1.8.0-openjdk-headless-1.8.0.131-11.b12.el7.x86_64 javapackages-tools-3.4.1-11.el7.noarch卸载java(因为版本不对) [root@hadoop-senior01 ~]# rpm -e --nodeps java-1.8.0-openjdk-1.8.0.131-11.b12.el7.x86_64 java-1.8.0-openjdk-headless-1.8.0.131-11.b12.el7.x86_64 python-javapackages-3.4.1-11.el7.noarch javapackages-tools-3.4.1-11.el7.noarch tzdata-java-2017b-1.el7.noarch 再次查看是否卸载 [root@hadoop-senior01 ~]# rpm -qa | grep java进入家目录查看安装包权限(自行使用sftp传安装包到/home/king/sofewares/) [root@hadoop-senior01 ~]# cd /home/king/sofewares/ [root@hadoop-senior01 sofewares]# ls jdk-8u91-linux-x64.tar.gz [root@hadoop-senior01 sofewares]# ll 总用量 177120 -rw-rw-r--. 1 king king 181367942 5月 29 16:07 jdk-8u91-linux-x64.tar.gz 修改权限 [root@hadoop-senior01 sofewares]# chmod u+x jdk-8u91-linux-x64.tar.gz 核对是否改正 [root@hadoop-senior01 sofewares]# ll 总用量 177120 -rwxrw-r--. 1 king king 181367942 5月 29 16:07 jdk-8u91-linux-x64.tar.gz 核对正确后安装 [root@hadoop-senior01 sofewares]# tar -zxvf jdk-8u91-linux-x64.tar.gz 核对安装是否成功 [root@hadoop-senior01 sofewares]# ls jdk1.8.0_91 jdk-8u91-linux-x64.tar.gz [root@hadoop-senior01 sofewares]# ll 总用量 177120 drwxr-xr-x. 8 10 143 255 4月 1 2016 jdk1.8.0_91 -rwxrw-r--. 1 king king 181367942 5月 29 16:07 jdk-8u91-linux-x64.tar.gz [root@hadoop-senior01 sofewares]# cd jdk1.8.0_91/ [root@hadoop-senior01 jdk1.8.0_91]# ls bin COPYRIGHT db include javafx-src.zip jre lib LICENSE man README.html release src.zip THIRDPARTYLICENSEREADME-JAVAFX.txt THIRDPARTYLICENSEREADME.txt [root@hadoop-senior01 jdk1.8.0_91]# ll 总用量 25892 drwxr-xr-x. 2 10 143 4096 4月 1 2016 bin -r--r--r--. 1 10 143 3244 4月 1 2016 COPYRIGHT drwxr-xr-x. 4 10 143 122 4月 1 2016 db drwxr-xr-x. 3 10 143 132 4月 1 2016 include -rwxr-xr-x. 1 10 143 5092228 4月 1 2016 javafx-src.zip drwxr-xr-x. 5 10 143 185 4月 1 2016 jre drwxr-xr-x. 5 10 143 245 4月 1 2016 lib -r--r--r--. 1 10 143 40 4月 1 2016 LICENSE drwxr-xr-x. 4 10 143 47 4月 1 2016 man -r--r--r--. 1 10 143 159 4月 1 2016 README.html -rw-r--r--. 1 10 143 525 4月 1 2016 release -rw-r--r--. 1 10 143 21103627 4月 1 2016 src.zip -rwxr-xr-x. 1 10 143 110114 4月 1 2016 THIRDPARTYLICENSEREADME-JAVAFX.txt -r--r--r--. 1 10 143 177094 4月 1 2016 THIRDPARTYLICENSEREADME.txt [root@hadoop-senior01 jdk1.8.0_91]# ls bin/ appletviewer idlj java javafxpackager javapackager jcmd jdb jinfo jmc jrunscript jstat keytool pack200 rmid serialver unpack200 xjc ControlPanel jar javac javah java-rmi.cgi jconsole jdeps jjs jmc.ini jsadebugd jstatd native2ascii policytool rmiregistry servertool wsgen extcheck jarsigner javadoc javap javaws jcontrol jhat jmap jps jstack jvisualvm orbd rmic schemagen tnameserv wsimport [root@hadoop-senior01 jdk1.8.0_91]# bin/java 用法: java [-options] class [args...](执行类)或 java [-options] -jar jarfile [args...](执行 jar 文件) 其中选项包括:-d32 使用 32 位数据模型 (如果可用)-d64 使用 64 位数据模型 (如果可用)-server 选择 "server" VM默认 VM 是 server.-cp <目录和 zip/jar 文件的类搜索路径>-classpath <目录和 zip/jar 文件的类搜索路径>用 : 分隔的目录, JAR 档案和 ZIP 档案列表, 用于搜索类文件。-D<名称>=<值>设置系统属性-verbose:[class|gc|jni]启用详细输出-version 输出产品版本并退出-version:<值>警告: 此功能已过时, 将在未来发行版中删除。需要指定的版本才能运行-showversion 输出产品版本并继续-jre-restrict-search | -no-jre-restrict-search警告: 此功能已过时, 将在未来发行版中删除。在版本搜索中包括/排除用户专用 JRE-? -help 输出此帮助消息-X 输出非标准选项的帮助-ea[:<packagename>...|:<classname>]-enableassertions[:<packagename>...|:<classname>]按指定的粒度启用断言-da[:<packagename>...|:<classname>]-disableassertions[:<packagename>...|:<classname>]禁用具有指定粒度的断言-esa | -enablesystemassertions启用系统断言-dsa | -disablesystemassertions禁用系统断言-agentlib:<libname>[=<选项>]加载本机代理库 <libname>, 例如 -agentlib:hprof另请参阅 -agentlib:jdwp=help 和 -agentlib:hprof=help-agentpath:<pathname>[=<选项>]按完整路径名加载本机代理库-javaagent:<jarpath>[=<选项>]加载 Java 编程语言代理, 请参阅 java.lang.instrument-splash:<imagepath>使用指定的图像显示启动屏幕 有关详细信息, 请参阅 http://www.oracle.com/technetwork/java/javase/documentation/index.html。配置环境 [root@hadoop-senior01 jdk1.8.0_91]# vi /etc/profile## JAVA_HOME export JAVA_HOME=/home/king/sofewares/jdk1.8.0_91 export PATH=$PATH:$JAVA_HOME/bin export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar验证 [root@hadoop-senior01 jdk1.8.0_91]# java 用法: java [-options] class [args...](执行类)或 java [-options] -jar jarfile [args...](执行 jar 文件) 其中选项包括:-d32 使用 32 位数据模型 (如果可用)-d64 使用 64 位数据模型 (如果可用)-server 选择 "server" VM默认 VM 是 server.-cp <目录和 zip/jar 文件的类搜索路径>-classpath <目录和 zip/jar 文件的类搜索路径>用 : 分隔的目录, JAR 档案和 ZIP 档案列表, 用于搜索类文件。-D<名称>=<值>设置系统属性-verbose:[class|gc|jni]启用详细输出-version 输出产品版本并退出-version:<值>警告: 此功能已过时, 将在未来发行版中删除。需要指定的版本才能运行-showversion 输出产品版本并继续-jre-restrict-search | -no-jre-restrict-search警告: 此功能已过时, 将在未来发行版中删除。在版本搜索中包括/排除用户专用 JRE-? -help 输出此帮助消息-X 输出非标准选项的帮助-ea[:<packagename>...|:<classname>]-enableassertions[:<packagename>...|:<classname>]按指定的粒度启用断言-da[:<packagename>...|:<classname>]-disableassertions[:<packagename>...|:<classname>]禁用具有指定粒度的断言-esa | -enablesystemassertions启用系统断言-dsa | -disablesystemassertions禁用系统断言-agentlib:<libname>[=<选项>]加载本机代理库 <libname>, 例如 -agentlib:hprof另请参阅 -agentlib:jdwp=help 和 -agentlib:hprof=help-agentpath:<pathname>[=<选项>]按完整路径名加载本机代理库-javaagent:<jarpath>[=<选项>]加载 Java 编程语言代理, 请参阅 java.lang.instrument-splash:<imagepath>使用指定的图像显示启动屏幕 有关详细信息, 请参阅 http://www.oracle.com/technetwork/java/javase/documentation/index.html。 [root@hadoop-senior01 jdk1.8.0_91]# javac 用法: javac <options> <source files> 其中, 可能的选项包括:-g 生成所有调试信息-g:none 不生成任何调试信息-g:{lines,vars,source} 只生成某些调试信息-nowarn 不生成任何警告-verbose 输出有关编译器正在执行的操作的消息-deprecation 输出使用已过时的 API 的源位置-classpath <路径> 指定查找用户类文件和注释处理程序的位置-cp <路径> 指定查找用户类文件和注释处理程序的位置-sourcepath <路径> 指定查找输入源文件的位置-bootclasspath <路径> 覆盖引导类文件的位置-extdirs <目录> 覆盖所安装扩展的位置-endorseddirs <目录> 覆盖签名的标准路径的位置-proc:{none,only} 控制是否执行注释处理和/或编译。-processor <class1>[,<class2>,<class3>...] 要运行的注释处理程序的名称; 绕过默认的搜索进程-processorpath <路径> 指定查找注释处理程序的位置-parameters 生成元数据以用于方法参数的反射-d <目录> 指定放置生成的类文件的位置-s <目录> 指定放置生成的源文件的位置-h <目录> 指定放置生成的本机标头文件的位置-implicit:{none,class} 指定是否为隐式引用文件生成类文件-encoding <编码> 指定源文件使用的字符编码-source <发行版> 提供与指定发行版的源兼容性-target <发行版> 生成特定 VM 版本的类文件-profile <配置文件> 请确保使用的 API 在指定的配置文件中可用-version 版本信息-help 输出标准选项的提要-A关键字[=值] 传递给注释处理程序的选项-X 输出非标准选项的提要-J<标记> 直接将 <标记> 传递给运行时系统-Werror 出现警告时终止编译@<文件名> 从文件读取选项和文件名验证CLASSPATH [root@hadoop-senior01 jdk1.8.0_91]# jar 用法: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files ... 选项:-c 创建新档案-t 列出档案目录-x 从档案中提取指定的 (或所有) 文件-u 更新现有档案-v 在标准输出中生成详细输出-f 指定档案文件名-m 包含指定清单文件中的清单信息-n 创建新档案后执行 Pack200 规范化-e 为捆绑到可执行 jar 文件的独立应用程序指定应用程序入口点-0 仅存储; 不使用任何 ZIP 压缩-P 保留文件名中的前导 '/' (绝对路径) 和 ".." (父目录) 组件-M 不创建条目的清单文件-i 为指定的 jar 文件生成索引信息-C 更改为指定的目录并包含以下文件 如果任何文件为目录, 则对其进行递归处理。 清单文件名, 档案文件名和入口点名称的指定顺序 与 'm', 'f' 和 'e' 标记的指定顺序相同。示例 1: 将两个类文件归档到一个名为 classes.jar 的档案中: jar cvf classes.jar Foo.class Bar.class 示例 2: 使用现有的清单文件 'mymanifest' 并将 foo/ 目录中的所有文件归档到 'classes.jar' 中: jar cvfm classes.jar mymanifest -C foo/ .验证jar包 [root@hadoop-senior01 jdk1.8.0_91]# jar 用法: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files ... 选项:-c 创建新档案-t 列出档案目录-x 从档案中提取指定的 (或所有) 文件-u 更新现有档案-v 在标准输出中生成详细输出-f 指定档案文件名-m 包含指定清单文件中的清单信息-n 创建新档案后执行 Pack200 规范化-e 为捆绑到可执行 jar 文件的独立应用程序指定应用程序入口点-0 仅存储; 不使用任何 ZIP 压缩-P 保留文件名中的前导 '/' (绝对路径) 和 ".." (父目录) 组件-M 不创建条目的清单文件-i 为指定的 jar 文件生成索引信息-C 更改为指定的目录并包含以下文件 如果任何文件为目录, 则对其进行递归处理。 清单文件名, 档案文件名和入口点名称的指定顺序 与 'm', 'f' 和 'e' 标记的指定顺序相同。 示例 1: 将两个类文件归档到一个名为 classes.jar 的档案中: jar cvf classes.jar Foo.class Bar.class 示例 2: 使用现有的清单文件 'mymanifest' 并将 foo/ 目录中的所有文件归档到 'classes.jar' 中: jar cvfm classes.jar mymanifest -C foo/ .增加普通用户sudo权限 [root@hadoop-senior01 jdk1.8.0_91]# vi /etc/sudoers查看防火墙状态 [root@hadoop-senior01 jdk1.8.0_91]# systemctl status network.service ● network.service - LSB: Bring up/down networkingLoaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)Active: active (exited) since 三 2019-05-29 11:59:02 CST; 4h 54min agoDocs: man:systemd-sysv-generator(8)Process: 901 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)5月 29 11:59:01 hadoop-senior01 systemd[1]: Starting LSB: Bring up/down networking... 5月 29 11:59:02 hadoop-senior01 network[901]: 正在打开环回接口: [ 确定 ] 5月 29 11:59:02 hadoop-senior01 network[901]: 正在打开接口 ens33: [ 确定 ] 5月 29 11:59:02 hadoop-senior01 systemd[1]: Started LSB: Bring up/down networking.临时关闭] [root@hadoop-senior01 jdk1.8.0_91]# setenforce 0 [root@hadoop-senior01 jdk1.8.0_91]# systemctl status network.service [root@hadoop-senior01 jdk1.8.0_91]# systemctl status firewalld.service 临时开启 [root@hadoop-senior01 jdk1.8.0_91]# systemctl start firewalld.service [root@hadoop-senior01 jdk1.8.0_91]# systemctl status firewalld.service 永久开启 [root@hadoop-senior01 jdk1.8.0_91]# systemctl enable firewalld.service [root@hadoop-senior01 jdk1.8.0_91]# systemctl status firewalld.service 永久关闭 [root@hadoop-senior01 jdk1.8.0_91]# systemctl disable firewalld.service [root@hadoop-senior01 jdk1.8.0_91]# systemctl stop firewalld.service [root@hadoop-senior01 jdk1.8.0_91]# systemctl status firewalld.service [root@hadoop-senior01 jdk1.8.0_91]# reboot[root@hadoop-senior01 ~]# systemctl status firewalld.service 安装httpd [root@hadoop-senior01 ~]# yum install httpd [root@hadoop-senior01 ~]# systemctl status httpd永久开启 [root@hadoop-senior01 ~]# systemctl enable httpd [root@hadoop-senior01 ~]# systemctl start httpd [root@hadoop-senior01 ~]# systemctl status httpd临时管理SELinux [root@hadoop-senior01 ~]# setenforce 0 [root@hadoop-senior01 ~]# vi /etc/selinux/config [root@hadoop-senior01 ~]# cat /etc/selinux/config 定时任务 [root@hadoop-senior01 ~]# crontab -e查找某个命令目录 [root@hadoop-senior01 ~]# which systemctl /usr/bin/systemctl查看定时任务列表 [root@hadoop-senior01 ~]# crontab -l no crontab for root关闭所有定时任务 [root@hadoop-senior01 ~]# crontab -r no crontab for root[END] 2019/5/29 18:39:14
准备操作步骤
转载于:https://www.cnblogs.com/King-boy/p/10945726.html
Hadoop前期准备--centos7相关推荐
- Hadoop前期准备--centos6.4
Hadoop前置课程(centos6.4,想看centos7在下一篇:) Linux系统,基本命令 Java语言, JSE相关知识 MYSQL基本的DML和DDL SQL on HADOOP [roo ...
- centos7系统下安装JDK8的详细步骤
一.前期准备 centos7虚拟机,xshell,,xftp,JDK8(linux版) 二.安装步骤 1. 启动centos7之后,通过 ifconfig 命令获取centos7的IP地址(注:以下 ...
- linux 7分区 fdisk,CentOS7创建逻辑卷,fdisk分区方式。
首先准备好一块空磁盘 我这里准备一个20GB空磁盘. [root@hadoop ~]# lsblk /dev/sdb NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT s ...
- ambari部署hadoop
ambari搭建hadoop集群 为何选用ambari 安装前准备 部署 节点间做免密登陆 搭建nginx服务 创建repo源 安装mysql 服务 安装ambari服务 启动ambari服务 登陆a ...
- Hadoop环境搭建--Docker完全分布式部署Hadoop环境(菜鸟采坑吐血整理)
系统:Centos 7,内核版本3.10 本文介绍如何从0利用Docker搭建Hadoop环境,制作的镜像文件已经分享,也可以直接使用制作好的镜像文件. 一.宿主机准备工作 0.宿主机(Centos7 ...
- hadoop高可用安装教程(刘浩)
hadoop高可用安装 date: 2020-06-18 21:11:28 categories: 大数据 hadoop 前期准备 准备好四台安装了centos系统的虚拟机,并在其中一台完成伪分布式的 ...
- 搭建hbase1.2.5完全分布式集群
简介 有一段时间,没写博客了,因为公司开发分布式调用链追踪系统,用到hbase,在这里记录一下搭建过程 1.集群如下: ip 主机名 角色 192.168.6.130 node1.jacky.com ...
- pb调用计算机默认游览器,PB打开ole控件IE浏览器版本问题_指定Webbrowser控件所用IE内核版本(转)...
如果电脑上安装了IE8或者之后版本的IE浏览器,Webbrowser控件会使用IE7兼容模式来显示网页内容.解决方法是在注册表中为你的进程指定引用IE的版本号. 比如我的程序叫做a.exe 对于32位 ...
- 大数据学习——相关资源
目录 360压缩 centos7 SSH hadoop-2.6.5 jdk1.8 VMware15pro 配置完hadoop的centos7 360压缩 链接:https://pan.baidu.co ...
最新文章
- 使用深度学习检测混凝土结构中的表面裂缝
- IE浏览器跟火狐浏览器兼容写法3
- java finally块_java finally块后的语句是否要执行
- docker启动odoo提示module没有安装_Ubuntu20.04通过docker安装微信
- 用java创建UDF,并用于Hive
- 【HDU 1150】Machine Schedule(二分图匹配)
- 中国人工智能学会通讯——基于视频的行为识别技术 1.5 基于深度学习的视频识别方法...
- [转载] python indices_Python numpy.indices() 使用实例
- 总结: 1.函数 2.函数调用 3.函数的参数
- vivo手机计算机错误怎么弄,VIVO手机无法连接电脑怎么办?
- STM32——新建 Keil MDK 5 工程(寄存器版本)
- 对封装继承多态的理解
- python语音识别终极指南_Python语音识别终极指南
- java生成简单流水号
- ubuntu 18.04.2的初步配置
- Chrome插件开发练习 - 还未完成
- 福州铁通DNS是多少
- 全程BUG跟踪管理, 云效平台助企业提升项目研发进度
- 计算机0基础知识,计算机基础知识0课件.ppt
- 如何在阿里云上搭建个人网站(学习记录)