Recently in Linux Category

双出口下路由设置..

| | Comments (0) | TrackBacks (0)
2个出口,一个教育网,一个网通。
当同时使用是发现默认总是使用后起用的出口。。强制设置下网关
 
首先查看路由设置
route print
然后添加路由,校内地址从教育网的网关
route add -p 211.64.0.0 mask 255.255.0.0 222.206.203.254
然后删除教育网网关,这样默认除了上面加了规则的,都从网通走
route delete 0.0.0.0 mask 0.0.0.0 222.206.203.254
 
写的不详细,以后再说吧

cd
wget http://www.aczoom.com/tools/blockhosts/BlockHosts-2.1.0.tar.gz
tar xvfz BlockHosts-2.1.0.tar.gz
cd cd BlockHosts-2.1.0
python setup.py install --force
nano /etc/blockhosts.cfg

修改

[...]
HOSTS_BLOCKFILE = "/etc/hosts.allow"
[...]
HOST_BLOCKLINE = ["ALL: ", " : deny"]
[...]
LOGFILES = [ "/var/log/auth.log", "/var/log/proftpd/proftpd.log", ]
[...]
COUNT_THRESHOLD = 3
[...]
AGE_THRESHOLD = 12
[...]
MAIL = True
[...]
NOTIFY_ADDRESS = 'root@localhost.localdomain'
[...]
SMTP_SERVER = "localhost"
SENDER_ADDRESS = 'BlockHosts <blockhosts-do-not-reply@localhost.localdomain>'
[...]
IPBLOCK = "iptables" [...]

In HOSTS_BLOCKFILE we can specify either /etc/hosts.allow or /etc/hosts.deny. It doesn't matter which one we choose. I'm using /etc/hosts.allow here. In the LOGFILES line we specify the log files that BlockHosts should look at. OpenSSH is logging failed login attempts to /var/log/auth.log, ProFTPd to /var/log/proftpd/proftpd.log. COUNT_THRESHOLD specifies the number of failed login attempts from the same host after which BlockHosts should block that host. AGE_THRESHOLD is the numer of hours after which blocked hosts get unblocked. IPBLOCK specifies if you'd like to block hosts with iptables or iproute in addition to adding these hosts to /etc/hosts.allow (or /etc/hosts.deny).

Next we must modify /etc/hosts.allow. First back up your current /etc/hosts.allow:

cp /etc/hosts.allow /etc/hosts.allow_bak
nano /etc/hosts.allow

TCP: Treason uncloaked! Peer 203.168.193.2:55074/80 shrinks window ... Repaired.
系统信息中出现大量这个问题,查了下资料
 
先在网上看到这样的一段解释:

The remote host decided to shrink the TCP window size without negotiating such with your Linux box. The message is of the informational level, meaning Linux doesn't like what it is seeing but will cope with it and carry on.

大致意思是说:这是一段一般性提示信息,说明远程主机在未经Linux主机"同意"就收缩了TCP window size,虽然Linux主机不喜欢这类举动,但是仍将继续处理这类请求.

这是一种解释,也就是这类信息可能并非危险.

另外一段解释来自Debian邮件列表,首先回复者引用了一段源代码说明错误的来源:

