分类: Linux预览模式: 普通 | 列表

Linux Centos 时间同步

首先安装ntpdate 命令包
yum -y install ntp



http://coolnull.com/2735.html

查看更多...

分类:Linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 0

Linux 基本命令之文件与目录操作

1. cp  file1 file2 file3 /log 等于 cp file[1-3] /log

2. 符号连接 ln

3. rmdir 删除目录

4. chgrp 修改文件所在组  chgrp -v users log.txt

查看更多...

Tags: linux 目录 文件 命令

分类:Linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 62

iptables

iptables -A INPUT -p tcp --dport 6379 -j ACCEPT

关闭 chkconfig SuSEfirewall2_setup off

查看更多...

分类:Linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 15

LinuxDevice eth0 does not seem to be pres

在VMware里克隆出来的CentOS Linux。。



vmlite虚拟机启动出错,就把这个虚拟机删除掉重新建立,系统虚拟硬盘使用之前的,启动系统后不能上网,通过ifconfig查看网卡没启动,遂启动网卡服务,但是出错,就是:device eth0 does not seem to be present, delaying initialization,然后想到是不是ifcfg-eth0的配置文件里保存了以前的MAC地址,就把这一行删除掉在重启网卡,还是一样的错误,随后网上查了下资料,把/etc/udev/rules.d/70-persistent-net.rules 删除后重启机器就可以了,因为这个文件绑定了网卡和mac地址,所以换了网卡以后MAC地址变了,所以不能正常启动,也可以直接编辑这个配置文件把里面的网卡和mac地址修改乘对应的,不过这样多麻烦,直接删除重启,它会自动生成个。

1、
vi /etc/sysconfig/network-scripts/ifcfg-eth0
ifcfg-eth0的配置文件里保存了以前的MAC地址,就把这一行删除掉在重启网卡

2、
/etc/udev/rules.d/70-persistent-net.rules 删除后重启机器
因为这个文件绑定了网卡和mac地址,所以换了网卡以后MAC地址变了,所以不能正常启动,也可以直接编辑这个配置文件把里面的网卡和mac地址修改乘对应的,不过这样多麻烦,直接删除重启,它会自动生成个。



ifconfig...没有看到eth0.。然后重启网卡又报下面错误。

故障现象:

service network restart
Shutting down loopback insterface:                                                                                                     [  OK  ]
Bringing up loopback insterface:                                                                                                          [  OK  ]
Bringing up interface eth0:  Device eth0 does not seem to be present,delaying initialization.                    [FAILED]

CentOS Linux解决Device eth0 does not seem to be present

解决办法:

首先,打开/etc/udev/rules.d/70-persistent-net.rules内容如下面例子所示:

# vi /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:8f:89:9
7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:50:bd:1
7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

记录下,eth1网卡的mac地址00:0c:29:50:bd:17

接下来,打开/etc/sysconfig/network-scripts/ifcfg-eth0

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

将 DEVICE="eth0"  改成  DEVICE="eth1"  ,
将 HWADDR="00:0c:29:8f:89:97" 改成上面的mac地址  HWADDR="00:0c:29:50:bd:17"

最后,重启网络

# service network restart
或者

# /etc/init.d/network restart

查看更多...

Tags: linux eth0

分类:Linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 45

Linux 查看文件句柄

lsof -n|awk '{print $2}'|sort|uniq -c|sort -nr|more

查看更多...

Tags: 句柄 Llinux

分类:Linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 9

apache 虚拟主机配置2

<VirtualHost *:8081>
    ProxyPreserveHost On
    ServerName lt3g.chainbuy.cn
    RewriteEngine On
    RewriteRule  ^/rudd-web(.*) http://132.35.76.52:9081/rudd-web$1 [P,L]

    RewriteRule ^/(.*) http://esales.10010.com/$1 [P,L]
    ProxyPassReverseCookieDomain 10010.com lt3g.chainbuy.cn
    ProxyPassReverseCookiePath / /
  <Location ~ "^(?!\/Js\/(datepicker|time)\/)">
      ProxyHTMLEnable On
       ProxyHTMLExtended On
       ProxyHTMLMeta On
       ProxyHTMLDoctype XHTML Legacy
       ProxyHTMLURLMap http://132.35.76.52:9081 http://lt3g.chainbuy.cn:8081 e
       RequestHeader    unset  Accept-Encoding
   </Location>
  ErrorLog "|/home/tztrans/apache2x/bin/rotatelogs /home/tztrans/apache2x/logs/10010.com-error_%y-%m-%d.log 86400"
  CustomLog "|/home/tztrans/apache2x/bin/rotatelogs /home/tztrans/apache2x/logs/10010-access_%y-%m-%d.log 86400" common
</VirtualHost>

<VirtualHost *:80>
    ProxyPreserveHost On
    ServerName www.g.com
    RewriteEngine on
    RewriteRule ^/m(.*) http://127.0.0.1:8080/m$1 [L,R=301,P,NC]
    RewriteRule (.*) http://127.0.0.1:8080/$1 [L,R=301,P,NC]
    ErrorLog "d:/dummy-host2.javaen.com-error.log"
    CustomLog "d:/dummy-host2.javaen.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
    ProxyPreserveHost On
    ServerName www.g.com  
    ProxyPass / http://127.0.0.1:8080/a/
    ProxyPassReverse / http://127.0.0.1:8080/a/
    ProxyPassReverseCookieDomain 127.0.0.1:8080/a/ www.g.com
    ProxyPassReverseCookiePath / /
    ErrorLog "d:/dummy-host2.javaen.com-error.log"
    CustomLog "d:/dummy-host2.javaen.com-access.log" common  
