redhat服务器配置_redhat 网卡配置文件

hacker|
98

文章目录:

redhat7.3 bond配置

如图所示。

现在一般的企业的服务器都会使用双网卡接入,这样既能添加网络带宽,又能做相应的冗余,可以说是好处多多。redhat 7虽然新增了teaming技术支持双网卡绑定,在但bonding技术依然可以沿用。什么 是配置

一般认为软件生存周期各个阶段活动的产物经审批后即可称之为软件配置项。软件配置管理是贯穿整个软件生存周期的一项技术。它的主要功能是控制软件生存周期中软件的改变,减少各种改变所造成的影响,确保软件产品的质量。正确应用软件配置管理是开发高质量软件所不可缺少的。软件配置管理的过程是软件开发过程中质量管理的精髓。

RedHat-Linux配置DNS详细步骤是什么?

RedHat-Linux服务器搭建DNS服务器;

DNS domain name system 域名系统

特点:(1)具备递归查询和迭代查询

(2)分布式数据库

(3)将域名解析为IP

(4)具有主DNS服务器、辅DNS服务器和缓存DNS服务器三种类型

(5)全球13台根域服务器

以下是搭建步骤:

1、准备软件包

bind.i386 --主服务软件包

bind-chroot.i386 -- 笼环境软件包

bind-devel.i386 --开发包

bind-libs.i386 --库文件

bind-utils.i386 --工具包

[root@rootbug ~]# rpm -qa |grep ^bind- --rhel6.3下的包

bind-utils-9.8.2-0.10.rc1.el6.x86_64

bind-chroot-9.8.2-0.10.rc1.el6.x86_64

bind-libs-9.8.2-0.10.rc1.el6.x86_64

bind-9.8.2-0.10.rc1.el6.x86_64

bind-dyndb-ldap-1.1.0-0.9.b1.el6.x86_64

-------------看到软件包有点纠结,为啥呢??因为这些软件包的名字跟DNS这三个词每半点关系---------

2、安装软件包

[root@rootbug ~]#yum install bind* -y

3、查看配置文件

RHEL6下不管是安装了bind-chroot还是不安装,配置文件都是以/var/named.conf文件为主。

(1)修改/etc/named.conf

[root@rootbug ~]#vim /etc/named.conf

-------省略其他万行代码----------------