>>From /usr/src/linux/net/ipv4/tcp_timer.c:

        if (tp->snd_wnd == 0 && !sk->dead &&
            !((1<<sk->state)&(TCPF_SYN_SENT|TCPF_SYN_RECV))) {
                /* Receiver dastardly shrinks window. Our retransmits
                 * become zero probes, but we should not timeout this
                 * connection. If the socket is an orphan, time it out,
                 * we cannot allow such beasts to hang infinitely.
                 */
#ifdef TCP_DEBUG
                if (net_ratelimit())
                        printk(KERN_DEBUG "TCP: Treason uncloaked! Peer
%u.%u.%u.%u:%u/%u shrinks window %u:%u. Repaired.\n",
                               NIPQUAD(sk->daddr), htons(sk->dport), sk->num,
                               tp->snd_una, tp->snd_nxt);
#endif

具体的解释是:

So it appears that someone is running some sort of "tar-pit" system that is
designed to keep sockets in a bad state and run you out of kernel memory.

I suspect that this ties in with the spam blocking things we recently
discussed.  Maybe you should tell your ISP that they are to blame for such
actions being done to you and that they should "give you face" (I think that
was the term you used) by closing their open relays.

作者认为这可能和tar-pit攻击相关.并且建议联系ISP提供解决方案.

还有如下的解释:

The reason Linux is printing such messages is because your client guy is shrinking the TCP Window to 0, and the server has something to retransmit. There is something seriously wrong with your client's stack. Which Stack/OS are you using on he client side, and which browser?

That could explain your browser showing some html tags as the server fails to send the whole page across and based on what browser you are using it is failing to parse it out.

意思是,这类错误也可能是客户端Stack错误引起的.

另一段同样引用了源代码的解释似乎直指了问题的本质:

> Treason uncloaked! Peer [IP address]:515/1022 shrinks window
> 3957222360:3957222379.  Repaired.

> Our researches so far indicate the problem may be a buggy TCP stack
> in the client, that is in the DP301P+. But we still do not know
> exactly what caused the problem, nor how to prevent it happening
> again.

That comes from the kernel tcp code below.  Looks like the DLink has
returned information yielding a transmit window smaller than it
previously did; specifically it returned a window of zero plus an ack
of up to byte 3957222360, thus indicating that it can accept nothing
after that byte.  Previously it had sent some ack+wnd values
indicating that it would accept up to byte 3957222379.

The Linux side is now supposed to send a packet every now and then
forever until the returned window is nonzero.  It does. 

However, the dlink is apparently not responding in a timely manner.
Any response would either open the window or update the rcv timestamp
such that the thing will retransmit forever.  It may be responding
very slowly, or just not responding at all.

The kernel prints the message after it expected but did not see a
response to the probe packet it sent to check for a nonzero window.
The kernel implements exponential backoff retransmissions until it
hasn't seen any response in 2m, then it will bail and close the
connection.  This is reasonable.  It's unclear from your report if the
connections are failing outright or just sometimes having to
retransmit a probe against a peer that shrank the window.

这段解释极为详尽.就此作结.

proftpd虚拟用户注意问题

| | Comments (0) | TrackBacks (0)

proftpd配置文件中设置的最大连接数为500,结果发现事实上到了100就不能连接了。

今天发现原来是mysql的问题,mysql中max_connections设置的为100。导致proftpd用户登录时,与mysql连接进行验证失败。

修改my.conf ,将里面的max_connections设置为500就ok了

 用惯了proftpd,本来打算用pureftpd的,后来想想算了。proftpd虚拟用户的配置其实很早就解决了,只是虚拟用户和本地用户同时登录,一直没有解决。于是趁这个机会仔细研究了下。依然是debian下面的配置。

参考站点:HowtoForge  上面有很多server的配置,各种平台下,从debian到redhat,以及suse,mandriva都有,非常详细。强烈推荐。

安装mysql和phpmyadmin,其中phpmyadmin不是必需的

apt-get install mysql-server mysql-client libmysqlclient15-dev phpmyadmin apache2

为mysql设置root密码

mysqladmin -u root password yourrootsqlpassword

如果需要其他人访问本机的mysql,同样需要设置密码

mysqladmin -h server1.example.com -u root password yourrootsqlpassword

安装带mysql支持的proftpd,注意选择proftpd工作在standalone模式

apt-get install proftpd-mysql

建立虚拟用户组,这个是为了把proftpd用户虚拟到本机的一个用户上。注意下面的2001修改为自定义的。

groupadd -g 2001 ftpgroup
useradd -u 2001 -s /bin/false -d /bin/null -c "proftpd user" -g ftpgroup ftpuser

debian 上qlogic存储空间划分

| | Comments (0) | TrackBacks (0)

 debian上挂载的存储,一共2快。大小分别为1T和2T。因为刚刚挂载,所以没有分区。下面是分区过程。同时发现debian下的图形化分区工具cfdisk,效果不错。只是似乎不能选择reserfs格式。但是对于其他应用非常不错

首先对2T空间sdd分区,首先还是建立分区

bt:/# fdisk /dev/sdd

The number of cylinders for this disk is set to 130541.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-130541, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-130541, default 130541):
Using default value 130541

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


