Line 8: | Line 8: | ||
== 配置Fedora-14系统 == | == 配置Fedora-14系统 == | ||
VM虚拟机CPU饱和后不允许溢出运行; | |||
解决root用户直接登入问题 | |||
su - | |||
密码: | |||
输入命令:gedit /etc/pam.d/gdm& | |||
在文本编辑器中注释掉"auth required pam_succeed_if.so user!=root quiet"这一行(在这一行前面加上"#"注释,即改成#auth required pam_succeed_if.so user!=root quiet) | |||
保存后继续输入命令:gedit /etc/pam.d/gdm-password& | |||
同样地注释掉"auth required pam_succeed_if.so user!=root quiet"这一行。 | |||
保存后退出 | |||
现在就能使用root用户登录了 | |||
== 安装f-prot == | |||
(download_http://www.f-prot.com/download/home_user/) | |||
cd /usr/local/src | |||
tar zxvf fp-Linux-x86_64-ws.tar.gz | |||
cd f-prot | |||
./install-f-prot.pl | |||
选用默认的安装目录/usr/local/bin | |||
选用默认的安装手册目录/usr/share/man/man8 | |||
all done! | |||
全盘扫描 | |||
fpscan -a | |||
扫描结果 | |||
files:88552 | |||
skipped files:0 | |||
files with errors:2 | |||
Running time:06:28 | |||
=== 配置DNS服务器 === | === 配置DNS服务器 === | ||
rpm -ivh bind-9.7.2-2.P2.fc14.x86_64.rpm | |||
service named start | |||
查看主机名称 | |||
#honstname | |||
设置随机启动named服务:chkconfig --level 35 named on | |||
配置主机名: | |||
vi /etc/sysconfig/network | |||
NETWORKING=yes | |||
HOSTNAME=example.com.cn | |||
GATEWAY=192.168.1.5 | |||
完成本地域名解析 | |||
vi /etc/hosts | |||
192.168.122.192 example.com.cn hbdkkj # Added by NetworkManager | |||
127.0.0.1 localhost.localdomain localhost localhost4 | |||
::1 example.com.cn hbdkkj localhost6.localdomain6 localhost6 | |||
查看etc/host.conf文件 | |||
vi /etc/host.conf | |||
multi on | |||
order hosts,bind | |||
配置网卡: | |||
vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |||
DEVICE="eth0" | |||
BOOTPROTO="none" | |||
DEFROUTE="yes" | |||
DNS1="192.168.122.192" | |||
DOMAIN="com.cn" | |||
GATEWAY="192.168.1.5" | |||
HWADDR="00:16:96:16:3A:14" | |||
IPADDR="192.168.122.192" | |||
IPV4_FAILURE_FATAL="yes" | |||
IPV6INIT="no" | |||
NAME="System eth0" | |||
NM_CONTROLLED="yes" | |||
PREFIX="24" | |||
TYPE="Ethernet" | |||
UUID="5fb06bd0-0bb0-7ffd-45f1-d6edd65f3e03" | |||
NETMASK=255.255.255.0 | |||
USERCTL=no | |||
DNS2=192.168.1.5 | |||
配置本机DNS解析文件(系统>>管理>>网络>>DNS) | |||
vi /etc/resolv.conf | |||
# Generated by NetworkManager | |||
search com.cn | |||
nameserver 192.168.122.192 //配置本机主域名服务器IP | |||
nameserver 192.168.1.5 //配置外网域名服务器IP | |||
配置named主文件 | |||
cp /etc/named.conf /home/patriotserver/下载 | |||
vi /etc/named.conf | |||
// | |||
// named.conf | |||
// | |||
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS | |||
// server as a caching only nameserver (as a localhost DNS resolver only). | |||
// | |||
// See /usr/share/doc/bind*/sample/ for example named configuration files. | |||
// | |||
options { | |||
listen-on port 53 { 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"; | |||
query-source port 53; | |||
query-source-v6 port 53; | |||
allow-query { any; }; | |||
allow-query-cache { any;}; | |||
recursion yes; | |||
recursive-clients 10000; | |||
dnssec-enable yes; | |||
dnssec-validation yes; | |||
dnssec-lookaside auto; | |||
/* path to ISC DLV key*/ | |||
bindkeys-file "/etc/named/dynamic"; | |||
}; | |||
logging { | |||
channel default_debug { | |||
file "data/named.run"; | |||
severity dynamic; | |||
}; | |||
}; | |||
zone "." IN { | |||
type hint; | |||
file "named.ca"; | |||
}; | |||
include "/etc/named.rfc1912.zones"; | |||
include "/etc/named.root.key"; | |||
配置定义文件vi /etc/named.rfc1912.zones添加如下文件连接: | |||
zone "explame.com.cn" IN { | |||
type master; | |||
file "example.com.cn.zone"; | |||
allow-update { none; }; | |||
}; | |||
zone "192.168.192.in-addr.arpa" IN { | |||
type master; | |||
file "192.168.122.zone"; | |||
allow-update { none; }; | |||
}; | |||
配置正向解析文件(添加邮件域名@example.com.cn其中MX越小域名越优先): | |||
cd /var/named | |||
cp named.localhost example.com.cn.zone | |||
vi example.com.cn.zone | |||
$TTL 1D | |||
example.com.cn. IN SOA example.com.cn. root.example.com.cn. ( | |||
42 ; serial | |||
1D ; refresh | |||
1H ; retry | |||
3H ) ; minimum | |||
example.com.cn. IN NS example.com.cn. | |||
IN A 192.168.122.192 | |||
IN AAAA 0000:0000:0000:0000:0000:0000:c0a8:7ac0 | |||
IN MX 5 example.com.cn. | |||
www IN A 192.168.122.192 | |||
www IN AAAA 0000:0000:0000:0000:0000:0000:c0a8:7ac0 | |||
配置反向解析文件:/var/named/192.168.192.arpa | |||
cp named.loopback 192.168.122.arpa | |||
vi 192.168.192.arpa | |||
$TTL 1D | |||
192.168.192.in-addr.arpa. IN SOA example.com.cn. root.example.com.cn. ( | |||
42 ; serial | |||
1D ; refresh | |||
1H ; retry | |||
1W ; expire | |||
3H ) ; minimum | |||
192.168.192.in-addr.arpa. IN NS example.com.cn. | |||
IN A 192.168.122.192 | |||
IN AAAA 0000:0000:0000:0000:0000:0000:c0a8:7ac0 | |||
192 IN PTR www.example.com.cn. | |||
修改文件所属组: | |||
cd /var/named | |||
chgrp named example.com.cn.zone | |||
chgrp named 192.168.192.arpa | |||
设置文件权限: | |||
chmod 644 /etc/named.conf | |||
chmod 644 /etc/named.rfc1912.zones | |||
chmod 644 /var/named/example.com.cn.zone | |||
chmod 644 /var/named/122.168.192.arpa | |||
重新载入DNS域名解析: | |||
service named reload | |||
测试nslookup | |||
=== 配置Apache服务器 === | === 配置Apache服务器 === | ||
Line 18: | Line 342: | ||
=== 配置samba文件服务器 === | === 配置samba文件服务器 === | ||
安装samba客户端 | |||
rpm -ivh samba-common-3.5.5-68.fc14.1.x86_64.rpm | |||
rpm -ivh samba-client-3.5.5-68.fc14.1.x86_64.rpm | |||
查看共享资源 | |||
smbclient -L 192.168.1.254 | |||
访问共享资源(使用root账户防止访问本地文件夹受限) | |||
smbclient //192.168.1.254/public -u usename | |||
<smb:\>dir | |||
<smb:\>cd video | |||
<smb:\>get RealPlayer11GOLD.rpm | |||
=== 配置Redhat集群应用 === | === 配置Redhat集群应用 === | ||
=== 配置防火墙 === | === 配置防火墙 === | ||
# | *<1>更新防火墙iptables-1.4.9.1 | ||
# | |||
# | 下载最新的iptables版本(www.netfilter.org) | ||
# | |||
scp root@192.168.1.5:/root/iptables-1.4.9.1.tar.bz2 | |||
mv /root/iptables-1.4.9.1.tar.bz2 /usr/local/src/ | |||
cd /usr/local/src/ | |||
tar jxvf iptables-1.4.9.1.tar.bz2 | |||
cd iptables-1.4.9.1 | |||
./configure | |||
make | |||
make install | |||
*<2>将iptables服务停止 | |||
[root@linux-test root]# service iptables stop | |||
用/usr/local/sbin/iptables新文件替换/sbin/iptables(这个是老版本的连接位置) | |||
并同时替换ip6tables、ip6tables-restore、ip6tables-save、iptables、iptables-restore和iptables-save | |||
[root@linux-test root]# cp /usr/local/sbin/iptables /sbin/iptables | |||
iptables就升级完成了,使用下列命令查看 | |||
[root@linux-test root]# iptables -V | |||
iptables v1.4.9.1 | |||
*<3>使用snort.sh脚本在开机时自动开启防火墙设置 | |||
# echo "/etc/rc.d/snort.sh">>/etc/rc.d/rc.local | |||
将snort.sh防火墙脚本放在/etc/rc.d目录中 | |||
添加snort.sh文件的可执行权限 | |||
#chmod u+x /etc/rc.d/snort.sh | |||
#echo "1" >/proc/sys/net/ipv4/ip_forward | |||
或是修改/etc/sysctl.conf把net.ipv4.ip_forward = 0改为= 1 | |||
以下为防火墙脚本snort.sh内容: | |||
== Fedora-14使用中存在的bug == | == Fedora-14使用中存在的bug == |
Revision as of 13:23, 11 March 2011
In other languages:English | 中文(简体) | 中文(繁體) | Български | Català | Cymraeg | Galego | Magyar | Italiano | Nederlands | Português | Русский | Tiếng Việt
安装Fedora-14
在此处获得Fedora-14安装的鏡像文件。
在计算机安装Fedora-14-x86_64-DVD.iso的鏡像文件过程中, 当勾选默认配置时能够顺利完成安装; 当选择全部的安装包时系统提示有三个连接文件存在依赖关系无法完成最终的安装(其所需安装磁盘容量至少28.5GB);
配置Fedora-14系统
VM虚拟机CPU饱和后不允许溢出运行;
解决root用户直接登入问题
su -
密码:
输入命令:gedit /etc/pam.d/gdm&
在文本编辑器中注释掉"auth required pam_succeed_if.so user!=root quiet"这一行(在这一行前面加上"#"注释,即改成#auth required pam_succeed_if.so user!=root quiet)
保存后继续输入命令:gedit /etc/pam.d/gdm-password&
同样地注释掉"auth required pam_succeed_if.so user!=root quiet"这一行。
保存后退出
现在就能使用root用户登录了
安装f-prot
(download_http://www.f-prot.com/download/home_user/)
cd /usr/local/src
tar zxvf fp-Linux-x86_64-ws.tar.gz
cd f-prot
./install-f-prot.pl
选用默认的安装目录/usr/local/bin
选用默认的安装手册目录/usr/share/man/man8
all done!
全盘扫描
fpscan -a
扫描结果
files:88552
skipped files:0
files with errors:2
Running time:06:28
配置DNS服务器
rpm -ivh bind-9.7.2-2.P2.fc14.x86_64.rpm
service named start
查看主机名称
- honstname
设置随机启动named服务:chkconfig --level 35 named on
配置主机名:
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=example.com.cn
GATEWAY=192.168.1.5
完成本地域名解析
vi /etc/hosts
192.168.122.192 example.com.cn hbdkkj # Added by NetworkManager
127.0.0.1 localhost.localdomain localhost localhost4
- 1 example.com.cn hbdkkj localhost6.localdomain6 localhost6
查看etc/host.conf文件
vi /etc/host.conf
multi on
order hosts,bind
配置网卡:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="none"
DEFROUTE="yes"
DNS1="192.168.122.192"
DOMAIN="com.cn"
GATEWAY="192.168.1.5"
HWADDR="00:16:96:16:3A:14"
IPADDR="192.168.122.192"
IPV4_FAILURE_FATAL="yes"
IPV6INIT="no"
NAME="System eth0"
NM_CONTROLLED="yes"
PREFIX="24"
TYPE="Ethernet"
UUID="5fb06bd0-0bb0-7ffd-45f1-d6edd65f3e03"
NETMASK=255.255.255.0
USERCTL=no
DNS2=192.168.1.5
配置本机DNS解析文件(系统>>管理>>网络>>DNS)
vi /etc/resolv.conf
- Generated by NetworkManager
search com.cn
nameserver 192.168.122.192 //配置本机主域名服务器IP
nameserver 192.168.1.5 //配置外网域名服务器IP
配置named主文件
cp /etc/named.conf /home/patriotserver/下载
vi /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 { 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";
query-source port 53;
query-source-v6 port 53;
allow-query { any; };
allow-query-cache { any;};
recursion yes;
recursive-clients 10000;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* path to ISC DLV key*/
bindkeys-file "/etc/named/dynamic";
};
logging { channel default_debug { file "data/named.run"; severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
配置定义文件vi /etc/named.rfc1912.zones添加如下文件连接:
zone "explame.com.cn" IN {
type master;
file "example.com.cn.zone";
allow-update { none; };
};
zone "192.168.192.in-addr.arpa" IN {
type master;
file "192.168.122.zone";
allow-update { none; };
};
配置正向解析文件(添加邮件域名@example.com.cn其中MX越小域名越优先):
cd /var/named
cp named.localhost example.com.cn.zone
vi example.com.cn.zone
$TTL 1D
example.com.cn. IN SOA example.com.cn. root.example.com.cn. (
42 ; serial
1D ; refresh
1H ; retry
3H ) ; minimum
example.com.cn. IN NS example.com.cn.
IN A 192.168.122.192
IN AAAA 0000:0000:0000:0000:0000:0000:c0a8:7ac0
IN MX 5 example.com.cn.
www IN A 192.168.122.192
www IN AAAA 0000:0000:0000:0000:0000:0000:c0a8:7ac0
配置反向解析文件:/var/named/192.168.192.arpa
cp named.loopback 192.168.122.arpa
vi 192.168.192.arpa
$TTL 1D
192.168.192.in-addr.arpa. IN SOA example.com.cn. root.example.com.cn. (
42 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
192.168.192.in-addr.arpa. IN NS example.com.cn.
IN A 192.168.122.192
IN AAAA 0000:0000:0000:0000:0000:0000:c0a8:7ac0
192 IN PTR www.example.com.cn.
修改文件所属组:
cd /var/named
chgrp named example.com.cn.zone
chgrp named 192.168.192.arpa
设置文件权限:
chmod 644 /etc/named.conf
chmod 644 /etc/named.rfc1912.zones
chmod 644 /var/named/example.com.cn.zone
chmod 644 /var/named/122.168.192.arpa
重新载入DNS域名解析:
service named reload
测试nslookup
配置Apache服务器
配置DHCP服务器
配置mail邮件服务器
配置samba文件服务器
安装samba客户端
rpm -ivh samba-common-3.5.5-68.fc14.1.x86_64.rpm
rpm -ivh samba-client-3.5.5-68.fc14.1.x86_64.rpm
查看共享资源
smbclient -L 192.168.1.254
访问共享资源(使用root账户防止访问本地文件夹受限)
smbclient //192.168.1.254/public -u usename
<smb:\>dir
<smb:\>cd video
<smb:\>get RealPlayer11GOLD.rpm
配置Redhat集群应用
配置防火墙
- <1>更新防火墙iptables-1.4.9.1
下载最新的iptables版本(www.netfilter.org)
scp root@192.168.1.5:/root/iptables-1.4.9.1.tar.bz2
mv /root/iptables-1.4.9.1.tar.bz2 /usr/local/src/
cd /usr/local/src/
tar jxvf iptables-1.4.9.1.tar.bz2
cd iptables-1.4.9.1
./configure
make
make install
- <2>将iptables服务停止
[root@linux-test root]# service iptables stop
用/usr/local/sbin/iptables新文件替换/sbin/iptables(这个是老版本的连接位置)
并同时替换ip6tables、ip6tables-restore、ip6tables-save、iptables、iptables-restore和iptables-save
[root@linux-test root]# cp /usr/local/sbin/iptables /sbin/iptables
iptables就升级完成了,使用下列命令查看
[root@linux-test root]# iptables -V
iptables v1.4.9.1
- <3>使用snort.sh脚本在开机时自动开启防火墙设置
# echo "/etc/rc.d/snort.sh">>/etc/rc.d/rc.local
将snort.sh防火墙脚本放在/etc/rc.d目录中
添加snort.sh文件的可执行权限
#chmod u+x /etc/rc.d/snort.sh
#echo "1" >/proc/sys/net/ipv4/ip_forward
或是修改/etc/sysctl.conf把net.ipv4.ip_forward = 0改为= 1
以下为防火墙脚本snort.sh内容:
Fedora-14使用中存在的bug
以下是中文(zh_cn)GNOME2.32.0界面中应用软件存在的bug
- 系统>>管理>>防火墙
防火墙配置>>icmp过滤器>>重新定向
"这个出错信息让主机想另一个路由中发送数据包" 软件中文界面解释中“想”应修改为“向”;完整修改如下: "这个出错信息让主机向另一个路由中发送数据包"