标签归档:slackware

[原] Slackware忘记root密码的解决

除了用光盘外,如果使用LILO(默认)作引导,还有如下办法:
出现LILO选择画面时,输入:“Linux init=/bin/bash rw”
开头的”Linux”对应LILO里的label(名称)
引导后出现如下的提示符:
bash-3.00#
运行passwd命令输入新密码即可

有人问这不是很不安全吗?Faint啊,人家都到机器旁边了,要硬盘有硬盘…

[原] 解决 libXp.so.6 找不到的问题

error while loading shared libraries: libXp.so.6: cannot open shared object file: No such file or directory.

俺英文写得超级烂了,随便看看吧。一般服务器上都不装X环境的,不过有些变态的程序却要用到X环境的组件:比如java写的Tidy,oracle的安装程序。一般遇到这种情况,偷懒的人都直接rpm或apt-get到libXp.so.6来装。不过我喜欢什么都在自己的掌握中,不喜欢装到哪都不知道的感觉(Slackware甚至不支持rpm,我太欣赏了)。其实libXp.so.6只是XFree86的一个很小的库,根本没必要装整个X。自己动手,乐趣多多的解决办法:
lynx http://ftp.xfree86.org/pub/XFree86/
1)到 http://ftp.xfree86.org/pub/XFree86/,找到最新版本点进去,现在是4.7.0。
2)如果对自己系统不熟悉,可以先下个Xinstall.sh。然后运行 sh Xinstall.sh -check
他会告诉你下哪个编译好的版本适合你的系统。我的是”Linux-ix86-glibc24″。
然后点binaries进去,不研究源码,只是拿来用,就下预编译的好了。接着点“Linux-ix86-glibc24”。
3)这有很多tar,注意:你只要下Xbin.tgz就够了(现在是6.6M)
4)tar zxf Xbin.tgz -C /usr/X11
5)vi /etc/ld.so.conf,加入/usr/X11/lib
6)ldconfig
完毕。

Usually we don’t install X-Window on a Server, unfortunatelly some programs maybe use lib of XFree86, like oracle-installer, java-Tidy, etc. Some guys may use rpm or apt-get to fetch libXp.so.6, but I don’t like that. So lets do it:
1) lynx http://ftp.xfree86.org/pub/XFree86/ , choose lastest version, (now is 4.7.0)
2) if you don’t know much about your system(glibc, arch…), you can download “Xinstall.sh”, and
run “sh Xinstall.sh -check”. It will tell which binary-version you should choose, such as “Linux-ix86-glibc24”
3) ok, click binaries -> Linux-ix86-glibc24, now URL is : http://ftp.xfree86.org/pub/XFree86/4.7.0/binaries/Linux-ix86-glibc24/
You only need download Xbin.tgz (now only 6.6M)
4) tar zxf Xbin.tgz -C /usr/X11
5) vi /etc/ld.so.conf, add “/usr/X11/lib”
6) ldconfig

[原] PHP bug or Slackware bug? –enable-fastcgi always failed.

On Slackware 12.0, compile php to fastcgi alwayes failed, only get CGI:

so use spawn-fcgi (lighttpd) always get exit.

OH MY GOD…. I tried from php 4.3.0 – php 5.2.0, only php 4.4.4 can get fastcgi:

why??????????????????????

[原] slackware 12.0 编译内核

make menuconfig 遇到错误:

In file included from scripts/lxdialog/checklist.c:24:
scripts/lxdialog/dialog.h:32:20: curses.h: No such file or directory
In file included from scripts/lxdialog/checklist.c:24:
scripts/lxdialog/dialog.h:130: error: syntax error before “use_colors”
scripts/lxdialog/dialog.h:130: warning: type defaults to int' in declaration of use_colors’
scripts/lxdialog/dialog.h:130: warning: data definition has no type or storage class
scripts/lxdialog/dialog.h:131: error: syntax error before “use_shadow”
scripts/lxdialog/dialog.h:131: warning: type defaults to int' in declaration of use_shadow’
scripts/lxdialog/dialog.h:131: warning: data definition has no type or storage class
scripts/lxdialog/dialog.h:133: error: syntax error before “attributes”
scripts/lxdialog/dialog.h:133: warning: type defaults to int' in declaration of attributes’
scripts/lxdialog/dialog.h:133: warning: data definition has no type or storage class
scripts/lxdialog/dialog.h:146: error: syntax error before ‘*’ token
scripts/lxdialog/dialog.h:146: warning: function declaration isn’t a prototype
scripts/lxdialog/dialog.h:149: error: syntax error before ‘*’ token
scripts/lxdialog/dialog.h:149: warning: function declaration isn’t a prototype
scripts/lxdialog/dialog.h:150: error: syntax error before ‘*’ token
scripts/lxdialog/dialog.h:150: warning: function declaration isn’t a prototype
scripts/lxdialog/dialog.h:151: error: syntax error before ‘*’ token
scripts/lxdialog/dialog.h:152: warning: function declaration isn’t a prototype
scripts/lxdialog/dialog.h:153: error: syntax error before ‘*’ token
scripts/lxdialog/dialog.h:153: warning: function declaration isn’t a prototype
scripts/lxdialog/checklist.c:32: error: syntax error before ‘*’ token
scripts/lxdialog/checklist.c:34: warning: function declaration isn’t a prototype
scripts/lxdialog/checklist.c: In function print_item':
scripts/lxdialog/checklist.c:38: warning: implicit declaration of function
wattrset’
scripts/lxdialog/checklist.c:38: error: win' undeclared (first use in this function)
scripts/lxdialog/checklist.c:38: error: (Each undeclared identifier is reported only once
scripts/lxdialog/checklist.c:38: error: for each function it appears in.)
scripts/lxdialog/checklist.c:39: warning: implicit declaration of function
wmove’
scripts/lxdialog/checklist.c:39: error: choice' undeclared (first use in this function)
scripts/lxdialog/checklist.c:41: warning: implicit declaration of function
waddch’
……