分配文件格式,为了提高效率,设置的reiserfs格式

bt:/# mkfs.reiserfs /dev/sdd1
mkfs.reiserfs 3.6.19 (2003 www.namesys.com)

A pair of credits:
Edward Shushkin wrote the encryption and compression  file plugins,  and the V3
journal relocation code.

The  Defense  Advanced  Research  Projects Agency (DARPA, www.darpa.mil) is the
primary sponsor of Reiser4.  DARPA  does  not  endorse  this project; it merely
sponsors it.

Guessing about desired format.. Kernel 2.6.18-4-686 is running.
Format 3.6 with standard journal
Count of blocks on the device: 262142624
Number of blocks consumed by mkreiserfs formatting process: 16211
Blocksize: 4096
Hash function used to sort names: "r5"
Journal Size 8193 blocks (first block 18)
Journal Max transaction length 1024
inode generation number: 0
UUID: afd18a2b-f8fd-448a-ac64-7886b53706bd
ATTENTION: YOU SHOULD REBOOT AFTER FDISK!
        ALL DATA WILL BE LOST ON '/dev/sdd1'!
Continue (y/n):y
Initializing journal - 0%....20%....40%....60%....80%....100%
Syncing..ok

Tell your friends to use a kernel based on 2.4.18 or later, and especially not a
kernel based on 2.4.9, when you use reiserFS. Have fun.

ReiserFS is successfully created on /dev/sdd1.

然后挂载分区

bt:/# mount -t reserfs /dev/sdc1 /var/ftp/

 

开机自动挂载,修改/etc/fstab就可以了

Technorati 标记: , , , ,

hp-unix 安装Emulex HBA卡

| | Comments (1) | TrackBacks (0)

首先下载相应版本的驱动,我的是

http://www-dl.emulex.com/support/hpux/53109/lpfc.depot-05_31_09-hpux11iv2_64_dlkm.z

然后上传到服务器

重命名

mv lpfc.depot-05_31_09-HPUX11iv2_64_dlkm.z lpfc.depot 05_31_09-HPUX11iv2_64_dlkm.Z

解压缩

uncompress lpfc.depot-05_31_09-HPUX11iv2_64_dlkm.Z

安装
swinstall -s `pwd`/lpfc.depot-t-05_31_09-HPUX11iv2_64_dlkm

似乎hp unix的彷图形界面有些不稳定,同样环境的2台机器,1台一次成功,1台安装总是失败,重新启动2次后安装成功。。

安装后查看是否安装成功

# kcmodule -v lpfc

 

Technorati 标记: , , , ,

Debia 下安装Qlogic 2460 HBA卡

| | Comments (0) | TrackBacks (0)

新到的存储,准备在Debian下使用,但是Qlogic官方没有提供for debian的驱动,只有for redhat ,SLSE的。在debian下需要自己安装下。

首先插上HBA卡,启动系统。从启动信息中发现似乎已经找到了。

进入系统,执行lsmod,发现模块已经加载了。

qla2xxx               126560  0
firmware_class          9600  1 qla2xxx
scsi_transport_fc      28544  1 qla2xxx

但是无法正常驱动,查看系统日志: more /var/log/systemlog

发现如下信息

QLogic Fibre Channel HBA Driver
qla2xxx 0000:02:01.0: Found an ISP2100, irq 10, iobase 0xf8826000
qla2xxx 0000:02:01.0: Configuring PCI space...
qla2xxx 0000:02:01.0: Configure NVRAM parameters...
qla2xxx 0000:02:01.0: Verifying loaded RISC code...
qla2xxx 0000:02:01.0: Firmware image unavailable.
qla2xxx 0000:02:01.0: Firmware images can be retrieved from: ftp://ftp.qlogic.com/outgoing/linux/firmware/.
qla2xxx 0000:02:01.0: Failed to initialize adapter

提示firmware有问题,到提示的地址下载,ftp://ftp.qlogic.com/outgoing/linux/firmware/.

结果网络实在是太慢。。。下载不到。。于是google了一下debian的deb包,发现确实有。

于是执行

wget ftp://ftp.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-qlogic_*

dpkg -i firmware-qlogic_*

