《OD学hadoop》第一周0625 LINUX作业一:Linux系统基本命令(一)

时间:2023-03-09 09:15:45
《OD学hadoop》第一周0625 LINUX作业一:Linux系统基本命令(一)

1.

1)

vim /etc/udev/rules.d/-persistent-net.rules
vi /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
UUID=57d4c2c9-9e9c-48f8-a654-8e5bdbadafb8
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
HWADDR=:0c:::e6:ec
IPADDR=172.16.53.100
PREFIX=
GATEWAY=172.16.53.2
LAST_CONNECT=
DNS1=172.16.53.2

虚拟机的网卡用的是虚拟网卡

保存退出x或者 wq

2)

vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=beifeng-hadoop-01

关机:

halt

shoutdown -h now

重启:reboot

2.

从不用图形界面,只用命令行;

命令行敲的很快;

3. vi编辑器

seed

awk

4. 本地yum

xmanager

mount -t iso9660
cd /etc/yum.repos.d/
mount /dev/sr0 /mnt
[root@beifeng-hadoop- yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo [root@beifeng-hadoop- yum.repos.d]# less CentOS-Media.repo
# CentOS-Media.repo
#
# This repo can be used with mounted DVD media, verify the mount point for
# CentOS-. You can use this repo and yum to install items directly off the
# DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
# yum --enablerepo=c6-media [command]
#
# or for ONLY the media repo, do this:
#
# yum --disablerepo=\* --enablerepo=c6-media [command] [c6-media]
name=CentOS-$releasever - Media
baseurl=file:///rhel #centos配置本地yum源 file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=
enabled=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6