Install ttylinux

1. gcc tbz ftp: ftp://ftp.int.ru/pub/FreeBSD/ports/i386/packages-8-stable/lang/

2. mount cdrom: mount /dev/hdc /mnt/cdrom

 

Install ttylinux in VritualBox

1. download http://ttylinux.net/Download/ttylinux-i686-12.2.iso.gz

2. create a new virtual machine in VirtualBox

3. insert ttylinux-i686-12.2.iso into virtualbox cdrom

4. start ttylinux

  >boot:(press enter directly)

  >root/password

5. after login, install ttylinux from iso to hard disk:

  #fdisk /dev/sda

  #n

  #p

  #1

  #w

  #mke2fs /dev/sda1

  #ttylinux-installer -m /dev/hdc /dev/sda1

  (remove *.iso from cdrom)

  #reboot

6. enable network:

  #vi /etc/sysconfig/network-scripts/ifcfg-eth0

    change: ENABLE=yes

  #service network restart

  #ifconfig (to check the new ip address)

 

7. connect ttylinux from host with putty:

  cmd to c:\Program Files\Oracle\VirtualBox

  run:  VBoxManage setextradata "ttylinux" "VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/GuestPort" 22

        VBoxManage setextradata "ttylinux" "VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/HostPort" 2223

        VBoxManage setextradata "ttylinux" "VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/Protocol" TCP

  restart ttylinux

 

8. open putty

  host: localhost

  port: 2223

  connect

 

9. install dpkg:

  a.#tar xf dpkg_1.14.30_i386.tar - C /

  b.#mkdir -p /var/lib/dpkg

  c.#touch /var/lib/dpkg/status

  d.#touch /var/lib/dpkg/available

  e.dpkg -i libattr1_2.4.43-2_i386.deb

  f.dpkg -i libacl1_2.2.47-2_i386.deb

  g./var/lib/dpkg/status (change libc6, coreutils as installed)

  h.dpkg -i libstdc__6_4.3.2-1.1_i386.deb

  i.dpkg -i lzma_4.43-14_i386.deb

  i.dpkg -i dpkg_1.14.30_i386.deb

  j.dpkg -i perl-modules_5.10.0-19lenny2_all.deb libgdbm3_1.8.3-3_i386.deb libdb4.6_4.6.21-11_i386.deb perl-base_5.10.0-19lenny2_i386.deb perl_5.10.0-19lenny2_i386.deb libc6_2.7-18lenny6_i386.deb

 

/dev/initctl no found:

$mkfifo /dev/initctl

$reboot -f

 

 

(Reading database ... 2984 files and directories currently installed.)

Preparing to replace perl-modules 5.10.0-19lenny2 (using perl-modules_5.10.0-19lenny2_all.deb) ...

Unpacking replacement perl-modules ...

Preparing to replace libgdbm3 1.8.3-3 (using libgdbm3_1.8.3-3_i386.deb) ...

Unpacking replacement libgdbm3 ...

Preparing to replace libdb4.6 4.6.21-11 (using libdb4.6_4.6.21-11_i386.deb) ...

Unpacking replacement libdb4.6 ...

Preparing to replace perl-base 5.10.0-19lenny2 (using perl-base_5.10.0-19lenny2_i386.deb) ...

Unpacking replacement perl-base ...

Preparing to replace perl 5.10.0-19lenny2 (using perl_5.10.0-19lenny2_i386.deb) ...

Unpacking replacement perl ...

Preparing to replace libc6 2.7-18lenny6 (using libc6_2.7-18lenny6_i386.deb) ...

Unpacking replacement libc6 ...

Setting up libc6 (2.7-18lenny6) ...

/usr/sbin/invoke-rc.d: line 274: /sbin/runlevel: No such file or directory

stat: illegal option -- c

BusyBox v1.17.3 (2010-11-23 20:17:54 MST) multi-call binary.

 

Usage: stat [OPTIONS] FILE...

 

Display file (default) or filesystem status

 

Options:

        -f      Display filesystem status

        -L      Follow links

        -t      Display info in terse form

 

BusyBox v1.17.3 (2010-11-23 20:17:54 MST) multi-call binary.

 

Usage: init

 

Init is the parent of all processes

 

 

 

10. install vim.tiny:

  a.#dpkg -x libselinux1_2.0.65-5_i386.deb /

  b.#dpkg -x libncurses5_5.7_20081213-1_i386.deb /

  c.#dpkg -x vim-tiny_7.1.314-3_lenny2_i386.deb /

  d.#ln -s /usr/bin/vim.tiny /usr/bin/vim

 

11. install gcc:

  a.#dpkg -i gcc-4.3-base_4.3.2-1.1_i386.deb

  a.#dpkg -i libgcc1_4.3.2-1.1_i386.deb (vim /var/lib/dpkg/status, change libc6 status to [install ok installed] from [install ok unpacked])

  a.#dpkg -i libc6_2.7-18lenny6_i386.deb

 

12. install gnu gcc:

  a.download latest gcc tbz from - ftp://ftp.int.ru/pub/FreeBSD/ports/i386/packages-8-stable/lang/gcc-4.6.0.20101127.tbz

  b.download freeisocreator from - http://www.minidvdsoft.com/dvdtoiso/

  c.install freeisocreator

  d.rename gcc-4.6.0.20101127.tbz to gcc-4.6.0.20101127-i686.tbz

  e.burn gcc.iso

 

13. #mount /dev/hdc /mnt/cdrom


 

你可能感兴趣的:(gcc,ssh,perl,vim,FreeBSD)