update-initramfs -k all -u

然后执行

#find / -name *logic

/usr/src/qlogic
/usr/share/doc/firmware-qlogic
/usr/share/initramfs-tools/hooks/firmware_qlogic

然后执行

./usr/share/initramfs-tools/hooks/firmware_qlogic

重新执行

update-initramfs -k all -u

重新启动系统,然后查看系统日志,已经正确加载

QLogic Fibre Channel HBA Driver
PCI: Enabling device 0000:0f:03.0 (0150 -> 0153)
ACPI: PCI Interrupt 0000:0f:03.0[A] -> GSI 160 (level, low) -> IRQ 74
qla2xxx 0000:0f:03.0: Found an ISP2312, irq 74, iobase 0xf88f8000
qla2xxx 0000:0f:03.0: Configuring PCI space...
qla2xxx 0000:0f:03.0: Configure NVRAM parameters...
qla2xxx 0000:0f:03.0: Verifying loaded RISC code...
qla2xxx 0000:0f:03.0: Allocated (412 KB) for firmware dump...
qla2xxx 0000:0f:03.0: LIP reset occured (f8f7).
qla2xxx 0000:0f:03.0: Waiting for LIP to complete...
qla2xxx 0000:0f:03.0: LIP occured (f8f7).
qla2xxx 0000:0f:03.0: LOOP UP detected (2 Gbps).
qla2xxx 0000:0f:03.0: LIP reset occured (f7f7).
qla2xxx 0000:0f:03.0: LIP occured (f7f7).
qla2xxx 0000:0f:03.0: Topology - (Loop), Host Loop address 0x0

参考文章

http://john.parnefjord.se/node/8

http://blog.sina.com.cn/u/544465b00100067v

