存档

‘Linux技术’ 分类的存档

解决Ubuntu 11.04无线网卡驱动导致无法找到无线网络

2011年10月11日 没有评论

解决Ubuntu 11.04无线网卡驱动导致无法找到无线网络,是最近准备适应下11.10,所以才安装来11.04,不过这种问题也有可能继续延续至11.10,因为官方并没有收到关于此问题都bug报告。

主要是由于驱动都问题,首先要把 附加驱动 里面的 Broadcon STA 无线驱动 移除,然后查看自己网卡驱动型号,可用命令:sudo lshw ,列出PC所有硬件型号,找到network相关的可以查看到本机的网卡型号是:BCM4311 802.11b/g WLAN ,出现此问题的大多为此网卡,甚至可直接安装解决。

不过需要您先直连有线网络安装驱动,:sudo apt-get install firmware-b43-installer

安装完成后,重启,就会发现多出来的无线网,能找到无线网,也能连接。

标签:, ,

ecshop2.7.2最新版的nginx伪静态rewrite重写规则适用于lnmp

2011年10月4日 没有评论

ecshop2.7.2最新版的nginx伪静态rewrite重写规则适用于lnmp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
if (!-e $request_filename)
    {
    rewrite ^/index.html$ /index.php last;
    rewrite ^/category$ /index.php last;
    rewrite ^/feed-c([0-9]+).xml$ /feed.php?cat=$1 last;
    rewrite ^/feed-b([0-9]+).xml$ /feed.php?brand=$1 last;
    rewrite ^/feed-type([^-]+).xml$ /feed.php?type=$1 last;
    rewrite ^/feed.xml$ /feed.php last;
    rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last;
    rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*).html$ /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last;
    rewrite ^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last;
    rewrite ^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*).html$ /category.php?id=$1&brand=$2&page=$3 last;
    rewrite ^/category-([0-9]+)-b([0-9]+)(.*).html$ /category.php?id=$1&brand=$2 last;
    rewrite ^/category-([0-9]+)(.*).html$ /category.php?id=$1 last;
    rewrite ^/goods-([0-9]+)(.*).html$ /goods.php?id=$1 last;
    rewrite ^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last;
    rewrite ^/article_cat-([0-9]+)-([0-9]+)-(.+)(.*).html$ /article_cat.php?id=$1&page=$2&keywords=$3 last;
    rewrite ^/article_cat-([0-9]+)-([0-9]+)(.*).html$ /article_cat.php?id=$1&page=$2 last;
    rewrite ^/article_cat-([0-9]+)(.*).html$ /article_cat.php?id=$1 last;
    rewrite ^/article-([0-9]+)(.*).html$ /article.php?id=$1 last;
    rewrite ^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+).html /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last;
    rewrite ^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*).html /brand.php?id=$1&cat=$2&page=$3 last;
    rewrite ^/brand-([0-9]+)-c([0-9]+)(.*).html /brand.php?id=$1&cat=$2 last;
    rewrite ^/brand-([0-9]+)(.*).html /brand.php?id=$1 last;
    rewrite ^/tag-(.*).html /search.php?keywords=$1 last;
    rewrite ^/snatch-([0-9]+).html$ /snatch.php?id=$1 last;
    rewrite ^/group_buy-([0-9]+).html$ /group_buy.php?act=view&id=$1 last;
    rewrite ^/auction-([0-9]+).html$ /auction.php?act=view&id=$1 last;
    rewrite ^/exchange-id([0-9]+)(.*).html$ /exchange.php?id=$1&act=view last;
    rewrite ^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last;
    rewrite ^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last;
    rewrite ^/exchange-([0-9]+)-([0-9]+)(.*).html$ /exchange.php?cat_id=$1&page=$2 last;
    rewrite ^/exchange-([0-9]+)(.*).html$ /exchange.php?cat_id=$1 last;
    }

 

标签:, , , ,

CentOS 5.6 修改国内网易163高速源

2011年5月28日 没有评论

 

CentOS 5.6 修改国内网易163高速源

cd /etc/yum.repos.d/
cp CentOS-Base.repo CentOS-Base.repo.bak
vi CentOS-Base.repo

粘贴如下内容

# CentOS-Base.repo

#

# The mirror system uses the connecting IP address of the client and the

# update status of each mirror to pick mirrors that are updated to and

# geographically close to the client.  You should use this for CentOS updates

