centos7 网络sshd配置、域名配置

#centos7 网络sshd配置




http://www.oschina.net/question/1241342_129151


[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0


DEVICE="eth0"


BOOTPROTO="static"


HWADDR="00:0C:29:E5:9C:5F"


IPV6INIT="no"


NM_CONTROLLED="no"


ONBOOT="yes"


TYPE="Ethernet"


UUID="9663d550-4153-44b2-b5f6-8e49fc89a7e7"


IPADDR=172.16.3.98


NETMASK=255.255.255.0


GATEWAY=172.16.3.254


DNS1=10.1.1.4


DNS2=210.22.70.3




[root@localhost ~]# cat /etc/sysconfig/network


NETWORKING=yes


HOSTNAME=localhost.localdomain #配置这个主机名


GATEWAY=172.16.3.254


[root@localhost ~]# cat /etc/resolv.conf


; generated by /sbin/dhclient-script


search localdomain


nameserver 10.1.1.4


nameserver 210.22.70.3




###CentOS 7下Apache HTTP Server安装配置。
http://www.linuxidc.com/Linux/2014-11/109235.htm


yum -yinstall httpd


修改配置文件(修改前备份一下:cp httpd.conf httpd.conf.origin)


```
cd
/etc/httpd/conf
ls
httpd.conf 
```


###设置为自动启动
systemctl enable httpd.service




http://www.xker.com/page/e2010/0925/98279.html




###配置网络配置文件绑定域名
http://www.centoscn.com/CentOS/config/2014/1023/3993.html


cd  /etc/sysconfig/network-scripts/  #进入网络配置文件目录


vi  ifcfg-eno16777736  #编辑配置文件,添加修改以下内容


主要设置dns服务器
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值