|
SLACKWARE是一款很优秀的GNU/Linux操作系统,其KISS(Keep It Simple, Stupid)原则使得她在众多Linux发行版中独树一帜,她由Patrick Volkerding定期发布,目前最新稳定版本是SlackWare10.1(2.4.29内核,testing中带有2.6.10内核),可以从一下站点得到:
http://slackware.at/data/slackware-10.1-iso/
http://www.slackware.com/getslack/
http://www.abnormalpenguin.com/slackware-mirrors.php
http://iso.linuxquestions.org/distro.php?distro=1
http://www.tlm-project.org/
其中第一个是从http://www.linuxsir.org/上发现的(速度可以),其他是从http://distrowatch.com得到的。
下面我重点说一下我的详细的(硬盘)安装和配置过程:
每一款GNU/Linux不外乎两种基本安装方式:
[code:1]CD/DVD安装
硬盘安装[/code:1]
CD/DVD安装方式就比较简单了,关键就是硬盘安装,其实我本人更喜欢硬盘安装,就算能刻盘的情况下我会选择硬盘安装,好了,言归正传,下面说下基于windows的硬盘安装。
1,准备
准备一:硬盘分区
为SLACKWARE准备两个分区(可以是主分区,也可以是逻辑分区,但推荐都是主分区),一个是Linux Swap(容量大约为内存的两倍,但一般情况下300M~500M就可以了),格式为Linux Swap;
另一个为SlackWare分区(容量大约1,5G以上),格式为reiserfs。
另外在你的windows中最好准备一个Fat32盘(我没有试过NTFS盘可不可以,当然最好是Fat32盘)
准备二:下载必要的文件
slackware-10.1-install-d1.iso
slackware-10.1-install-d2.iso
grub020p(Grub For Dos)
准备三:放置所需文件
所需文件
[quote=zhy]
Dos Booting Floppy(如果你没有软驱,看这里hiweed)
Grub for dos
bzImage from kernels\bare.i\ of slackware-10.1-install-d1.iso
initrd.img from isolinux\ of slackware-10.1-install-d1.iso
slackware-10.1-install-d1.iso
[slackware-10.1-install-d2.iso][/quote]
*[ ]表示可选
放置如下:
[quote=zhy]
c:\grub020p\
c:\grub.exe(extract from grub020p\)
c:\slkboot\bzImage
c:\slkboot\initrd.img
c:\slack\here are the files extracted from slackware-10.1-install-d1.iso and slackware-10.1-install-d2.iso
[/quote]
其中也可以都放到其他的盘中比如D:\(前面说过这里最好是Fat32盘),也可以分开放置,比如
[quote=zhy]
c:\grub020p\
c:\grub.exe(extract from grub020p\)
c:\slkboot\bzImage
c:\slkboot\initrd.img
d:\slack\here are the files extracted from slackware-10.1-install-d1.iso and slackware-10.1-install-d2.iso
[/quote]
2,安装
准备就绪后,就可以进行安装了,首先重启系统,设置Bios为软盘启动,把DOS启动盘放入软驱(如果没有软驱的参照hiweedhttp://linux.hiweed.com/node/91,而且必须是纯DOS环境),然后进行如下操作:
[code:1]
A:\C:
C:\grub.exe
......
grub>kernel (hd0,0)/slkboot/bzImage root=/dev/hda1
......
grub>initrd (hd0,0)/slkboot/initrd.img
......
grub>boot
......[/code:1]
然后提示以root身份登录,接着输入setup进行安装,安装过程参照这里:
zzj666
安装过程中必须确认安装lilo安装到MBR以引导windows和linux双系统。
3,配置
安装过程相对简单,对新手来说,接下来的配置就比较头疼了。
首先重启以root登录后,新建一个组和一个普通用户:
[code:1]#groupadd zhy
#cd /home
#mkdir zhyfly
#chmod 644 zhyfly
#useradd -g zhy -p ****** -s /bin/bash zhyfly
[/code:1]
用sudo使该普通用户拥有root权限(我自己的喜好便于操作,另外确保安装过程选择了sudo)
[code:1]
#visudo
[/code:1]
在打开文件中添加 [code:1]zhyfly ALL=NOPASSWD:ALL[/code:1]
配置 /etc/ files:
/etc/fstab
[code:1]
/dev/hda4 swap swap defaults 0 0
/dev/hda3 / reiserfs defaults 1 1
/dev/hda1 /mnt/fatc vfat defaults,rw,users,dmask=000,fmask=0111,umask=000,codepage=936,iocharset=cp936 1 0
/dev/hda5 /mnt/fatd vfat defaults,rw,users,dmask=000,fmask=0111,umask=000,codepage=936,iocharset=cp936 1 0
/dev/hda6 /mnt/nte ntfs rw,users,umask=000,nls=cp936 1 0
/dev/hda7 /mnt/ntf ntfs rw,users,umask=000,nls=cp936 1 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
[/code:1]
/etc/profile.d/lang.sh
在 "export LANG=en_US"该句后添加下面两句
[code:1]
export LC_CTYPE=zh.CN
G_BROKEN_FILENAMES=1[/code:1]
配置 ~/.bashrc:
/root/.bashrc
[code:1]# ~/.bashrc: executed by bash(1) for non-login shells.
#export PS1='\h:\w\$ '
export PS1="\[\033[0;31m\][\u]:\[\033[0;31m\][\w]\[\033[0m\] "
umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
[/code:1]
/home/zhyfly/.bashrc
[code:1]# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If running interactively, then:
if [ "$PS1" ]; then
# don't put duplicate lines in the history. See bash(1) for more options
# export HISTCONTROL=ignoredups
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
#shopt -s checkwinsize
# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
eval `dircolors -b`
alias ls='ls --color=auto'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
fi
# some more ls aliases
alias ll='ls -l'
alias la='ls -A'
alias l='ls -CF'
# set a fancy prompt
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
# PS1="\[\033[1m\][\w]\[\033[0m\] "
#export PS1="\u: \w\\$ "
# If this is an xterm set the title to user@host:dir
case $TERM in
xterm*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
;;
*)
;;
esac
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc).
#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi
fi
export PATH="/usr/bin:/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/X11R6/bin:/opt/java/jre/bin"
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PS1="[\u@\h \\W]\\$"
export LANG=en_US
export LC_CTYPE="zh_CN"
export GTK_IM_MODULE=xim
export XMODIFIERS="@im=fcitx"
fcitx &>/dev/null
#alias ls="ls --color"
alias reboot="sudo reboot"
alias halt="sudo halt"
alias vim="sudo vim"
[/code:1]
现在可以启动X了:
[code:1]startx[/code:1]
配置xorg:
[code:1][zhyfly@zhy2fly ~]$xorgconig[/code:1]
select the approtiate option according to your own Hardware of your PC.
(including keyboard, mouse, monitor, video card, etc.)
然后手动修改/etc/X11/xorg.conf以使得你的滚轮鼠标正常使用:
修改[code:1]Option "Protocol" "PS/2"[/code:1] 为 [code:1]Option "Protocol" "IMPS/2"[/code:1]
并添加下面一句[code:1]Option "ZAxisMapping" "4 5"[/code:1]
安装字体见attachment.
[code:1]installpkg fontconfig-2.2.1-i486-1.Firefly.tgz[/code:1]
最后Ctrl+Alt+Backspace重启X,你就会看到英文界面,中文显示了^_^
当然到这里应该一切都正常了,但是我的fcitx就是用不了,可以出现fcitx的对话框,但是“拼音”显示为灰色,不可用,因为我想使用英文界面,中文输入,所以不想把LANG改成zh_CN,于是我本打算先升级内核,再解决fcitx的问题,这样我就到http://slackware.at/data/slackwa ... es/linux-2.6.11.11/
下载了slackware提供的最新内核:
[code:1]
README.initrd
kernel-generic-2.6.11.11-i486-1.tgz
kernel-modules-2.6.11.11-i486-1.tgz
kernel-source-2.6.11.11-noarch-1.tgz
alsa-driver-1.0.9b_2.6.11.11-i486-1.tgz
kernel-headers-2.6.11.11-i386-1.tgz
kernel-headers.WARNING[/code:1]
安装前先看README.initrd和kernel-headers.WARNING这两个文件,下面是我的安装步骤(也可以参阅这里http://distrowatch.com/weekly.php?issue=20040628#1):
[code:1]
[zhyfly@zhy2fly linux2611]$sudo installpkg kernel-generic-2.6.11.11-i486-1.tgz
......
[zhyfly@zhy2fly linux2611]$sudo installpkg kernel-modules-2.6.11.11-i486-1.tgz
......
[zhyfly@zhy2fly linux2611]$cd /boot
[zhyfly@zhy2fly boot]$sudo mkinitrd -c -k 2.6.11.11 -m reiserfs
[zhyfly@zhy2fly boot]$
[/code:1]
修改/etc/lilo.conf
[code:1]
......
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-2.6.11.11
initrd = /boot/initrd.gz
root = /dev/hda3
label = SLK261111
read-only
image = /boot/vmlinuz
root = /dev/hda3
label = SLK2429
read-only
# Linux bootable partition config ends
# Windows bootable partition config begins
other = /dev/hda1
label = Windows
table = /dev/hda
# Windows bootable partition config ends
[/code:1]
最后执行命令:
[code:1][zhyfly@zhy2fly etc]$sudo lilo
Added SLK261111 *
Added SLK2429
Added Windows
[zhyfly@zhy2fly etc][/code:1]
重启后,惊奇的发现fcitx可以用了,这些字就是在linux下打出来的呵呵
而且装完后xmms等都可以正常显示中文,这还是我用linux以来第一次呢,并且我的X也是头一次感觉比windows的强多了…… |
|