# unless you are manually picking other mirrors.

#

# If the mirrorlist= does not work for you, as a fall back you can try the 

# remarked out baseurl= line instead.

#

#

 

[base]

name=CentOS-5.6 – Base – 163.com

baseurl=http://mirrors.163.com/centos/5.6/os/i386/

#mirrorlist=http://mirrorlist.centos.org/?release=5.6&arch=i386&repo=os

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/5.6/os/i386/RPM-GPG-KEY-CentOS-5

 

#released updates 

[updates]

name=CentOS-5.6 – Updates – 163.com

baseurl=http://mirrors.163.com/centos/5.6/updates/i386/

#mirrorlist=http://mirrorlist.centos.org/?release=5.6&arch=i386&repo=updates

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/5.6/os/i386/RPM-GPG-KEY-CentOS-5

 

#packages used/produced in the build but not released

[addons]

name=CentOS-5.6 – Addons – 163.com

baseurl=http://mirrors.163.com/centos/5.6/addons/i386/

#mirrorlist=http://mirrorlist.centos.org/?release=5.6&arch=i386&repo=addons

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/5.6/os/i386/RPM-GPG-KEY-CentOS-5

 

#additional packages that may be useful

[extras]

name=CentOS-5.6 – Extras – 163.com

baseurl=http://mirrors.163.com/centos/5.6/extras/i386/

#mirrorlist=http://mirrorlist.centos.org/?release=5.6&arch=i386&repo=extras

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/5.6/os/i386/RPM-GPG-KEY-CentOS-5

 

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-5.6 – Plus – 163.com

baseurl=http://mirrors.163.com/centos/5.6/centosplus/i386/

#mirrorlist=http://mirrorlist.centos.org/?release=5.6&arch=i386&repo=centosplus

gpgcheck=1

enabled=0

gpgkey=http://mirrors.163.com/centos/5.6/os/i386/RPM-GPG-KEY-CentOS-5

 

#contrib – packages by Centos Users

[contrib]

name=CentOS-5.6 – Contrib – 163.com

baseurl=http://mirrors.163.com/centos/5.6/contrib/i386/

#mirrorlist=http://mirrorlist.centos.org/?release=5.6&arch=i386&repo=contrib

gpgcheck=1

enabled=0

gpgkey=http://mirrors.163.com/centos/5.6/os/i386/RPM-GPG-KEY-CentOS-5

标签:, , , ,

10 个最酷的 Linux 单行命令

2011年4月9日 没有评论

下面是来自 Commandlinefu 网站由用户投票决出的 10 个最酷的 单行命令,希望对你有用。
【10】sudo !!
以 root 帐户执行上一条命令
【9】python -m SimpleHTTPServer
利用 Python 搭建一个简单的 Web 服务器,可通过 http://$HOSTNAME:8000 访问。
【8】:w !sudo tee %
在 Vim 中无需权限保存编辑的文件。
【7】cd -
更改到上一次访问的目录。
【6】^foo^bar
将上一条命令中的 foo 替换为 bar,并执行。
【5】cp filename{,.bak}
快速备份或复制文件。
【4】mtr google.com
traceroute + ping。
【3】!whatever:p
搜索命令历史,但不执行。
【2】$ssh-copy-id user@host
将 ssh keys 复制到 user@host 以启用无密码 SSH 登录。
【1】ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg
把 Linux 桌面录制为视频。

标签:,
分类: Linux技术 标签: ,

Windows下的Apache+PHP+MySQL绿色环境套件包PHPnow1.5.5发布

2010年2月8日 1 条评论

是 Win32 下绿色的 + + 环境套件包。简易安装、快速搭建支持虚拟主机的 PHP 环境。附带 PnCp.cmd 控制面板,帮助你快速配置你的套件,使用非常方便。
安装 PHPnow 只需解压、初始化,就可得到一个标准的 PHP + MySQL 的服务器环境。然后就可以直接安装 ! 等程序,或者进行 PHP 开发调试。

国内的专业PHP集成环境,在中国农历新年即将到来时候发布,一个更新。这的确让人激动。希望这个让初 学者上手的套件环境不要离们远去。
官方主页:http://www.phpnow.org

最新版本包含:

* 默认没有启用。执行 PnCp.cmd 选 3 启用。

下载:PHPnow-1.5.5

标签:, , , , , , , , , , ,