linux skills(pending)

原创 2007年09月23日 14:36:00
 

HTML Tags and JavaScript tutorial



linux skills(pending)





building linux kernel sources
uname -r
rpm -ivh kernel-2.6.11-1.1369_FC4.src.rpm
rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec
cd /usr/src
mv /usr/src/redhat/BUILD/kernel-2.6.11/linux-2.6.11 /usr/src/linux-2.6.11
ln -s linux-2.6.11 linux
-----------------------------------------------------------------------------------------------------------
启动httpd
service httpd start|stop|restart
缺省网页路径
/var/www/html
php.ini路径(修改网页间变量值传递global??为ON)
/etc
-----------------------------------------------------------------------------------------------------------
启动mysql
/etc/init.d
mysqld start
-----------------------------------------------------------------------------------------------------------
启动tftp
/usr/sbin/in.tftpd -l -a 10.46.1.170:69 -s /tftpboot
-----------------------------------------------------------------------------------------------------------
NFS如何建立
Server:
vi /etc/exports
/vob    *(rw,sync)
/etc/rc.d/init.d/portmap start (在REDHAT中PORTMAP是默认启动的)
/etc/rc.d/init.d/nfs start
exportfs -a
Client:
rpm -ivh nfs-utils-1.0.7-8.i386.rpm
mount -t nfs hostname(orIP):/directory /mount/point
检测手段
nfsstat
rpcinfo
showmount –e IP
-----------------------------------------------------------------------------------------------------------
问:telnet后很长时间才出现登录画面,但是登录后速度并不慢,原因是什么?
答:这个问题的根本原因是: 反向域名解析!
简单解决办法:
vi /etc/resolv.conf
search localdomain
nameserver 172.19.30.63
nameserver 172.19.30.64
受反向域名 解析影响初始连接速度的应用有telnet,ftp, 而www,proxy要看配置中DNS是否许可。受影响程度与本地LAN与Internet连接的速度有关, 当你用 9600bps的X.25(or DDN)与ISP连接的话, 那么这个问题会更加明显。
这个问题的解释: 
unix主机上诸如telnetd,ftpd,logind 这内的服务程序, 通常在接受连接时试图知道客户机IP对应的域名, 它当然会查询本地dns server, dns server 或者会回答unix主机以客户机的域名,或者会通知unix主机客户机没有域名, 或者查询超时.. 当客户机IP在本地dns server上没有反向域名记录时, dns server 与外界联系是必须的.. 本地LAN与Internet连接的速度当然会影响到反向域名解析, 最糟糕的情况是telnetd等服务程序要等到反向域名解析超时才会做下一步的工作。
解决办法:
由于抱怨通常是来自内部的, 更何况你能管的也只有内部这个网络。我的做法是: 给内部网络的每个IP都加上反向域名记录, 可是问题又出来了并非每个IP都有域名啊?!
域名解析和反向域名解析并非镜像的关系,你大可以有这样的一个反向域的配置文件:
1.168.192.in-addr.arpa  IN  SOA  dns.xxxx.com.cn. xxxx.xxx.xxx.com.cn. (
884107551               ; Serial Number
10800                   ; Refresh after 3 hours
3600                    ; Retry after 1 hour
604800                  ; Expire after 1 week
86400 )                 ; Minimum TTL of 1 day                 
1       IN      PTR     192.168.1.1.
2       IN      PTR     192.168.1.2.
这样做,情况就好多了.. 不过一些站点有域名验证的(用反向域名解析查到的域名再正向解析一次,看看IP对不对),你就进不去了。
如何重起telnet?
:service xinetd restart
0012 让root直接telnet登陆(bjchenxu)
编辑/etc/pam.d/login,去掉
auth required /lib/security/pam_securetty.so 这句话
好像不起作用?
这样修改可以成功:
mv /etc/securetty /etc/securetty.bak
-----------------------------------------------------------------------------------------------------------
vsftp skill
问:如何允许root用户ftp登陆
答:修改/etc/vsftpd下的ftpusers和user_list
ftpusers:
#root
user_list:
root=NO
-----------------------------------------------------------------------------------------------------------
PXE skills
参考资料:
http://www-128.ibm.com/developerworks/cn/linux/l-tip-prompt/l-pex/index.html
http://syslinux.zytor.com/pxe.php#config
必要的配置文件:
/etc/dhcpd.conf(参考dhcp configuration document to run)。
/etc/xinetd.d/tftp(参考tftp skills document to run)。
/tftpboot/pxelinux.cfg/default(参考PXE Linux configuration)。
光盘内容都已经拷贝到10.46.1.170/tftpboot。
确认pxelinux.0 ,vmlinuz(Linux内核)和initrd.img(Linux根文件系统)拷贝到Linux Server的/tftpboot下。
-----------------------------------------------------------------------------------------------------------
PXE Linux configuration
/tftpboot/pxelinux.cfg/default
default linux
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label linux
  kernel vmlinuz
  append console=ttyS0,9600 initrd=initrd.img ramdisk_size=8192
label text
  kernel vmlinuz
  append text console=ttyS0,9600 initrd=initrd.img ramdisk_size=8192
label rescure
  kernel vmlinuz
  append rescure console=ttyS0,9600 initrd=initrd.img ramdisk_size=8192
label expert
  kernel vmlinuz
  append expert initrd=initrd.img ramdisk_size=8192
label ks
  kernel vmlinuz
  append ks initrd=initrd.img ramdisk_size=8192
