#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服务器
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服务器