คลังบทความของบล็อก

วันศุกร์ที่ 14 มีนาคม พ.ศ. 2551

TTY linux (ตัวเล็กๆ)

www.minimalinux.org/ttylinux
เป็น linux ขนาด 5 MB Run จาก cdrom

แต่มีวิธี move to hdd

Note: This is an unofficial howto.
First, you need a system capable of compiling packages. Due to the 4MB size limit of ttylinux, it doesn't contain such tools. I myself, use KUbuntu or Slackware for these tasks.
Second, this HOWTO is not guaranteed to work for each and every packages out there since every package has its own installation process. In this example, we will install "links" a CLI browser which uses the popular "./configure && make && make install" installation procedures.
Notation: In this HOWTO, the "#" symbol indicates a comment. When you encounter a "#" the rest of that line is a comment; don't type it. The commands specific to the creation of a ttylinux package (9 to 15) are followed by "# ! ttylinux specific !"
Also, all commands - everything you need to type - are in blue.
1) Download links hereIn this HOWTO we will use version 0.99
2) Unpack the tarball.tar zxvf links-0.99.tar.gz
3) Change to the newly created directory.cd links-0.99
4) Configure links../configure --prefix=/usr --without-ssl
Note that we pass the "--without-ssl" argument to the configure script since ttylinux doesn't have SSL installed. A consequence is that you will not be able to navigate to https websites. If you want to add SSL support to ttylinux, you can install OpenSSL, for example. Once you've configured OpenSSL, you can follow the step from 5 to 15 to make it a ttylinux package.
5) Compile links.
make
6) Create a temporary directory to store the installed files.
mkdir ../linksTmp
7) Install links into the temporary directory.
make DESTDIR=../linksTmp install
8) Change to the temporary directory.
cd ../linksTmp
9) Create the list of files and symbolic links installed. # ! ttylinux specific !
find . -type f > ../temp.filelist
find . -type l >> ../temp.filelist
10) Create the directory where we will move the above file. # ! ttylinux specific !
mkdir -pv var/log/packages
11) Parse temp.filelist to remove "./" prefix and save the result in the ttylinux package # ! ttylinux specific !
sort ../temp.filelist sed s%./%% > var/log/packages/links-0.99
12) Archive and compress the package. # ! ttylinux specific !
tar jcvf ../links-0.99.tbz .
13) Remove unneeded files. (cleanup!) # ! ttylinux specific !
cd ..rm -fr linksTmp
rm -fr links-0.99rm -fr links-0.99.tar.gz
rm temp.filelist
14) Copy the package "links-0.99.tbz" on your ttylinux machine. # ! ttylinux specific !
15) Install the package with pacman # ! ttylinux specific !
pacman --install links-0.99.tbz
And we're done!

ไม่มีความคิดเห็น: