首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    修改Centos服务器主机名称

    Centos服务器安装好之后,默认的主机名为:localhost.localdomain,为了便与管理,我们需要对服务器主机名称进行修改,此修改生效涉及到两个配置文件/etc/sysconfig/network和/etc/hosts,下面教大家如何来做: [root@localhost ~]# vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=localhost.localdomain GATEWAY=192.168.1.1 修改为: [root@localhost ~]# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=ilkhome.cn #此处HOSTNAME即为你需要修改的主机名 GATEWAY=192.168.1.1 [root@localhost ~]# vi /etc/hosts 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 打开hosts文件之后我们进行修改, 其中 127.0.0.1 是本地环路地址, localhost.localdomain 是主机名(hostname),也就是你待修改的。localhost 是主机名的别名(alias),它会出现在Konsole的提示符下。将第二项修改为你的主机名,第三项可选。 [root@localhost ~]# cat /etc/hosts 127.0.0.1   localhost ilkhome.cn localhost4 localhost4.localdomain4 ::1         localhost ilkhome.cn localhost6 localhost6.localdomain6 //重新启动计算机使之生效 [root@localhost ~]# reboot 再次登陆之后主机名已经修改成功: Last login: Wed Jun  4 23:51:33 2014 from 192.168.1.3 [root@ilkhome.cn ~]# [root@ithov ~]# uname -n ilkhome.cn

    02

    linux下连接windows2003 ppoe 服务器

    1,在CentOS6.3下用 /usr/sbin/pppd  pty "/usr/sbin/pptp publicip --nolaunchpppd" file /etc/ppp/options.pptp user user1 password password1 再用tail -f /var/log/messages看到log如下 Oct  8 03:25:41 localhost pppd[2057]: pppd 2.4.5 started by root, uid 0 Oct  8 03:25:41 localhost pppd[2057]: Using interface ppp0 Oct  8 03:25:41 localhost pppd[2057]: Connect: ppp0 <--> /dev/pts/2 Oct  8 03:25:41 localhost pptp[2058]: anon log[main:pptp.c:314]: The synchronous pptp option is NOT activated Oct  8 03:25:41 localhost pptp[2066]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request' Oct  8 03:25:41 localhost pptp[2066]: anon log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply Oct  8 03:25:41 localhost pptp[2066]: anon log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established. Oct  8 03:25:42 localhost pptp[2066]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request' Oct  8 03:25:42 localhost pptp[2066]: anon log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply. Oct  8 03:25:42 localhost pptp[2066]: anon log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 19561). Oct  8 03:25:45 localhost pptp[2066]: anon log[ctrlp_disp:pptp_ctrl.c:950]: PPTP_SET_LINK_INFO received from peer_callid 0 Oct  8 03:25:45 localhost pptp[2066]: anon log[ctrlp_disp:pptp_ctrl.c:953]:   send_accm is 00000000, recv_accm is FFFFFFFF Oct  8 03:25:45 localhost pptp[2066]: anon warn[ctrlp_disp:pptp_ctrl.c:956]: Non-zero Async Control Character Maps are not supported! Oct  8 03:25:45 localhost pppd[2057]: CHAP authentication succeeded Oct  8 03:25:45 localhost pppd[2057]: LCP terminated by peer (tM-+)^R^@<M-Mt^@^@^BM-f) Oct  8 03:25:45 localhost pptp[2066]: anon log[ctrlp_disp:pptp_ctrl.c:950]: PPTP_SET_LINK_INFO received from peer_callid 0 Oct  8 03:25:45 localhost pptp[2066]: anon log[ctrlp_disp:pptp_ctrl.c:953]:   send_accm is FFFFFFFF, recv_accm is FFFFFFFF Oct  8 03:25:45 localhost

    02
    领券