因为平时安装都是使用的mini install 方式安装的。所以今天需要调整内核时发现没有安装源码。
于是新装了souce文件。
安装方法:
1.Mount上安装媒体 (mount -t cd9660 /dev/acd0 /cdrom )在Linux中使用的是-t 9660
2.进入/cdrom/*-RELEASE/src
3.执行sh install.sh base sys (base 和 sys为要安装的源码类型。在这儿我只安装基本和系统的。因为我现在只用得到这两样)
[ad#ad_article_2]
主题:
1. 概述
2. 框架图
3. 语法
4. 实例分析
5. 网管策略
6. FAQ
7. 实战
[ad#ad_article_2]
Read entire article.
squid 有一个最重要的设置 http_port 8080 transparent 透明代理的关键就是transparent!!!
然后在Iptables里面打开对8080的访问,再在NAT表中,重定向80端口的请求到8080
Linux:CentOS
Linux bogon 2.6.18-128.1.14.el5 #1 SMP Wed Jun 17 06:40:54 EDT 2009 i686 i686 i386 GNU/Linux
Iptables:iptables v1.3.5
Squid:
Squid Cache: Version 2.6.STABLE21
configure options: ‘–build=i686-redhat-linux-gnu’ ‘–host=i686-redhat-linux-gnu’ ‘–target=i386-redhat-linux-gnu’ ‘–program-prefix=’ ‘–prefix=/usr’ ‘–exec-prefix=/usr’ ‘–bindir=/usr/bin’ ‘–sbindir=/usr/sbin’ ‘–sysconfdir=/etc’ ‘–includedir=/usr/include’ ‘–libdir=/usr/lib’ ‘–libexecdir=/usr/libexec’ ‘–sharedstatedir=/usr/com’ ‘–mandir=/usr/share/man’ ‘–infodir=/usr/share/info’ ‘–exec_prefix=/usr’ ‘–bindir=/usr/sbin’ ‘–libexecdir=/usr/lib/squid’ ‘–localstatedir=/var’ ‘–datadir=/usr/share’ ‘–sysconfdir=/etc/squid’ ‘–enable-epoll’ ‘–enable-snmp’ ‘–enable-removal-policies=heap,lru’ ‘–enable-storeio=aufs,coss,diskd,null,ufs’ ‘–enable-ssl’ ‘–with-openssl=/usr/kerberos’ ‘–enable-delay-pools’ ‘–enable-linux-netfilter’ ‘–with-pthreads’ ‘–enable-ntlm-auth-helpers=SMB,fakeauth’ ‘–enable-external-acl-helpers=ip_user,ldap_group,unix_group,wbinfo_group’ ‘–enable-auth=basic,digest,ntlm’ ‘–enable-digest-auth-helpers=password’ ‘–with-winbind-auth-challenge’ ‘–enable-useragent-log’ ‘–enable-referer-log’ ‘–disable-dependency-tracking’ ‘–enable-cachemgr-hostname=localhost’ ‘–enable-underscores’ ‘–enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SMB,YP,getpwnam,multi-domain-NTLM,SASL’ ‘–enable-cache-digests’ ‘–enable-ident-lookups’ ‘–with-large-files’ ‘–enable-follow-x-forwarded-for’ ‘–enable-wccpv2′ ‘–enable-fd-config’ ‘–with-maxfd=16384′ ‘build_alias=i686-redhat-linux-gnu’ ‘host_alias=i686-redhat-linux-gnu’ ‘target_alias=i386-redhat-linux-gnu’ ‘CFLAGS=-D_FORTIFY_SOURCE=2 -fPIE -Os -g -pipe -fsigned-char’ ‘LDFLAGS=-pie’
需要以下几个软件包。
bind-libs-9.3.4-10.P1.el5
bind-chroot-9.3.4-10.P1.el5
bind-9.3.4-10.P1.el5
bind-utils-9.3.4-10.P1.el5
bind-libbind-devel-9.3.4-10.P1.el5
bind-sdb-9.3.4-10.P1.el5
bind-devel-9.3.4-10.P1.el5
caching-nameserver-9.3.4-10.P1.el5
Read entire article.
今天把硬盘没用的空间fdisk出来了,想手动加入fstab里面好让系统每次自动加载。可mount /dev/hda4 /file能够成功。但是 mount /file却提示 丫的没 找不到lable!
于是百度,忙活了半天也没有找到为什么。
后来搜索linux fstab时。偶然看到一个命令e2lable。丫的 原来是我的/dev/hda4 没标签。。。。。
于是操作之。。。。。
#/etc/fstab
#设备名 挂载点 类型 mount参数 dump参数 fsck顺序
/dev/sda9 swap swap defaults 0 0
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
第一列, 设备名
问题来了, LABEL=/ , 靠, 这是什么设备啊 ,
e2label /dev/sda8, 显示/ , 知道了, 原来/dev/sda8就是/啊, 真费尽.
第二列, mount点
第三列, 文件系统类型
第四列, mount时的参数
defaults == rw, suid, dev, exec, auto, nouser, and async.
第五列, dump的参数, 0为不检查
dump会检查这个参数, 来决定这个文件系统是否要备份.
第六列, fsck的顺序参数, 0为不检查
统启动的时候,会根据这个参数的顺序来逐个检查文件系统.
Over, 记住e2label可以更改一个设备的label名, 如果我把/home分区重做了, 记住用e2label给它贴个标签, 否则fstab无法认出新分区.
今天在CentOS中添加了一块8139的网卡。启动完成后。没看到eth1这块网卡起来
通过lspci 可以看到已经存在两块网卡,/etc/sysconfig/network-script/里面已经存在ifcfg-eth1文件。
可能运行ifconfig eth1 却提示没有这个设备。
然后通过cat /etcs/sysconfig/hwconf 找到新增网卡的MAC名。然后在 eth1文件里面添加此文件。
重启network 后,成功找到设备!!!
在redhat linux上加双网卡,网关,路由 Read entire article.
利用Dchpd+NAT+Squid+PPPOE实现内网完全
1.DHCP配置
2.SQUID配置 (http://blog.ghitr.com/index.php/archives/325)
3.NAT配置(暂无,明天加上)
4.PPPOE配置(暂无,明天加上)
因本机无DHCPD,所以需要安装
http://rpmfind.net/linux/rpm2html/search.php?query=dhcpd
的这上面找到
[ad#ad_article_2]
Read entire article.
today,i upgrade my Centos’s kernel.
我也不知道这句是否应该这样写。
it’s use : ” yum update kernel ”
[root@bogon ~]# yum update kernel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
Read entire article.