1. 程式人生 > >centos7 網路sshd配置、域名配置

centos7 網路sshd配置、域名配置

#centos7 網路sshd配置




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


[[email protected] ~]# 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




[
[email protected]
~]# cat /etc/sysconfig/network


NETWORKING=yes


HOSTNAME=localhost.localdomain #配置這個主機名


GATEWAY=172.16.3.254


[[email protected] ~]# 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伺服器