UNIX的なアレ

UNIX的なこととかいろいろ

軽快なLinux環境をつくれる、coLinuxのセットアップ手順


WindowsLinuxVMwareLAMP - UNIX
WindowsLinuxcoLinux

VMwarePlayer
coLinux
VMwarePlayer

必要なモノをダウンロードする。

まず、必要なものは以下の2つです。

  • coLinux本体
  • FileSystemImage (今回はDebianを使用します)
  • swapImage(swap用のイメージです)
coLinux本体ダウンロード

それではまずcoLinux本体をダウンロードします。
Cooperative Linux - Browse Files at SourceForge.net
coLinux-0.7.1.exeというファイルがありますのでこちらをダウンロード下さい。

FileSystemImageダウンロード

FileSystemImage
Debian-4.0r0-etch.ext3.1gb.bz2
swapのイメージファイルのダウンロード

http://gniarf.nerim.net/colinux/swap/
上記のサイトから、

swap_128Mb.bz2というファイルをダウンロードしてきて下さい。
こちらはswapのイメージで、今回は128MBで構築します。

これでダウンロード作業は完了です!インストールにとりかかりましょう。

coLinux本体のインストール



coLinux-0.7.1.exe
2

1RootFile system image Download

2

c:\Program Files\coLinux

debianのイメージを解凍する


coLinuxDebianswap
bz2
Lhaplus

&

  • FileSystemImage
解凍したときのファイル名
Debian-4.0r0-etch.ext3.1gb.bz2
リネーム後のファイル名
debian.img
設置先
C:\Program Files\coLinux\debian.img
  • swapのイメージファイル
解凍したときのファイル名
swap_128Mb
リネーム後のファイル名
swap.img
設置先
C:\Program Files\coLinux\swap.img

windows側のNetworkの設定をする


coLinuxNAT








TAP-Win32
(3)


LAN


coLinux
3

coLinuxの設定ファイルを書く



coLinux(C:\Program Files\coLinux)debian.conf

coLinux

kernel=vmlinux
cobd0="c:\Program Files\coLinux\debian.img" # FileSystemImageの指定
cobd1="c:\Program Files\coLinux\swap.img" # swapImageの指定
initrd="c:\Program Files\coLinux\initrd.gz" # initrdの指定
mem=128 # 使用するメモリの指定
eth0=tuntap
root=/dev/cobd0


coLinuxを立ち上げる!


coLinux
debian.conf









C:\WINDOWS\system32> cd "c:\Program Files\coLinux"
C:\WINDOWS\system32> colinux-daemon.exe @"debian.conf"
Cooperative Linux Console

Networkの設定をする


Network
user:root / password:root 
Networkvi
nano

# nano /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1

CTRL+O -> CT
RL+X 

NIC

# /sbin/ifdown eth0
# /sbin/ifup eth0

# /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:FF:3B:A6:D2:00
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::2ff:3bff:fea6:d200/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:233 errors:0 dropped:0 overruns:0 frame:0
TX packets:140 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:33013 (32.2 KiB) TX bytes:19379 (18.9 KiB)
Interrupt:2

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

eth0IP
192.168.0.2OK
nameservernano

# nano /etc/resolv.conf
nameserver 192.168.0.1


NetworkDefaultGateway,ping

# /bin/ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=128 time=0.497 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=128 time=0.460 ms

# ping 0.pool.ntp.org
PING 203.141.148.250 (203.141.148.250) 56(84) bytes of data.
64 bytes from 203.141.148.250: icmp_seq=1 ttl=52 time=43.1 ms
64 bytes from 203.141.148.250: icmp_seq=2 ttl=52 time=44.0 ms



Ping
使

userアカウントの設定

それではLinuxの立ち上げ、Networkの設定まで完了したのでこれが最後になります。
いままではrootログインをしていましたが、一般ユーザーのアカウントの作成とパスワードの変更をします。


# /usr/sbin/useradd wadap
# /usr/bin/passwd wadap
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

ssh等必要なものをインストール


sshvim

# sudo apt-get update
# sudo apt-get install ssh vim
Windows
coLinuxssh
192.168.0.2 ssh



最後に



coLinux
VMware
bat