文档

$$$$$$$$$$$$$$$$$$$$$
original boot cmd (in my VMware, others are the same, do remember to copy some!)
------------
root (hd0,0)
kernel /boot/vmlinuz-2.6.10-1-686 root=/dev/sda1 ro
initrd /boot/initrd.img-2.6.10-1-686
savedefault
boot
------------
recover mode
------------
root (hd0,0)
kernel /boot/vmlinuz-2.6.10-1-686 root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.10-1-686
savedefault
boot
$$$$$$$$$$$$$$$$$$$$$

免光软的Debian最简硬盘安装法(BF2.4)

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


不少朋友总是提问不用CD、不用软盘怎么装Debian Linux,这里是我自己的方法,其实很简单,希望能够对大家能够有点帮助。

先下载这些文件:
http://mirror.dlut.edu.cn/debian/dists/Debian3.0r4/main/disks-i386/current/images-1.44/bf2.4/rescue.bin
http://mirror.dlut.edu.cn/debian/dists/Debian3.0r4/main/disks-i386/current/images-1.44/bf2.4/root.bin
http://mirror.dlut.edu.cn/debian/dists/Debian3.0r4/main/disks-i386/current/images-1.44/bf2.4/kernel-config
http://mirror.dlut.edu.cn/debian/dists/Debian3.0r4/main/disks-i386/bf2.4/linux.bin
http://mirror.dlut.edu.cn/debian/dists/Debian3.0r4/main/disks-i386/bf2.4/driver.tgz
if don't use net installation->
http://mirror.dlut.edu.cn/debian/dists/stable/main/disks-i386/base-images-current/basedebs.tar
download this
然后把这些文件按照这样的目录形式摆放好:(假设我们放在c:/debian)
c:/debian/images-1.44/bf2.4/kernel-config
c:/debian/images-1.44/bf2.4/rescue.bin
c:/debian/images-1.44/bf2.4/root.bin
c:/debian/bf2.4/linux.bin
c:/debian/bf2.4/drivers.tgz

grub install debian
root (hd0,0)


grub installer
http://mirror.dlut.edu.cn/debian/dists/unstable/main/installer-i386/current/images/hd-media/2.6/initrd.gz
http://mirror.dlut.edu.cn/debian/dists/unstable/main/installer-i386/current/images/hd-media/2.6/vmlinuz

then go to grub to do
/*grub>root (hd0,0)
remember the follow, just remember this
grub>kernel /vmlinuz root=/dev/hda1
(kernel (hd0,4)/vmlinuz root=/dev/ram randisk_size=40000 devfs=mount,dall)    */

