fedora16通过命令行配置无线,并开机自动连接

装在上网本上用来折腾的一个fedora 13系统,没有图形界面,但还是花了整整一夜加半天时间从13升级到16,已经是最新的版本了;并把自动连接无线的命令写到一个脚本文件里,开机自动运行。

以前一直不能通过命令行启用无线,后来才发现是因为NetworkManager服务的原因,禁止该服务后可以通过命令行配置无线正常连网。最好把rpm -e NetworkManager 卸载掉这个NM包,以免它的干扰。

无线使用最简单的wep加密,在路由器上限制了允许mac地址,因此无线安全不是大问题。

无线配置命令非常简单
iwconfig wlan0 essid "[无线AP名称]" key s:[无线密码]
ifconfig wlan up
dhclient wlan0

将写入一个文件,保存为/root/script/start-wlan.sh,也可以保存到其它目录里。

在文件/etc/rc.d/rc.local 里加入一行

.  /root/script/start-wlan.sh

即可

 

fedora linux下php调试利器xdebug 2.1.0下载/fedora13,14测试通过

核心内容:

笔者曾写过一篇fedora linux apache/php下安装配置xdebug,记录了fedora13下安装xdebug 2.1.0的过程。当时在编译的二进制.so模块可以直接在fedora14下使用,如不想自己编译、且信得过笔者的同学们,请直接下载本文件,或者参考上文自行编译:

下载安装文件xdebug-module-linux-fedora13-14

安装方法:

1. 复制文件xdebug.so/usr/lib/php/modules/

2. 复制文件xdebug.ini/etc/php.d/

3. 重启apache

___________以下是个人安装过程,仅供参考________________

笔者曾写过一篇

fedora linux apache/php下安装配置xdebug

当时是在fedora13下参考xdebug官方的说明文档自行编译,然后把编译过程记下来的。现在fedora14已经发布几个月,当然是覆盖安装了。今天需要写个小东西,php自带的调试消息实在比较简陋,于是想起安装个xdebug,首先想到的yum里找不到,于上网上搜索怎么yum安装,结果发现打开的是这篇自己几个月前写的文章。

难道又要重新编译吗?太没效率了!

于是想是否不用重新编译、而是直接使用以前编译的.so模块呢?试试,不行再编译。

参看文章中之前的记录,还要安装两个工具:phpize与php-config,从它们文件名看,应该是编译过程上用的,现在不用编译,不安装试试。

安装过程:把编译目录里./moduls/xdebug.so复制到/usr/lib/php/modules/, 再写入xdebug配置信息上到文件/etc/php.d/xdebug.ini

[root@fsc prx]# echo 'zend_extension=/usr/lib/php/modules/xdebug.so
> [Xdebug]
> xdebug.profiler_enable=on
> /etc/php.d/xdebug.ini' >/etc/php.d/xdebug.ini

重启apache,结果没有html格式的php消息。运行<?php phpinof();?> 发现xdebug是成功加载了,经验判断是没有打开php的html格式错误显示所致。看之前写文章里,有这一点 的,只是写在后面,看来这篇文章的“读者体验”(从“用户体验”生造来的词~~)不怎么好,连自己看都感觉到不方便! 有必要修改一下。

运行下面代码,把html_errors打开。

[root@fsc prx]# echo 'html_errors=on'>>/etc/php.d/xdebug.ini

再次重启apache,完成。

抓个图来纪念一下:

fedora 14 Linux Kernel 2.6.35 下编译VMware workstation 7内核模块

新的Linux内核会导致VMware workstation重新编译部分组件,以保证调用正确的内核模块或函数接口,也即VMware workstation是部分依赖于内核的。如果内核版本过新,有可能会因VMware尚未为该版本开发出对应组件而导致workstation、 vmplayer等产品无法运行。

解决参考了Pario TechnoBlob的一篇帖子,脚本代码由Sputnick-Area(这里)获取。脚本为workstation 7.1.1编写,同时使用于workstation 7.1.1/2和随带的vmplayer 3.1.1/2。

解决步骤:

1. 下载并执行脚本:
cd /tmp
wget http://www.sputnick-area.net/scripts/vmware7.1.1-patch-kernel-2.6.35.bash
sudo chmod +x vmware7.1.1-patch-kernel-2.6.35.bash
sudo ./vmware7.1.1-patch-kernel-2.6.35.bash

2. 脚本执行完毕后会给出提示,要求执行如下命令。注意以超级用户身份执行:
vmware-modconfig --console --install-all

