云乐国鑫

随笔分类 -  centos

centos使用心得。
摘要:【which】查看可执行文件的位置语法: [root@localhost ~]# which 可执行文件名称 例如: [root@localhost ~]# which passwd /usr/bin/passwd which是通过PATH环境变量到该路径内查找可执行文件,所以基本的功能是寻找可执行文件。【whereis】语法: [root@localhost ~]# whereis [-bmsu... 阅读全文
posted @ 2018-01-05 21:41 国鑫 阅读(223) 评论(0) 推荐(0)
摘要:########## config jdk ##########export JAVA_HOME=/usr/local/java/jdk1.7.0_79export CLASSPATH=.:${JAVA_HOME}/lib:${JAVA_HOME}/jre/libexport PATH=${JAVA_HOME}/bin:$PATH########## config hadoop #########... 阅读全文
posted @ 2018-01-05 21:31 国鑫 阅读(140) 评论(0) 推荐(0)
摘要:centos 7:systemctl stop firewalld.service#停止systemctl disable firewalld.service #禁用之前版本:service iptables stop #停止chkconfig iptables off #禁用 阅读全文
posted @ 2018-01-05 21:29 国鑫 阅读(112) 评论(0) 推荐(0)
摘要:ip addr #查看网卡信息cd /etc/sysconfig/network-scripts/ #进入网卡信息目录vi ifcfg-eth0 #编辑网卡信息 ONBOOT=yesservice network restart #重启网卡ip addr #查看网卡信息 阅读全文
posted @ 2018-01-05 21:28 国鑫 阅读(140) 评论(0) 推荐(0)
摘要:新增用户snzigod:adduser snzigod修改snzigod密码:passwd snzigod删除用户snzigod:userdel snzigod删除用户以及用户目录: userdel -f snzigod 阅读全文
posted @ 2018-01-05 21:27 国鑫 阅读(182) 评论(0) 推荐(0)
摘要:临时修改主机名显示主机名:root@localhost:~$ hostnamelocalhost修改主机名:root@localhost:~$ sudo hostname snzigodroot@localhost:~$ hostnamesnzigod以上的修改只是临时修改,重启后就恢复原样了。永久修改主机名步骤1:修改/etc/sysconfig/network中的hostnamevi /etc... 阅读全文
posted @ 2018-01-05 21:23 国鑫 阅读(157) 评论(0) 推荐(0)

版权所有@snzigod