grub>kernel (hd0,4)/vmlinuz root=/dev/ram ramdisk_size=20000 devfs=mount,dall  (因为我把vmlinuz放到/下了,而且我的分区太乱了)
grub>initrd (hd0,4)/initrd.gz
grub>boot
这个安装是必须用iso文件的!damn!!!!!!!
※※※※※(×……
grub>kernel (hd0,4)/debian/bf2.4/linux.bin root=/dev/ram ramdisk_size=20000 devfs=mount,dall
grub>initrd (hd0,4)/debian/images-1.44/bf2.4/root bin
boot ------->>>>>gogogo 居然进去之后没有硬盘的分区了!好像是root=/dev/ram的原因,我应该使用物理硬盘啊
我改了 kernel (hd0,4)/debian/bf2.4/linux.bin root=/dev/sda8 了试试
kernel (hd0,4)/debian/bf2.4/linux.bin root=/dev/hd0 这些都能进到安装的!
×※(×※×)
我准备下loadlin试试了
########
i encounter some problem, i put vmlinuz and initrd.gz in /usr/debian/
but i can't use that, so have to move to /
我不该mv啊,我才发现 ,原来可以kernel (hd0,n)/
n直接tab就出来了,后面的目录也能看到,不应该总是使用root (hd0,0)
这样就可以用到我的vmlinuz了
########












重新hiweed iso,然后在装自己的!
LL 11:00 2005-1-21
reinstallllll and now move above files to /debian/ll/
then reboot->
root (hd0,0)
kernel /debian/ll/bf2.4/linux.bin root=/dev/ram ramdisk_size=20000 devfs=mount,dall
initrd /debian/ll/images-1.44/bf2.4/root.bin
boot
let's see if there is the hd...
shit!
->decide to root=/dev/sda
->maybe still can't work
LL 13:47 2005-1-21
http://people.debian.org/cdimage/testing/sarge_d-i/i386/current/sarge-i386-netinst.iso
下载了iso,准备用vmlinuz 和initrd.gz装个了!
come on kernel vmlinuxand initrd
shit!!!!!!!!i use  that iso straightly:(  -_-!


LL 21:05 2005-1-21
不用nat,不指定static ip是不能通讯的dhcp不行


LL 10:21 2005-1-23
# apt-get install apache2 php4
如果要mysql支持还要安装
# apt-get install mysql-server mysql-client php4-mysql
/etc/apache2/apache2.conf
默认的在/var/www/apache2-default/目录下了
我最好也没有改成功,我建立了
<VirtualHost 192.168.0.2>
ServerAdmin liuxin8312@163.com
DocumentRoot /home/ll/public_html
ServerName w01f
ServerAlias w01f
</VirtualHost>
用putty方便啊,我这里可paste,但是debian里就不可以



AddType application/x-httpd-php .php
还要在httpd.conf里加入LoadModule php4_mod module/libphp4.so  大概是这些,具体的下次开vm再说

##################
LL 20:18 2005-1-26
关于书写启动的脚本-自动运行;和书写可执行脚本
vi /etc/inittab 这个可以设置 The default runlevel
默认的是2,所以cd /etc/rc2.d,那些脚本不用的直接删了就是了。要用的时候再到init.d里面ln回来
apt-get install rcconf 可以设置启动的程序的工具
~~~~~~~~~~~~~~~~~linuxsir.org
关于开机自动运行自己的脚本的问题

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


查看了站上的贴子以后好象有以下这么一些方法,却不知哪个比较方便简单
1、用rcconf来管理。但不知道它管理的是哪些服务,是不是在init.d下面有启动脚本的?
2、在init.d下放一个脚本,然后用update-rc.d 来启动?如果采用这种方式,脚本文件是不是一定要符合那个标准,即包括start,stop的运行参数?
3、利用init来运行,相对的脚本在/etc/rc.X/下面,文件以S或K开头

不知道是不是可以以这些方法来自动运行,还有没有其他的方法?
还有没有简单一点的,如其他版本中rc.local脚本文件
1. man rcconf

Rcconf allows you to control which services are started when the system
boots up or reboots. It displays a menu of all the services which
could be started at boot. The ones that are configured to do so are
marked and you can toggle individual services on and off.

Rrconf gets a list of services from /etc/init.d and looks in the
/etc/rc?.d directories to determine whether each service is on or off.

If the number(NN of /etc/rc?.d/NNname) is not 20(default), rcconf saves
the service name and the number in /var/lib/rcconf/services so as to be
able to restore the service to its original configuration.

2./etc/init.d/下面的都是一些脚本吧。先chmod +x file,就可用rcconf来管理了,如果你的脚本符合{start|stop|restart|force-reload}这些规则,就可以用这些参数

3./etc/rc.X/是S打头的只是/etc/init.d/的链接吧。
多谢:)
我现在把要运行的文件(脚本)放在自定义的一个目录(不一定init.d),在rc.N 下做了个符号链接,也不一定符合那个规则,可以正常执行了:)
发现链接的名字头的数字比较大小时是按字符方式的啊不是,数值比较
比如,105比99小
~~~~~~~~~~~~~~~~~
对的,在rcN.d 里放可执行的文件,然后就正常的运行了,如名字: S20vsftpd,S99rmnologin所以自己用的时候数字大些吧,下面写可执行的脚本,rcconf已经很好用了!加符合链接语法ln [OPTION]... TARGET [LINK_NAME],自己就ln -s
我费了这么大的劲,原来~~~
2.4.3 自定义系统引导进程
------------------------
Debian没有使用BSD风格的rc.local目录来自定义系统引导进程;它提供自己的自定义机制。

假设系统要在启动时运行foo脚本,或进入指定的(System V)运行级别。那系统管理员可以这样:

1.将foo脚本加入/etc/init.d/目录。

2.使用合适的参数运行Debian命令update-rc.d,这样就在(命令行指定的)rc?.d目录和/etc/init.d/foo之间建立了链接,这里?是0到6中的一个数字,对应于System V的各个运行级别。

3.重启系统。

update-rc.d命令会建立rc?.d目录中文件与/etc/init.d/目录中脚本的链接,每个链接名会以“S”或“K”打头,接下来是一个数字,再就是脚本名。/etc/rcN.d/中以“S”打头的脚本在系统进入运行级别N时被执行。以“K”打头的脚本在离开运行级别N时被执行。

还可以这样来做,将脚本放在/etc/init.d/下然后使用update-rc.d foo default 19建立链接,让foo脚本在系统启动期间执行。参数defaults指默认运行级别,它可以是2到5中某个值。参数19确保foo在其它参数大于20的脚本之前执行。


可执行脚本的写法http://www.zdnet.com.cn/techupdate/system/linux/story/0,3800030639,39287378,00.htm
http://www.freebsd.org.cn/snap/doc/zh_CN.GB2312/books/handbook/linuxemu-matlab.html 参考
如下总结
#!/bin/sh
cp $1 $2
脚本的内容,然后要chmod +x YourScriptName 令之可执行。
#!/bin/sh
echo "marker 1"
if [ -f "/usr/bin/mcopy" ]
then
echo "marker 2"
mcopy $1 $2
else
echo "marker 3"
cp $1 $2
fi
echo "marker 4"
-f 检查某一个文件是否存在(例如,[-f "文件名"])
-d 检查某一个目录是否存在
就这么建立就行了。
下面这个写的挺好的
10.5.2. 许可管理器的启动
为许可管理器建立符号链接的脚本:

