尽量CentOS选择7以上的
一、CentOS的配置



通过桌面的方式修改网络配置:

使用命令行的方式修改网络配置:
[hadoop@localhost Desktop]$ setup

关闭桌面版
[root@localhost Desktop]# init 3
切换到root用户
[hadoop@localhost ~]$ su
切换到root用户,只会针对执行的下一个命令有效,之后自动切换到普通用户
[hadoop@localhost ~]$ sudo
修改启动桌面的文件
[hadoop@localhost ~]$ sudo vi /etc/inittab
注意:第一次使用sudo时会出现问题
[hadoop@localhost ~]$ sudo vi /etc/inittab
[sudo] password for hadoop:
hadoop is not in the sudoers file. This incident will be reported.
[hadoop@localhost ~]$
需要将sudo加到系统中去

sudo vi /etc/inittab

改完配置文件后需要重启
[root@localhost hadoop]# sudo service network restart

修改主机名和IP的映射关系:
[root@localhost hadoop]# sudo vi /etc/sysconfig/network
使修改的主机名生效
[root@localhost hadoop]# sudo hostname weekend110
[root@localhost hadoop]# sudo vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.12.100 weekend110
jdk的安装
网友评论