写在前面:
我的博客已迁移至自建服务器:博客传送门,优快云博客暂时停止,如有机器学习方面的兴趣,欢迎来看一看。
此外目前我在gitHub上准备一些李航的《统计学习方法》的实现算法,目标将书内算法全部手打实现,欢迎参观并打星。GitHib传送门
查看主机名:
hostname
修改主机名:
vi /etc/sysconfig/network
修改其中的HOSTNAME
宏定义IP地址
eg. 用hadoop102表示192.168.10.102
vi /etc/hosts
将以下样例粘贴至文本内
192.168.11.101 hadoop101
192.168.11.102 hadoop102
192.168.11.103 hadoop103
192.168.11.104 hadoop104
192.168.11.105 hadoop105
192.168.11.106 hadoop106
192.168.11.107 hadoop107
192.168.11.108 hadoop108
windows中修改主机名:
C:\Windows\System32\drivers\etc\hosts
同样将以上配置信息写入文件中
防火墙:
查看防火墙状态:
service iptables status
临时关闭防火墙 :
service iptables stop
查看防火墙开机启动状态:
chkconfig iptables --list
关闭防火墙:
chkconfig iptables off
打开防火墙:
chkconfig iptables on
开关机:
sync //将数据由内存同步到硬盘中
shutdown[选项] 时间
[选项] -r 重启 -h 关机
时间: 分钟为单位
eg. shutdown -r 1 //1分钟后重启
halt //关闭系统,等用于shutdown -h now和poweroff
reboot //重启,等同于shutdown -r now