label lowres
  kernel vmlinuz
  append initrd=initrd.img lowres ramdisk_size=8192
label local
  localboot 1 console=ttyS0,9600
label memtest86
  kernel memtest
  append -
-----------------------------------------------------------------------------------------------------------
file control
find -name filename
-----------------------------------------------------------------------------------------------------------
system manage
directory capacity: du -k
hda usage: df -k
-----------------------------------------------------------------------------------------------------------
dhcp configuration
vi /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
allow booting;
allow bootp;
subnet 10.46.1.160 netmask 255.255.255.224 {
# --- default gateway
        option routers                  10.46.1.1;
        option broadcast-address        10.46.1.255;
        option domain-name              "domain.org";
        option domain-name-servers      10.46.1.170;
        range 10.46.1.184 10.46.1.187;
        default-lease-time 21600;
        max-lease-time 43200;
        group {
                next-server 10.46.1.170;
                filename "pxelinux.0";
                host tftpclient {
                        hardware ethernet 00:03:BA:4C:DF:2A;
                        fixed-address 10.46.1.184;
                }
                host tftpclient1 {
                        hardware ethernet 00:03:BA:4C:DF:2B;
                        fixed-address 10.46.1.184;
                }
                host tftpclient2 {
                        hardware ethernet 00:03:BA:44:3F:8E;
                        fixed-address 10.46.1.186;
                }
                host tftpclient3 {
                        hardware ethernet 00:03:BA:44:3F:8F;
                        fixed-address 10.46.1.186;
                }
                host tftpclient4 {
                        hardware ethernet 00:03:BA:44:3E:BE;
                        fixed-address 10.46.1.184;
                }
                host tftpclient5 {
                        hardware ethernet 00:03:BA:44:3E:BF;
                        fixed-address 10.46.1.184;
                }
                host tftpclient6 {
                        hardware ethernet 00:03:BA:44:3D:A2;
                        fixed-address 10.46.1.185;
                }
                host tftpclient7 {
                        hardware ethernet 00:03:BA:44:4E:40;
                        fixed-address 10.46.1.186;
                }
        }
}
vi /tftpboo/pxelinux.cfg/default
default linux
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label linux
  kernel vmlinuz
  append console=ttyS0,9600 initrd=initrd.img ramdisk_size=8192
label text
  kernel vmlinuz
  append text console=ttyS0,9600 initrd=initrd.img ramdisk_size=8192
label rescure
  kernel vmlinuz
  append rescure console=ttyS0,9600 initrd=initrd.img ramdisk_size=8192
label expert
  kernel vmlinuz
  append expert initrd=initrd.img ramdisk_size=8192
label ks
  kernel vmlinuz
  append ks initrd=initrd.img ramdisk_size=8192
label lowres
  kernel vmlinuz
  append initrd=initrd.img lowres ramdisk_size=8192
label local
  localboot 1 console=ttyS0,9600
label memtest86
  kernel memtest
  append -
开放dhcp server的root登陆ftp权限
/etc/vsftpd/ftpusers
/etc/vsftpd/vsftpd.conf
开放tftpboot目录权限
/etc/init.d/dhcpd eth0 start
-----------------------------------------------------------------------------------------------------------
 linux网络抓包
tcpdump host ip


Linux Skills

In this post, I will record the daily usage of linux, as well as the ways toresolve the common probl...

Linux-信号(二)pending

1.阻塞信号 实际执⾏信号的处理动作称为信号递达(Delivery),信号从产⽣到递达之间的状态,称为信号未决(Pending)。进程可以选择阻塞(Block )某个信号。被阻塞的信号产生时将保持在...

程序员技术练级攻略-Build Your Programming Technical Skills

这是一篇很好的博文,看完了感触很深,作者说的很有道理,便转载于此,分享给网友,并且供日后查阅以勉励自己,原文链接如下:http://coolshell.cn/articles/4990.html ...

Codeforces Round #339 (Div. 2) D. Skills(模拟+枚举)

time limit per test2 seconds memory limit per test256 megabytesLesha plays the recently published n...

Codeforces 581C - Developing Skills(贪心)

题目大意:有n个技能,k个技能点。技能对应的等级为$a[i] \ i∈[0.n-1] $任何一个技能,每达到10级,人物等级+1,技能最高100级。合理的加技能,求人物可以达到的最高等级是多少 ?...

C. Developing Skills (CF Round #322 (Div.2) 贪心)

题意:给出n个数,还有一个数k,用k去补这n个数,使得ai/10之和最大。 思路:贪心。先把n个数按照x值从小到大排序,其中x等于 把ai变为10的倍数所需要要添加的最小值;然后用k尽量去把每个数按照...

Do You Have These Core Human Skills?你拥有这些核心人类技能吗?

Do You Have These Core Human Skills?你拥有这些核心人类技能吗?in Learning Optimization“A human being should be ab...
  • donhao
  • donhao
  • 2011年01月16日 20:36
  • 912

17.3.30 DeepVisage: Making face recognition simple yet with powerful generalization skills 小感

最近读了《DeepVisage: Making face recognition simple yet with powerful generalization skills》这篇文章。从作者的abs...

续续 Codeforces 613 B Skills

题目传送门:http://codeforces.com/contest/613/problem/B Two pointers的解法,就是喜欢优美的解法和装逼的姿势!! 首先存储的方式逼格就很高,比...
  • yp_2013
  • yp_2013
  • 2016年01月15日 19:16
  • 388
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:linux skills(pending)
举报原因:
原因补充:

(最多只允许输入30个字)