# ln -s $MATLAB/etc/lmboot /usr/local/etc/lmboot_TMW
# ln -s $MATLAB/etc/lmdown /usr/local/etc/lmdown_TMW
建立启动文件/usr/local/etc/rc.d/flexlm.sh。下面的例子是一个$MATLAB/etc/rc.lm.glnx86的修改版本。变化的是文件的位置,和模拟Linux下许可管理器的启动。

#!/bin/sh
case "$1" in
  start)
        if [ -f /usr/local/etc/lmboot_TMW ]; then
              /compat/linux/bin/sh /usr/local/etc/lmboot_TMW -u username && echo 'MATLAB_lmgrd'
        fi
        ;;
  stop)
    if [ -f /usr/local/etc/lmdown_TMW ]; then
            /compat/linux/bin/sh /usr/local/etc/lmdown_TMW  > /dev/null 2>&1
    fi
        ;;
  *)
    echo "Usage: $0 {start|stop}"
    exit 1
    ;;
esac

exit 0
Important: 必须使脚本文件可执行:

# chmod +x /usr/local/etc/rc.d/flexlm.sh
您也必须替换username为机器上的一个用户(不要是root)。

用命令启动许可管理器:

# /usr/local/etc/rc.d/flexlm.sh start

##################
##################
LL 11:18 2005-1-25
new vm in old ide disk
now
kernel like before and initrd like before
不知道有没有硬盘啊。
ok了!!
follow the instructions
http://mirror.dlut.edu.cn/debian/dists/woody/main/disks-i386/current/
利用net装了,装的woody的。下了好多的东西啊

LL 14:48 2005-1-25
准备编译apache2了
httpd-2.0.52.tar.bz2
apt-get install gcc
######
checking for C compiler default output... configure: error: C compiler cannot create executables
#######
apt-get install g++
后出现了传说中的libc6-dev
这就成功了,关键是libc6-dev   apt-get install libc6-dev
make...
apt-get install make
make install
太慢了,决定apt-get了
AddType application/x-httpd-php .php 其实就是去掉了注释而已
AddCharset GB2312      .gb2312 .gb
都已经有了
加上
AddDefaultCharset GB2312
find / -name libphp4.so
debian:~# find / -name libphp4.so
/usr/lib/apache/1.3/libphp4.so
然后我就在apache.conf里加入LoadModule php4_module /usr/lib/apache/1.3/libphp4.so我加在httpd.conf里了
失败了,加到apache.conf里
ldd -r /usr/lib/apache/1.3/libphp4.so 有错误了
cp /usr/lib/apache/1.3/libphp4.so /usr/lib/apache2/modules/libphp4.so
ldd -r /usr/lib/apache2/modules/libphp4.so 居然全对了!
LoadModule php4_module /usr/lib/apache2/modules/libphp4.so
然后错了,ldd -r /usr/lib/apache2/modules/libphp4.so 错错!!!
apt-get install libapache2-mod-php4
妈的,这回对了,以后直接  apt-get install apache2 php4 libapache2-mod-php4
这是网上的,apt-get install libapache2-mod-php4 php4 apache2 apache2-prefork mysql-server mysql-client libmysqlclient12 估计很厉害吧

a2enmod php4这个命令enable mod

 apt-get install php4-mysql mysql-server mysql-client
装mysql
有人是这么装的
# apt-get install apache php4 php4-gd php4-mysql mysql-server mysql-client
# apt-get install apache2-mpm-prefork libapache2-mod-php4 php4-pear mysql-server mysql-client php4-mysql
也行了!
突然的发现,# vi /etc/apache2/sites-available/default是apache的默认目录啊!
妈的,得把/usr/lib/apache2/modules/libphp4.so  留下,删错了,libapache2-mod-php4 重新apt-get了一下


vsftp限制用户的目录更改里面vsftp.conf,把vsftp.chroot_list改成vsftp/chroot_list不是. 了
#chroot_local_user=YES
还要保持屏蔽,要不就直接把这行去掉屏蔽,后面的不用改了。
真是可恶啊,我的apache2没有和php4的模块一起装,就要a2enmod,然后是php4就行了
UserDir public_html
UserDir disabled root

<Directory /home/*/public_html>
        AllowOverride FileInfo AuthConfig Limit
        Options Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
apache里的这几行去掉注释!
可以访问用户的空间了,还要把public_html改为755。
为什么用ftp建立的文件夹只有700呢。
a:local_umask=022 要这样才行的。
--------mysql
您已添加了一个新用户。  
SQL 查询:
GRANT SELECT , INSERT , UPDATE , DELETE , CREATE 这个不可以要的!!, DROP , FILE , INDEX , ALTER , CREATE TEMPORARY TABLES ON * . * TO 'll'@'localhost'
IDENTIFIED BY '******'
WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 ;

FLUSH PRIVILEGES;//这是文档上说的


CREATE DATABASE `ll` ;

GRANT ALL PRIVILEGES ON `ll` . * TO 'll'@'localhost' WITH GRANT OPTION ;
 
这就是我要做的了^^



















###################
LL 21:08 2005-1-26
dpkg -s php4  就能看版本了
apt-get install mc
midnight commander好强啊!
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值