options {

listen-on port 53 { any; }; --将原配置文件中的127.0.0.1改为any,表示监听所有

listen-on-v6 port 53 { ::1; };

directory "/var/named"; --域的数据文件存放目录

dump-file "/var/named/data/cache_dump.db";

statistics-file "/var/named/data/named_stats.txt";

memstatistics-file "/var/named/data/named_mem_stats.txt";

allow-query { any; }; --将配置文件的localhost改为any,表示所有人能查询这台服务器

recursion yes;

-------省略其他万行代码----------------

修改之后保存退出

(2)配置/etc/named.rfc1912.zones,增加域的配置

[root@rootbug ~]#vim /etc/named.rfc1912.zones

按照配置文件格式添加一个域,这里我添加一个rootbug.com的域,域的数据文件放在directory "/var/named"当前目录下的data下,名称为:master.rootbug.com.zone。配置域时请注意“;”分号。

zone "rootbug.com" IN {

type master;

file "data/master.rootbug.com.zone";

};

配置好之后保存退出。

(3)创建master.rootbug.com.zone的数据文件

[root@rootbug ~]#vim /var/named/data/master.cluster.com.zone

$TTL 3600

@ IN SOA rootbug. zhangsan. (

2013090801 --版本号,下面的是各种时间,作用是主从DNS服务器的同步时间

30

60

90

3600 )

IN NS 172.16.2.151. --这里就是DNS服务器的IP(实际应该是公网IP,但这里是内网环境,所以写的内网IP),但是ip地址最后还有一个“.”记得加点,也可以写DNS服务器的外网域名;并且这里可以写多个NS,代表了你公司的多台DNS服务器

mail IN A 1.1.1.1 --A记录就是真正的数据,这里代表mail.rootbug.com的公网地址为1.1.1.1

dns IN A 172.16.2.151

bbs IN A 2.2.2.2

保存退出

(4)启动DNS服务器

[root@rootbug ~]#/etc/init.d/named start ----第一次配置开启过程需要等待一段时间

(5)客户端认证DNS服务器是否正确

windows客户端认证

在IP配置DNS栏中将首选DNS填写为172.16.2.151即可

Microsoft Windows XP [版本 5.1.2600]

(C) 版权所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\ruutbugnslookup mail.rootbug.com

*** Can't find server name for address 172.16.2.151: Server failed

*** Default servers are not available

Server: UnKnown

Address: 172.16.2.151

Name: mail.rootbug.com

Address: 1.1.1.1

C:\Documents and Settings\ruutbugnslookup dns.rootbug.com

*** Can't find server name for address 172.16.2.151: Server failed

*** Default servers are not available

Server: UnKnown

Address: 172.16.2.151

Name: dns.rootbug.com

Address: 172.16.2.151

C:\Documents and Settings\ruutbugnslookup bbs.rootbug.com

*** Can't find server name for address 172.16.2.151: Server failed

*** Default servers are not available

Server: UnKnown

Address: 172.16.2.151

Name: bbs.rootbug.com

Address: 2.2.2.2

如何 在Redhat Linux 系统上安装和配置apache 服务器

下载安装就不说了,

配置

apache

2.0的主配置文件为httpd.conf。以rpm包方式安装则配置文件保存在/etc/httpd/conf/目录下。可以直接修改httpd.conf文件也可以用redhat

linux自带的图形化工具来配置。打开启动程序-系统设置-服务器设置-http服务器

port

80

#定义了web服务器的侦听端口,默认值为80

user

apache

#一般情况下,以nobody用户和nobody组来运行web服务器

serveradmin

root@localhost

#指定服务器管理员的e-mail地址。服务器自动将错误报告到该地址。 

serverroot

/etc/httpd

#服务器的根目录,一般情况下,所有的配置文件在该目录下

maxkeepaliverequests

100

#永久连接的http请求数

maxclients

150

#同一时间连接到服务器上的客户机总数

errorlog

logs/error_log

#用来指定错误日志文件的名称和路径

pidfile

run/httpd.pid

#用来存放httpd进程号,以方便停止服务器。

timeout

300

#设置请求超时时间,若网速较慢则应把值设大。

documentroot

/var/www/html

#用来存放网页文件

redhat7.2 centos7.2怎么配置ntp服务器

redhat版本不同ntp的版本可能也会有所变化,在安装之前需要查找ntp服务,看下是否存在:

yum search ntp

2

查找到ntp.x86_64,使用yum进行安装。安装时.x64_64可以不输入。

yum install -y ntp

-y:不提示,直接安装

3

进入ntp配置目录:

vi /etc/ntp.conf

4

进入ntp.conf配置文件,注释以server开头的配置,并添加内容:server 127.127.1.1

添加完成保存退出。

5

重启ntp服务器,并查看状态是否running。

systemctl restart ntpd.service #重启服务

systemctl status ntpd.service #查看状态

6

查看ntp服务是否能够被同步,显示为“LOCAL”,表示成功。如果没有任何显示,客户端将无法同步。

END

步骤2(Client):

1

服务器已经配置完成,现在是Client配置,测试Client能否与Server相连。

2

在Clientt上使用ntpdate来同步:ntpdate 192.168.116.2

同步后反馈是是成功同步的。

END

注意事项

时间上不能相差过远

redhat enterprise 如何配置samba服务器

/etc/samba/smb.conf主配置文件,此文件中有丰富的说明注释

使用smbpasswd命令使Linux系统用户成为Samba用户,命令格式如下:

smbpasswd –a 用户名

SMB.CONF具体实例

# This is the main Samba configuration file. You should read the

# smb.conf(5) manual page in order to understand the options listed

# here. Samba has a huge number of configurable options (perhaps too

# many!) most of which are not shown in this example

#

# Any line which starts with a ; (semi-colon) or a # (hash)

# is a comment and is ignored. In this example we will use a #

# for commentry and a ; for parts of the config file that you

# may wish to enable

#

# NOTE: Whenever you modify this file you should run the command "testparm"

# to check that you have not many any basic syntactic errors.

#

#======================= Global Settings =====================================

[global]

# workgroup = NT-Domain-Name or Workgroup-Name

workgroup = Workgroup ;计算机所在的工作组名或域名

netbios name = fileserver ;即在,网上邻居中显示的计算机名

# server string is the equivalent of the NT Description field

server string = Samba Server ;计算机描述

This option is important for security. It allows you to restrict

# connections to machines which are on your local network. The

# following example restricts access to two C class networks and

# the "loopback" interface. For more examples of the syntax see

# the smb.conf man page

; hosts allow = 192.168.1. 192.168.2. 127. ;允许访问的计算机的IP地址

; hosts allow = 172.16.0. 172.16.3. 127.

# if you want to automatically load your printer list rather

# than setting them up individually then you'll need this

; printcap name = /etc/printcap加载打印机的配置路径

load printers = no是否将打印机共享

# It should not be necessary to spell out the print system type unless

# yours is non-standard. Currently supported print systems include:

# bsd, sysv, plp, lprng, aix, hpux, qnx

; printing = cups一种打印驱动模式,即LINUX支持的标准打印类型。其LINUX支持的打印类型有bsd, sysv, plp, lprng, aix, hpux, qnx

# Uncomment this if you want a guest account, you must add this to /etc/passwd

# otherwise the user "nobody" is used

; guest account = nobody

guest account = guest ;允许访问(不需要用户名与密码)也可以指定任何系统内置的一个帐号做为来宾帐号。

# this tells Samba to use a separate log file for each machine

# that connects

log file = /var/log/samba/%m.log.会给用户在此目录下做每个SAMBA用户登录的日志。

# Put a capping on the size of the log files (in Kb).

max log size = 50日志 文件限制在50K内

# Security mode. Most people will want user level security. See

# security_level.txt for details.

security = share

; security = user

# Use password server option only with security = server

; password server = NT-Server-Name此行的作用为如果上面的选项为SERVER,则SAMBA服务器在做身份识别的时候,把WIN机器发过来的密码同用户名交给此项设定的密码服务器验证。

# Password Level allows matching of _n_ characters of the password for

# all combinations of upper and lower case.

; password level = 8

; username level = 8(对于从前的几款老式的WINDOWS系统对于大小写密码支持的不是很好,所以开启上面的两个参数的意义是在密码为8位的用户名与密码的帐号里自动匹配所有的大小写测试)

# You may wish to use password encryption. Please read

# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.

# Do not enable this option unless you have read those documents

encrypt passwords = yes(加密明文的SAMBA密码进行发送)

smb passwd file = /etc/samba/smbpasswd验证密码所在的目录

# The following are needed to allow password changing from Windows to

# update the Linux sytsem password also.

# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.

# NOTE2: You do NOT need these to allow workstations to change only

# the encrypted SMB passwords. They allow the Unix password

# to be kept in sync with the SMB password.

# Windows Internet Name Serving Support Section:

# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server

; wins support = yes把该服务器配置为WINS服务器

# WINS Server - Tells the NMBD components of Samba to be a WINS Client

# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both

; wins server = 192.168.1.100也可以指定一个WINS服务器,让自己成为WINS客户

# WINS Proxy - Tells Samba to answer name resolution queries on

# behalf of a non WINS capable client, for this to work there must be

# at least one WINS Server on the network. The default is NO.

; wins proxy = yes(针对老式计算机,不用设置)

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names

# via DNS nslookups. The built-in default for versions 1.9.17 is yes,

# this has been changed in version 1.9.18 to no.

dns proxy = no(针对老式计算机,不用设置)

# Case Preservation can be handy - system default is _no_

# NOTE: These can be set on a per share basis

; preserve case = no

; short preserve case = no

# Default case is normally upper case for all DOS files

; default case = lower

# Be very careful with case sensitivity - it can break things!

; case sensitive = no

(整个上面这段为讨论与WINDWOS文件系统的大小写问题因为微软的系统是一个大小写不区分 的系统,默认用默认值即可。因为修改可能造成与WINDOWS的不兼容问题)

#============================ Share Definitions ==============================

[homes]作为登录用户,自己访问自己目录的设置。

; comment = Home Directories目录说明

; browseable = no用户私人目录不需要给别人浏览。

; writable = yes也可以用read only=no来替代

# Un-comment the following and create the netlogon directory for Domain Logons

; [netlogon]域用户登录目录设置。

; comment = Network Logon Service

; path = /home/netlogon

; guest ok = yes

; writable = no

; share modes = no

# Un-comment the following to provide a specific roving profile share

# the default is to use the user's home directory

;[Profiles]

; path = /home/profiles

; browseable = no

; guest ok = yes

# NOTE: If you have a BSD-style print system there is no need to

# specifically define each individual printer

[printers]打印机共享

comment = All Printers说明共享全部打印机

path = /var/spool/samba打印机池,用户必须手工创建该目录。

browseable = no

# Set public = yes to allow user 'guest account' to print

guest ok = no

writable = no

printable = yes用户是否可以打印

# This one is useful for people to share files

;[tmp]

; comment = Temporary file space

; path = /tmp

; read only = no可以写入

; public = yes即目录是否共享给来宾帐号。

# A publicly accessible directory, but read only, except for people in

# the "staff" group

[public]

comment = Public Stuff

path = /home/soft

public = yes

guest ok = yes以上两个public=yes代表来宾帐号能访问此共享目录,但guest ok代表密码不是必须的,可以不加。

writable = yes

printable = no

write list = @staff此参数告诉我们不必要让所有人访问共享目录,可以有staff这个组的成员能访问,但在passwd和shadow文件中要存在这个组。

# Other examples.

#

# A private printer, usable only by fred. Spool data will be placed in fred's

# home directory. Note that fred must have write access to the spool directory,

# wherever it is.

;[fredsprn](设置仅供一人使用的共享打印机)

; comment = Fred's Printer;

valid users = fred

; path = /homes/fred

; printer = freds_printer

; public = no

; writable = no

; printable = yes

# A private directory, usable only by fred. Note that fred requires write

# access to the directory.

;[fredsdir] (为创建一个私有目录,别人都不能访问,只有fred这个用户能访问)

; comment = Fred's Service

; path = /usr/somewhere/private

; valid users = fred

; public = no

; writable = yes

; printable = no

# a service which has a different directory for each machine that connects

# this allows you to tailor configurations to incoming machines. You could

# also use the %u option to tailor it by user name.

# The %m gets replaced with the machine name that is connecting.

;[pchome]

; comment = PC Directories

; path = /usr/pc/%m

; public = no

; writable = yes

# A publicly accessible directory, read/write to all users. Note that all files

# created in the directory by users will be owned by the default user, so

# any user with access can delete any other user's files. Obviously this

# directory must be writable by the default user. Another user could of course

# be specified, in which case all files would be owned by that user instead.

;[public]

; path = /usr/somewhere/else/public

; public = yes

; only guest = yes

; writable = yes

; printable = no

# The following two entries demonstrate how to share a directory so that two

# users can place files there that will be owned by the specific users. In this

# setup, the directory should be writable by both users and should have the

# sticky bit set on it to prevent abuse. Obviously this could be extended to

# as many users as required.

;[myshare]这个例子是配置一个仅供两个用户访问的目录

; comment = Mary's and Fred's stuff

; path = /usr/somewhere/shared

; valid users = mary fred

; public = no

; writable = yes

; printable = no

; create mask = 0765

最后建议在图形界面配置比较简单

在LINUX提示符下输入startx

即可进入图形界面 和WINDOWS差不多 窗口化的配置比较直观也比较简单

4条大神的评论

  • avatar
    访客 2022-07-09 上午 03:48:12

    rd also.# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.# NOTE2: You do NOT need these to allow workstations to change only#

  • avatar
    访客 2022-07-09 上午 09:38:09

    need this; printcap name = /etc/printcap加载打印机的配置路径 load printers = no是否将打印机共享# It should not be necessary to spell out the print system type unles

  • avatar
    访客 2022-07-08 下午 11:39:56

    connects log file = /var/log/samba/%m.log.会给用户在此目录下做每个SAMBA用户登录的日志。# Put a ca

  • avatar
    访客 2022-07-09 上午 12:32:18

    #vim /var/named/data/master.cluster.com.zone$TTL 3600@ IN SOA rootbug. zhangsan. (2013090801 --版本号,下面的是各种时间,作用是主从DNS服务器的同步时间3060903600 )I

发表评论