今天查找l下的,结果偶然发现了这个东西。。
一个非常bt的 在多操作系统下的bt客户端。。
方式运行,用,可以用服务器来下载bt。。要做的仅仅是点几下链接。。。邪恶啊
主要特点:
  • Upload Torrents via URL or File Upload
  • Start, Stop, and Delete Torrents with a click
  • Advanced Torrent start options (ports, speeds, etc.)
  • Multi-user interface
  • RSS Feeds, download Torrents files with a click
  • View Download Progress of all torrents at a glance
  • View drive space at a glance
  • View Torrent file meta information
  • Built-in User management and Security
  • Private Messaging
  • Themes (selectable per user)
  • Upload History
  • Detailed User Administration
  • Admin Searchable Logs
  • Advanced Torrent Search (many major sites included)
  • Cookie support at the user level for private trackers
  • Queue Manager
  • Maketorrent -- supports making torrents
  • Language Support
  • 注意,支持中文!!
    在debian下的安装异常简单,只需要:
    apt-get update
    apt-get install apache2 mysql-server mysql-client php4-mysql apache-common bittornado libapache2-mod-php4 libphp-adodb locales mysql-common php4-common pwgen
    apt-get install torrentflux
    就ok了。注意经过我测试,发现torrentflux,似乎只能用在Php4环境下,对php5环境,链接mysql会出问题。
    1.png
    2.png

    debian遗忘root密码的处理

    | | Comments (0) | TrackBacks (0)
    对于一些版本的OS(如redhat)来说,编辑,在后面加上“single”即可进入单用户模式。但是对于debian来说,这种方式是无效的,因为debian进入单用户模式也需要你输入root用户的密码。
     
    下面介绍一个在所有版本linux的grub上均可以使用的方法:
     
     
    1、在Grub的引导装载程序菜单上,选择你要进入的条目,键入 “e” 来进入编辑模式。
    2、在第二行(类似于kernel /vmlinuz-2.6.15 ro root=/dev/hda2 ),键入”e”进入编辑模式;
    3、在句末加上”init=/bin/bash”,回车;
    4、按“b”启动系统。
    这样我们即可获得一个bash的shell。
      
    进入shell后,根分区的挂载模式默认是只读,我们要将其改为可写,否则不能更改root密码:
      
    mount -no remount,rw /
    passwd root
    sync
    mount -no remount,ro /
    reboot
     
     
    这样即可成功更改t用户的
     

    debian版本及远相关信息

    | | Comments (0) | TrackBacks (0)
    昨天安装debian 4.0,对源的选择有些混乱。专门上网找了下文章。转下

    suse 中禁用 nvidia启动logo

    | | Comments (0) | TrackBacks (0)
    编辑/etc/X11/xorg.conf 在section “Device” 中加一行 Option "NoLogo"

    open suse 10.2安装nvidia驱动

    | | Comments (0) | TrackBacks (0)
    http://www.suse.de/~sndirsch/nvidia-installer-HOWTO.html#1

    It is recommended to use YaST for installation of the NVIDIA
    driver. There are several reasons for this. First, it's
    simple. Second, and this is the most important one, you won't need to
    recompile the nvidia kernel module after a kernel update.

    Update your Kernel via YOU (YaST Online Update). Use

    -> Software -> Change installation Source -> Add

    Protocol: HTTP
    Server Name: : download..com
    Directory on Server: /opensuse/

    to add the NVIDIA ftp server as additional installation source.
    Now use

    YaST -> Software -> Install and Delete Software

    to install the NVIDIA driver. Select the following packages:

    x11-video-nvidia
    nvidia-gfx-kmp-"kernel-flavor"

    "kernel-flavor" depends on your installed kernel. Check with
    "uname -r" for installed default/smp/bigsmp kernel. Use "sax2 -r"
    for X.Org configuration.

    People who aren't afraid of recompiling the nvidia kernel module or
    even reinstalling the nvidia driver each time the kernel has been
    updated and want or need to use the latest and greatest nvidia driver
    can use the following steps 1-3. The others should use the
    instructions above using YaST and skip the steps below.

    1) Kernel sources must be installed and configured. Usually this means
    installing the 'kernel-source', 'make' and 'gcc' packages with YaST2.

    2) Use the nvidia installer for 1.0-9746.

    sh NVIDIA-Linux-x86-1.0-9746-pkg1.run -q

    3) Configure X.Org with

    sax2 -r -m 0=nvidia (0 is a digit, not a letter!)

    NOTE: There is no need to try to enable 3D support. It's already
    enabled, when the nvidia driver is running.

    IMPORTANT: You need to recompile and install the nvidia kernel module
    after each kernel update.

    sh NVIDIA-Linux-x86-1.0-9746-pkg1.run -K

    Red Hat AS5 下服务

    | | Comments (0) | TrackBacks (0)
    安装了 ,发现和以前的有些区别,最基本的,apache,名称都已经改变了。。

    [root@meteor-pc ~]# /etc/init.d/
    acpid                     dc_server                 kdump                     nscd                      setroubleshoot
    anacron                   dhcdbd                    killall                   ntpd                      single
    apmd                      dund                      kudzu                     pand                      smartd
    atd                       firstboot                 mcstrans                  pcscd                     squid
    auditd                    functions                 mdmonitor                 portmap                   sshd
    autofs                    gpm                       mdmpd                     psacct                    syslog
    avahi-daemon              haldaemon                 messagebus                rdisc                     tomcat5
    avahi-dnsconfd            halt                      microcode_ctl             readahead_early           tux
    bluetooth                 hidd                      mysqld                    readahead_later           vncserver
    capi                      httpd                     netfs                     restorecond               winbind
    conman                    ip6tables                 netplugd                  rhnsd                     wpa_supplicant
    cpuspeed                  ipmi                      network                   rpcgssd                   xfs
    crond                     iptables                  NetworkManager            rpcidmapd                 ypbind
    cups                      irda                      NetworkManagerDispatcher  rpcsvcgssd                yum-updatesd
    cups-config-daemon        irqbalance                nfs                       saslauthd                
    dc_client                 isdn                      nfslock                   sendmail                 
    from: http://www.extremetech.com/article2/0,1697,2114115,00.asp
    This feature includes various hacks to s such as viewing running processes, identifying resources, finding process startups, tuning kernel parameters, and speeding up boot time. This is a complete chapter in the ExtremeTech book "Hacking Ubuntu: Serious Hacks Mods And Cusomtizations."

    The default Ubuntu Dapper Drake installation includes some basic processes that check devices, tune the operating system, and perform housekeeping. Some of these processes are always running, while others start up periodically. Occasionally you might see your hard drive start up or grind away for a few minutes—what's going on? On mission critical servers, serious gaming boxes, and other real-time systems, unexpected processes can cause huge problems; administrators should know exactly what is running and when. The last thing a time-sensitive application needs is for a resource-intensive maintenance system to start at an unexpected time and cause the system to slow down.

    In order to fine-tune your system, you will need to know what is currently running, which resources are available, and when processes start up. From there, you can tweak configurations: disable undesirable processes, enable necessary housekeeping, and adjust your kernel to better handle your needs.

    Time to Change
    Different versions of Ubuntu (and Linux) use different startup scripts and run different support processes. Knowing how one version of Linux works does not mean that you know how all versions work. For example, one of my computers has a clock that loses a few minutes after every reboot. (It's an old computer.) When I installed Ubuntu Dapper Drake (6.06), I noticed that the time was correct after a reboot. I started to look around to find out how it did that and which timeserver it was using. The first thing I noticed was that there was no script in /etc/init.d/ for setting the time. Eventually I tracked down the network startup scripts and found that the ntpdate script was moved from /etc/init.d/ (in previous Ubuntu releases) to /etc/network/if-up.d/. This script allowed me to find the network time protocol (NTP) configuration file (/etc/default/ntpdate).

    A similar problem came up when I started running Ubuntu Hoary Hedgehog (5.04). Periodically the hard drives would grind when I was not doing anything. At other times it happened when I was running processes that were impacted by disk I/O—when the drives began to grind, the critical process would detect a processing problem. I quickly narrowed the disk grinding to updatedb—a caching program that works with slocate for quickly finding files. What I could not find was how this program was being started. Eventually I discovered that updatedb was started by anacron, an automated scheduler.

    While it is important to know what is running, it is even more important to know how to track down running processes and tune them to your needs.

    Learning the Lingo
    Everything that runs on the system is a process. Processes are programs that perform tasks. The tasks may range from system maintenance to configuring plug-and-play devices and anything else the user needs. System processes manage keep the operating system running, whereas user processes handle user needs.

    Many processes provide services for other processes. For example, a web server is a service for handling HTTP network requests. The web server may use one or more processes to perform its task. Some services are critical to the system's operation. For example, if the system must support graphics but the X-Windows service is unavailable, then a critical service is missing.

    Although most system processes are services, most user processes are applications. Applications consist of one or more processes for supporting user needs. For example, the Firefox web browser is an application that helps the user browse the web. In general, services start and end based on system needs, while applications start and end based on user needs.

    None of these definitions—programs, processes, applications, and services—are very distinct. For example, the Gnome desktop consists of programs and processes that provide services to other programs and supports user needs. GDE can be called a set of programs, processes, applications, or services without any conflict.

    When I talk about processes, I refer to anything that generates a running process identifier (see the next section for Viewing Running Processes). Programs are the executable files on the system that generate one or more processes. Users directly use applications, while the operating system uses services.

    修改grub背景图片

    | | Comments (0) | TrackBacks (0)
    a) Find gzipped, 640x480, 14 color only, xpm images (like the ones above).
    b) Put the images in /boot/grub/splashimages/.
    c) Rename the image you wish to use to 'splash.xpm.gz'.
    d) Make a link to /boot/grub/splashimages/splash.xpm.gz and put it in /boot/grub/.
    e) Open /boot/grub/menu.lst and below the 'Pretty colours' section add a third line as below:

    # Pretty colours
    # color cyan/blue white/blue
    splashimage=(hd0,1)/boot/grub/splash.xpm.gz

    (The hd0,1 refers to hard drive 1 partition 2 where my file system is installed. You'll need to change those numbers if yours differs.)

    f) That's it. Restart to see the new eye candy. For more in depth explanations: GNU GRUB Splash Image Howto, GRUB splash Image Information or

    linux下sftp的客户端

    | | Comments (0) | TrackBacks (0)
    linux下图形化的sftp客户端,“)
    apt-get install filezila
    有点不稳定,似乎 ,不过类似于 ,linux下有 用的就行了

    优化debian的安装源

    | | Comments (0) | TrackBacks (0)
    1、 方式:
     
    `apt-spy'会根据站点回应时间和带宽自动创建`sources.list'。
     

    #apt-get install apt-spy
    #mv sources.list sources.list.bak //backup
    #man apt-spy //获取详细的使用方法
    #apt-spy update //更新您的镜像列表文件 /var/lib/apt-spy/mirrors.txt
    # apt-spy -d testing -a Asia
    //在亚洲区寻找速度最快的testing版镜像,并生成 sources.list文件,也可使用 -o 参数指定写入文件
     
    提示:这是一个漫长,确实一劳永逸的过程.
     

    2、方式:
     
    `netselect-apt'会创建一个更完整的`sources.list'文件,但它使用更落后的方法来选择镜像站点
     

    #apt-get install netselect-apt
    #mv sources.list sources.list.bak //backup
    #man netselect-apt //获取详细的使用方法
    # netselect-apt -s testing
    //下载http: //www.debian.org/mirror/list-full文件,并根据其内容测试网络,生成sources.list
    也可将下载http://www.debian.org/mirror/list-full手动下载到本地, 并同过参数 -i 指定
    同样可以通过 -o 参数指定输出文件而不是默认的sources.list

    debian下软raid的建立

    | | Comments (1) | TrackBacks (0)
    rt ,下软件的建立方法。
     
    不过说实话,个人感觉,这种raid很bt。。
    先说下硬件,2个76g的scsi硬盘,安装debian
    配置好之后,df信息
    /dev/sda5              2538092    387272   2150820  16% /
    tmpfs                  1026960         0   1026960   0% /dev/shm
    /dev/sda1               192692     39476    153216  21% /boot
    /dev/md1              48827944     32840  48795104   1% /home
    /dev/md0              40241324     32840  40208484   1% /web
     
    今天重新配了一下以前的一台机器。。用的双
    以前安装的内核,总是会不能正常启动。今天重装系统,装了最新的内核看看,结果发现
    linux-image-2.6.8-12-amd64-k8-smp居然可以正常工作了:)
    不过可惜。。2.6的内核。。2.4下依然没有支持k8的。。

    让 Apt 使用代理

    | | Comments (0) | TrackBacks (0)
    光缆仍然没好的情况下,在 中使用 时,为了获得访问或者较好的速度,我们可以通过使用来解决这个问题.
     
     

    apt-get 有一个配置文件 .conf,它位于 /etc/apt/ 目录下,我们只需对它稍作更改即可.
     

    执行的步骤为:
     

    1.打开终端,并输入 gksudo gedit /etc/apt/apt.conf.这里,你也可以使用自己喜好的编辑器来代替 gedit.另外,如果 apt.conf 文件不存在,你可以创建一个.
    2.添加下列内容:
     
    Acquire {
     
    http::proxy “http://user:pass@yourProxyAddress:port”
     
    }
     
    你必需调整引号中的内容以适应自己的需要.如代理地址、帐号、密码、端口.另外,如果不需要帐号或密码,则可以省略不写.
     
    3.假如你只想临时让 Apt 使用代理的话,则可以这样做:
     
    export http_proxy=”http://user:pass@youProxyAddress:port/”

    linux下ts服务器搭建

    | | Comments (0) | TrackBacks (0)
    useradd -d /home/teamspeak teamspeak
    su teamspeak
     
    cd /home/teamspeak
    wget ftp://ftp.freenet.de/pub/4players/teamspeak.org/releases/ts2_server_rc2_20201.tar.bz2
     
    tar -xjf ts2_server_rc2_20201.tar.bz2
    cd tss2_rc2
     ./teamspeak2-server_startscript start
    服务器密码在ts启动后,从server.ini文件查看

    Linux系统中的关机命令

    | | Comments (0) | TrackBacks (0)
    几种关机方式,什么shutdown,reboot,init..都有都有。。

    [转]架设DNS全攻略

    | | Comments (0) | TrackBacks (0)
    作者cpss ,原文出处:http://cpss.zz.ha.cn/bind/bind.htm

    About this Archive

    This page is a archive of recent entries in the Linux category.

    Humour is the previous category.

    MovableType is the next category.

    Find recent content on the main index or look in the archives to find all content.

    Pages

    Powered by Movable Type 4.1