hxzyf吧 关注:18贴子:1,318
  • 4回复贴,共1

安装debian教程

只看楼主收藏回复

一:准备工作
更新/etc/opkg.conf里面的源为
src/gz packages http://downloads.openwrt.org/backfire/10.03.1-rc4/brcm63xx/packages
二:漫长的过程
opkg update
opkg install objdump
mkdir /mnt/sdb1/temp
cd /mnt/sdb1/temp
wget http://downloads.openwrt.org/backfire/10.03/brcm63xx/packages/binutils_2.19.1-3_brcm63xx.ipk
tar zxvf binutils_2.19.1-3_brcm63xx.ipk
tar zxvf data.tar.gz
cp usr/mips-openwrt-linux-uclibc/bin/ar   /usr/bin
ar
opkg install debootstrap
mkdir /mnt/sdb1/debian_mips
debootstrap   --arch=mips --variant=minbase   squeeze /mnt/sdb1/debian_mips http://mirrors.geekbone.org/debian/
mount -o bind /proc /mnt/sdb1/debian_mips/proc
mount -o bind /dev /mnt/sdb1/debian_mips/dev
chroot /mnt/sda1/debian_mips /bin/bash
apt-get update
apt-get lighttpd mysql-server php5 php5-cgi php5-mysql   php5-gd
配置/etc/lighttpd/lighttpd.conf
server.modules项增加一行,内容为:
“mod_fastcgi”
还需要在文件末尾加下面的内容:
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php.socket",
"bin-path" => "/usr/bin/php5-cgi"
)
)
)
并且更改网站目录为fat32盘的www文件夹



IP属地:河南1楼2011-05-29 03:25回复
    修改/etc/opkg.conf文件源地址为下面rc4地址
    http://downloads.openwrt.org/backfire/10.03.1-rc4/brcm63xx/packages/
    opkg update
    opkg install objdump
    mkdir /mnt/sdb1/temp
    cd /mnt/sdb1/temp
    wget http://downloads.openwrt.org/backfire/10.03/brcm63xx/packages/binutils_2.19.1-3_brcm63xx.ipk
    tar zxvf binutils_2.19.1-3_brcm63xx.ipk
    cp usr/mips-openwrt-linux-uclibc/bin/ar   /usr/bin
    mkdir /mnt/sdb1/debian_mips
    debootstrap   --arch=mips --variant=minbase   squeeze /mnt/sdb1/debian_mips http://mirrors.geekbone.org/debian/
    


    IP属地:河南2楼2011-06-11 23:00
    回复
      mount -o bind /proc /mnt/sda1/debian_mips/proc
      mount -o bind /dev /mnt/sda1/debian_mips/dev
      chroot /mnt/sda1/debian_mips /bin/bash
      这个是用chroot进入debian系统


      IP属地:河南3楼2011-06-11 23:01
      回复
        加入到启动项/etc/rc.local中
        mount -o bind /proc /mnt/sdb1/debian_mips/proc
        mount -o bind /dev /mnt/sdb1/debian_mips/dev
        chroot /mnt/sdb1/debian_mips /bin/bash /etc/init.d/lighttpd start
        chroot /mnt/sdb1/debian_mips /bin/bash /etc/init.d/mysql start
        下面这句可以挂载其他盘到debian,一般用不到!
        mount -o bind /mnt/sda1 /mnt/sdb1/debian_mips/mnt/sda1


        IP属地:河南5楼2011-06-11 23:12
        回复
          最后修正完美无错教程(假设优盘为sdb1)
          修改/etc/opkg.conf文件源地址为下面rc4地址
          http://downloads.openwrt.org/backfire/10.03.1-rc4/brcm63xx/packages/
          opkg update
          opkg install objdump
          mkdir /mnt/sdb1/temp
          cd /mnt/sdb1/temp
          wget http://downloads.openwrt.org/backfire/10.03.1-rc4/brcm63xx/packages/binutils_2.19.1-3_brcm63xx.ipk
          tar zxvf binutils_2.19.1-3_brcm63xx.ipk
          cp usr/mips-openwrt-linux-uclibc/bin/ar    /usr/bin
          mkdir /mnt/sdb1/debian_mips
          debootstrap    --arch=mips --variant=minbase    squeeze /mnt/sdb1/debian_mips http://mirrors.geekbone.org/debian/
          mount -o bind /proc /mnt/sdb1/debian_mips/proc
          mount -o bind /dev /mnt/sdb1/debian_mips/dev
          chroot /mnt/sdb1/debian_mips /bin/bash
          最后这行用chroot进入debian系统
          


          IP属地:河南6楼2011-06-11 23:45
          回复