</VirtualHost>

<VirtualHost *:80>
    ProxyPreserveHost On
    ServerName www.g.com  
    ProxyPass /manager/ http://127.0.0.1:8080/m/
    ProxyPassReverse /manager/ http://127.0.0.1:8080/m/
    ProxyPassReverseCookieDomain 127.0.0.1:8080/m/ www.g.com
    ProxyPassReverseCookiePath / /manager/
    ErrorLog "d:/dummy-host2.javaen.com-error.log"
    CustomLog "d:/dummy-host2.javaen.com-access.log" common  
</VirtualHost>

<VirtualHost *:80>
    ProxyPreserveHost On
    ServerName lt3g.g.com  
    RewriteEngine on
    RewriteRule  ^/rudd-web(.*) http://132.35.76.52:9081/rudd-web$1 [L,R=301,P,NC]
    RewriteRule ^/(.*) http://esales.10010.com/$1 [L,R=301,P,NC]
    ProxyPassReverseCookieDomain 10010.com lt3g.g.com
    ProxyPassReverseCookiePath / /
    <Location />  
     ProxyHTMLEnable On
     ProxyHTMLMeta On
     ProxyHTMLExtended On
     ProxyHTMLURLMap http://132.35.76.52:9081 http://lt3g.g.com
    </Location>  
    ErrorLog "d:/dummy-host2.javaen.com-error.log"
    CustomLog "d:/dummy-host2.javaen.com-access.log" common  
</VirtualHost>

  <VirtualHost *:8080>
    ProxyPreserveHost On
    ServerName lt3g.chainbuy.net
    RewriteEngine on
    RewriteRule  ^/rudd-web(.*) http://132.35.76.52:9081/rudd-web$1 [L,R=301,P,NC]
    RewriteRule ^/(.*) http://esales.10010.com/$1 [L,R=301,P,NC]
    ProxyPassReverseCookieDomain 10010.com lt3g.chainbuy.net
    ProxyPassReverseCookiePath / /
    <Location />
       ProxyHTMLEnable On
       ProxyHTMLExtended On
       ProxyHTMLURLMap http://132.35.76.52:9081 http://lt3g.chainbuy.net:8080
RequestHeader    unset  Accept-Encoding
</Location>
    ErrorLog "|/home/tzweb/apache2-http-2.4.3/bin/rotatelogs /home/tzweb/apache2-http-2.4.3/logs/lt3g.chainbuy.net-error_%y-%m-%d.log 86400"
    CustomLog "|/home/tzweb/apache2-http-2.4.3/bin/rotatelogs /home/tzweb/apache2-http-2.4.3/logs/lt3g.chainbuy.net-access_%y-%m-%d.log 86400" common
</VirtualHost>

<VirtualHost *:8081>
    ProxyPreserveHost On
    ServerName lt3g.chainbuy.cn
    RewriteEngine On
    RewriteRule  ^/rudd-web(.*) http://132.35.76.52:9081/rudd-web$1 [P,L]

    RewriteRule ^/(.*) http://esales.10010.com/$1 [P,L]
    ProxyPassReverseCookieDomain 10010.com lt3g.chainbuy.cn
    ProxyPassReverseCookiePath / /
  <Location ~ "^(?!\/Js\/(datepicker|time)\/)">
      ProxyHTMLEnable On
       ProxyHTMLExtended On
       ProxyHTMLMeta On
       ProxyHTMLDoctype XHTML Legacy
       ProxyHTMLURLMap http://132.35.76.52:9081 http://lt3g.chainbuy.cn:8081 e
       RequestHeader    unset  Accept-Encoding
   </Location>
  ErrorLog "|/home/tztrans/apache2x/bin/rotatelogs /home/tztrans/apache2x/logs/10010.com-error_%y-%m-%d.log 86400"
  CustomLog "|/home/tztrans/apache2x/bin/rotatelogs /home/tztrans/apache2x/logs/10010-access_%y-%m-%d.log 86400" common
</VirtualHost>


http://xinkang120.blog.163.com/blog/static/1946682232012118111458471/
http://www.blogjava.net/libin2722/articles/344405.html

查看更多...

Tags: apache Tomcat

分类:Linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 69

Linux学习过程

掌握至少50个以上的常用命令
理解shell管道"|",文件流重定向">"及追加">>"等
熟悉Gnome/KDE等X-windows桌面环境操作
掌握.tgz.rpm.biz等软件包的常用安装方法
学习添加外设,安装设备驱动程序(比如modem)

查看更多...

分类:Linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 17

Linux 查看端口占用

netstat -anp |grep 9111

ps -ef | grep java

kill -9 27063

查看更多...

Tags: 占用 java Tomcat 80 8088 netstat

分类:Linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 21

SSH客户端软件,SecureCRT 7.0.1 发布

Secure CRT 是一款SSH客户端软件,通过使用内含的VCP命令行程序可以进行加密文件的传输。SecureCRT 7.0.1 发布,这是一个小的维护版本,改进记录:

http://news.open-open.com/news/uploadImg/20120830/20120830081906_732.gif

The xterm set title escape sequence ending with \033\\ is supported in addition to \007. Various bugfixes.

查看更多...

分类:Linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 18

Linux 系统指令集

一. 系统管理指令
  1. free 指令 显示内存信息
     free -t 显示总内存
     free -m 兆 - k -b
     free -v 版本

查看更多...

分类:Linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 58