3.正常情况下执行过就可以了

参考 http://hi.baidu.com/thinkdifferent/blog/item/f6ec810a0da5bb31b1351d9d.html

fedora 12,13,14,15,16/centOS/redhat EL 使用第三方yum 源rpmfusion.org

以下内容来源于rpmfusion.org官方网站的使用说明

通过命令行注册并启用rpmfusion.org yum 源/Command Line Setup using rpm

To enable access to both the free and the nonfree repository use the following command:

  • Fedora 12 and 13 and 14 and 15:
    su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'
  • Fedora Rawhide and what will become Fedora 16 (Alpha, Beta and snapshots):
    su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm'
  • RHEL5 or compatible like CentOS:
    su -c 'rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/5/i386/rpmfusion-free-release-5-0.1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/testing/5/i386/rpmfusion-nonfree-release-5-0.1.noarch.rpm'

官方网站的说明上好像还有使用浏览器安装rpm源的,没有试过,还是习惯使用命令行操作,毕竟命令行才是根本。

http://rpmfusion.org/Configuration

rpmfusion.org yum 源简介

RPM Fusion 是为 Fedora 及 Red Hat Enterprise Linux 用户提供的一个软件包仓库。各位 Fedora/RHEL /centOS朋友要是想要安装的软件在官方的仓库中找不到,不要泄气,兴许通过 RPM Fusion 你就找到了。

新启动的 RPM Fusion 合并了原有的 Dribble、Freshrpms、Livna 等软件包仓库,将成为最大的第三方软件包仓库。

通过 RPM Fusion 软件包仓库,你将找到 ATI/NVIDIA 显卡驱动、私有的音频/视频编码/解码器、游戏、模拟器、以及其他软件包等。

fedora/linux升级firefox/fedora13安装新版本firefox

fedora官方的firefox的rpm/yum安装包更新非常慢,远远滞后于firefox的升级步骤。拿目前(2010-08-29)的版本来看,firefox最新版本是3.6.8,但yum上,版本只更新到了3.6.3.

虽然firefox的最近几个子版本号更新并没太大的改动,使用上没有感觉到有什么不同之处,不过对于“新版本升级爱好者”来说,升级到最新版本心里会感觉顺畅一些。

完美的升级firefox,是一件很麻烦的事情。

从firefox官方下载升级包,解压缩到rpm安装位置/usr/lib/firefox-3.6,如果没有启用selinux,可以正常使用(解压缩到其它目录里也是一样可以正常运行,但这样会有两个版本的firefox,有点洁癖~~);但如果selinux运行,会提示错误:libxul.so无权限。因为对selinux并不熟悉,掏腾一下,没有搞定。

于是找rpm包,http://rpm.pbone.net/这里有rpm包,但没有最新的3.6.8的32位包,于是下载3.6.7的,下载安装,有依赖包libvpx,照例这这个网站下载顺利安装,接下来不有依赖包:xulrunner,下载安装,跟firefox两个包互相依赖,错误信息里提到到版本号还不对,比较可恶。加--force参数,两个包一起安装,还是不行。加上参数--nodeps --force得以安装,运行firefox,正常启动,查看版本号,是3.6.7的版本。完成。

突然想到用rpm -q firefox查看一下版本,发现两个版本的rpm包同时存在,

[root@fsc /]# rpm -q firefox
firefox-3.6.3-4.fc13.i686
firefox-3.6.7-1.fc13.i686

发现了,之前的安装发现这里应该用rpm升级进行的安装。于是需要,卸载老的版本,

[root@fsc /]# rpm -ev firefox-3.6.3-4.fc13.i686

xulrunnerb也是同时存在两个版本的,卸载时,有多个依赖包,太麻烦,不卸载了。 Linux博大精深,还要多多学习啊!

----------------------------------------------------

下面是操作过程中的部分命令记录,作为备忘参考。

