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-信号(二)pending

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

Linux Skills

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

Linux skills

  • 2016-03-04 16:36
  • 839KB
  • 下载

linux skills

  • 2013-12-01 09:07
  • 839KB
  • 下载

使用C3P0-0.9.1.jar包的问题:APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!

tomcat运行的好好的,老大说服务器挂了,你赶紧去看看。。。确实还是运行着,但报了错……小问题,重启一下tomcat呗,so...restart...C3P0-0.9.1.jar包的问题出现了:20...

signal_pending与返回-ERESTARTSYS

经常我们在睡眠的代码中 会看到这样的例子: if (signal_pending(current)) { ret = -ERESTARTSYS; return ret; } ...

信号屏蔽(pending)

本文主要简单介绍下linux下信号的阻塞,解除阻塞并递达。 先介绍下相关概念: 信号递达(Delivery):实际执行信号的处理动作 , 有3种状态: 1.忽略 2.执行默认操作(一般为终止...

hustoj的永久pending 与 永久Running & Judging解决

服务器环境:阿里云 hustoj的运行环境:debian 7.5.0 32位 安装时遇到一个问题install.sh脚本执行失败 解决:阿里云上的这个debian版本不支持 sudo命令,手动编...

Handling multiple pending socket read and write operations

The following source was built using Visual Studio 6.0 SP5 and Visual Studio .Net. You need to have ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

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