解决:
安装的时候少了一个包, 找到光盘里的 /slackware/l/ncruses-5.6-i486-2.tgz
# installpkg ncruses-5.6-i486-2.tgz
即可

[原] Intel平台gcc4,gcc3,icc测试

[from zhch begin]
以一个简单的计算程序为例:

这是一个常见的算Pi的程序,基本算法是Pi/4=1-1/3+1/5-1/7+…..
[from zhch end]

Slackware 12.0预装了gcc 4.1.2,我手动装了gcc 3.4.6,和icc 10.0。下面是测试结果:

果然跟一些文章说的,gcc4比gcc3编译结果和运算速度都有所下降,icc在Intel平台下确实优化比较明显,毕竟是自己家的东西。

[原]第一次完整地编译了Linux内核

啊,太痛苦了,从下午一直编译到凌晨,终于每个选项都搞清楚了是干嘛的。用的是最新的2.6.22.6内核。
slackware 12.0太好玩了,装好后有几个cpu就会在屏幕上方显示几个LOGO企鹅。一排八个真壮观。。。。

推荐这个文章: http://lamp.linux.gov.cn/Linux/kernel_options.html

共计遇到的主要问题如下:
1)LILO 不能装到MBR,好像做了raid的都不能写MBR。手动写lilo.conf可以解决。(从安装盘引导,mount /dev/cciss/盘 /d1,chroot /d1,然后就可以改 /etc/lilo.conf了,改完直接lilo)
2)make menuconfig报错。类似:
scripts/lxdialog/dialog.h:127: syntax error before “use_colors”
scripts/lxdialog/dialog.h:127: warning: type defaults to int' in declaration of use_colors’
scripts/lxdialog/dialog.h:127: warning: data definition has no type or storage class
scripts/lxdialog/dialog.h:128: syntax error before “use_shadow”
scripts/lxdialog/dialog.h:128: warning: type defaults to int' in declaration of use_shadow’
scripts/lxdialog/dialog.h:128: warning: data definition has no type or storage class
scripts/lxdialog/dialog.h:130: syntax error before “attributes”
原因是setup装系统的时候有make menuconfig要用到的开发语言和库没有安装进去。重新安装就可以了。网上其他发行版说的需要手动安装libncurses-dev,在Slackware 12.0并不需要,系统应该自带了。

3)网络不通。检查是驱动选错了。(lspci得到的结果不能全相信,仅供参考!我最后是从安装盘里的默认系统开机自检画面里面发现真实网卡驱动的)
4)VFS: cannot open root device。
可能的原因:A)尽管硬盘全都是SCSI,常规IDE里”INCLUDE IDE/ATA disk Support”这个还是得选上。否则就打不开根设备。。。- -!
B)Enable the block layer(块设备支持,使用硬盘/USB/SCSI设备者必选)-》Support for Large Block Devices(仅在使用大于2TB的块设备时需要)。这个选项我发现必须选上。尽管我只有8*140G,不到2T。但是实际上如果这个选项没有选的话可能起不来。因此我觉得这里是翻译有问题。原文并没有指明是2T。
可能还有其他选项上的问题,可以看看这个网址:http://kerneltrap.org/node/970

期间得到ever的大力帮助,特别感谢。
今天还是嘘嘘生日,真是对不住哦。。。。

[原]nginx在Slackware 11.0下的编译安装

configure就不说了,make的时候提示:
objs/src/event/ngx_event.o(.text+0xdbc): In function ngx_event_init_conf':src/event/ngx_event.c:1140: warning: warning: epoll_create is not implemented and will always fail
objs/src/event/modules/ngx_epoll_module.o(.text+0x1cc): In function
ngx_epoll_add_event’:src/event/modules/ngx_epoll_module.c:250: warning: warning: epoll_ctl is not implemented and will always fail
objs/src/event/modules/ngx_epoll_module.o(.text+0x416): In function `ngx_epoll_process_events’:src/event/modules/ngx_epoll_module.c:402: warning: warning: epoll_wait is not implemented and will always fail

epoll是高性能网络io,居然不被系统支持,我明明用的是2.6.17的内核。于是make menuconfig,到 General setup / Configure standard kernel features 发现’Enable event poll’ 是关闭的,于是启用。

然后重新编译内核:

话说,Slackware 12.0都出来几个月了,改天我要去装一下。^_^

[转]Slackware 11.0 release

网站上好像还没有及时更新,ftp上已经release了:
ftp://ftp.slackware.com/pub/slackware/slackware-current/ANNOUNCE.11_0

Announcing Slackware Linux 11!

The only Slackware release more than a year in the making, this
edition of Slackware combines Slackware’s legendary simplicity,
stability, and security with some of the latest advances in Linux
technology. Expect no less than the best Slackware yet.

Among the many program updates and distribution enhancements, you’ll
find two of the most advanced desktop environments available today:
Xfce 4.2.3.2, a fast and lightweight but visually appealing and easy
to use desktop environment, and KDE 3.5.4, the latest version of the
award-winning K Desktop Environment.
继续阅读