[root@fsc /]# rpm -ivh /home/feng/Downloads/libvpx-0.9.1-2.fc13.i686.rpm
Preparing...                ########################################### [100%]
1:libvpx                 ########################################### [100%]
[root@fsc /]# rpm -ivh /home/feng/Downloads/firefox-3.6.7-1.fc13.i686.rpm
error: Failed dependencies:
xulrunner >= 1.9.2.7-1 is needed by firefox-3.6.7-1.fc13.i686
[root@fsc /]# rpm -ivh /home/feng/Downloads/xulrunner-1.9.2.7-2.fc13.i686.rpm
error: Failed dependencies:
xulrunner >= 1.9.2.4 conflicts with firefox-3.6.3-4.fc13.i686
[root@fsc /]# rpm -ivhf /home/feng/Downloads/xulrunner-1.9.2.7-2.fc13.i686.rpm
error: Failed dependencies:
xulrunner >= 1.9.2.4 conflicts with firefox-3.6.3-4.fc13.i686
[root@fsc /]# rpm -ivh --force /home/feng/Downloads/xulrunner-1.9.2.7-2.fc13.i686.rpm
error: Failed dependencies:
xulrunner >= 1.9.2.4 conflicts with firefox-3.6.3-4.fc13.i686
[root@fsc /]# rpm -ivhf /home/feng/Downloads/xulrunner-1.9.2.7-2.fc13.i686.rpm /home/feng/Downloads/firefox-3.6.7-1.fc13.i686.rpm
error: Failed dependencies:
xulrunner >= 1.9.2.4 conflicts with firefox-3.6.3-4.fc13.i686
[root@fsc /]# rpm -ivh /home/feng/Downloads/firefox-3.6.7-1.fc13.i686.rpm error: Failed dependencies:
xulrunner >= 1.9.2.7-1 is needed by firefox-3.6.7-1.fc13.i686
[root@fsc /]# rpm --help|grep force
--force                          short hand for --replacepkgs --replacefiles
(--force on upgrades does this
[root@fsc /]# rpm -ivh --force /home/feng/Downloads/xulrunner-1.9.2.7-2.fc13.i686.rpm /home/feng/Downloads/firefox-3.6.7-1.fc13.i686.rpm
error: Failed dependencies:
xulrunner >= 1.9.2.4 conflicts with firefox-3.6.3-4.fc13.i686
[root@fsc /]# rpm -ivh  /home/feng/Downloads/xulrunner-1.9.2.7-2.fc13.i686.rpm /home/feng/Downloads/firefox-3.6.7-1.fc13.i686.rpm  --nodeps --force
Preparing...                ########################################### [100%]
1:xulrunner              ########################################### [ 50%]
2:firefox                ########################################### [100%]
[root@fsc /]# rpm -q firefox
firefox-3.6.3-4.fc13.i686
firefox-3.6.7-1.fc13.i686
[root@fsc /]# rpm -ev firefox-3.6.3-4.fc13.i686
[root@fsc /]# rpm -q firefox
firefox-3.6.7-1.fc13.i686
[root@fsc /]# rpm -ev xulrunner-1.9.2.3-1.fc13.i686
error: Failed dependencies:
gecko-libs = 1.9.2.3 is needed by (installed) gnome-python2-gtkmozembed-2.25.3-17.fc13.i686
gecko-libs = 1.9.2.3 is needed by (installed) Miro-3.0-1.fc13.i686
xulrunner = 1.9.2.3-1.fc13 is needed by (installed) xulrunner-devel-1.9.2.3-1.fc13.i686

Fedora13,内置博客客户端Blogilo,很强大

恐怕真的没有找不到,只有想不到,前天晚上花一整夜下载fedora13,昨天安装,刚才发现里面有个软件blogilo,博客客户端,试用一下,感觉功能很全面,比firefox插件的客户端强很多,发一篇志之。

不知到windows下有没有这样的客户端,估计会有的,但没有兴趣去找,hh

还没有五笔输入法,自带的拼音输入法,使用已经严重的很不熟练了。[安装好五笔输入法后稍修改]

Enable Root login on Fedora 12/fedora 12 下启用root用户登录X

linux fedora 12 下 root用户通过x界面登录默认是禁用的,网上查询启用方法,google中文里搜索,说是修改/etc/pam.d/gdm文件,注释掉一行就可以,但修改过却还不能登录的,于是在google.com里搜索,看老外们怎么讲查到下面一篇文章,里面说要修改两个文件,

/etc/pam.d/gdm

/etc/pam.d/gdm-password

这样才可以,明确指出不像Ubuntu那样。

原文如下,作者说直接修改root为其它随意的字符串,如test,但或许注释会更好。

http://www.linuxreaders.com/2009/11/19/root-login-on-fedora-12/

Root Login on Fedora is not as easy as Ubuntu Root Login, here you need to modify two files to get root access.

You need to modify content of following files

/etc/pam.d/gdm

/etc/pam.d/gdm-password

You’ll find pam_succeed_if.so user != root quiet in above files, replace root with anything e.g test

I replaced root with test & was able to login to system using root.

OR Comment the entire line.

[Comment the entire line recommend!]