InstallCoLinux » 履歴 » バージョン 24
Yuumi Yoshida, 2008-06-08 01:42
| 1 | 1 | Yuumi Yoshida | |
|---|---|---|---|
| 2 | 24 | Yuumi Yoshida | h1. coLinux で作る 快適Ruby on Rails開発環境 |
| 3 | |||
| 4 | |||
| 5 | 1 | Yuumi Yoshida | 質問などは、このページの一番下のコメント欄に書き込んで下さい。 |
| 6 | |||
| 7 | |||
| 8 | 24 | Yuumi Yoshida | h2. 対象者 |
| 9 | 1 | Yuumi Yoshida | |
| 10 | |||
| 11 | 24 | Yuumi Yoshida | * Windows PC 上で快適に Ruby on Railsの開発がしたい人 |
| 12 | * CUI(コマンドライン)の好きな人 |
||
| 13 | * Linux(Unix)の基本的なコマンドや設定がわかる人、または Linux(Unix) を勉強したい人 |
||
| 14 | 1 | Yuumi Yoshida | |
| 15 | |||
| 16 | |||
| 17 | 24 | Yuumi Yoshida | h2. 参考資料 |
| 18 | 1 | Yuumi Yoshida | |
| 19 | |||
| 20 | 24 | Yuumi Yoshida | * WEB+DB PRESS Vol.40 「特集2 coLinux,Emacs,GNU screen,zsh[定番]Linux開発環境」 http://gihyo.jp/magazine/wdpress/archive/2007/vol40 |
| 21 | |||
| 22 | |||
| 23 | h2. インストール |
||
| 24 | |||
| 25 | |||
| 26 | |||
| 27 | h3. 準備しておくソフト |
||
| 28 | |||
| 29 | * タミナルエミュレータ (例 [[PuTTY]] http://yebisuya.dip.jp/Software/PuTTY/) |
||
| 30 | * bz2が扱える解凍ソフト(例 Lhaz http://www.chitora.jp/lhaz.html) |
||
| 31 | * エディタ (例 サクラエディタ http://sakura_editor.at.infoseek.co.jp/) |
||
| 32 | |||
| 33 | |||
| 34 | h3. coLinux インストール |
||
| 35 | |||
| 36 | |||
| 37 | 2 | Yuumi Yoshida | 1. ネットを監視するセキュリティソフト(Notne, Macfee...)を OFF にする |
| 38 | 1 | Yuumi Yoshida | |
| 39 | 2 | Yuumi Yoshida | [[Image(secure_off.png, 375)]] |
| 40 | 21 | Yuumi Yoshida | |
| 41 | 2 | Yuumi Yoshida | 2. http://sourceforge.net/project/showfiles.php?group_id=98788 から以下をダウンロード |
| 42 | 24 | Yuumi Yoshida | ** coLinux本体: coLinux-0.7.2.exe |
| 43 | ** Ubuntu Linux イメージ : Ubuntu-6.06.1.ext3.1gb.bz2 |
||
| 44 | 2 | Yuumi Yoshida | |
| 45 | 3. coLinux-0.7.1.exe を実行してインストール |
||
| 46 | 24 | Yuumi Yoshida | ** Choose Components 画面では *Root Filesystem image Download* はチェックを外して下さい。 |
| 47 | ** インストール場所は適当に設定して下さい。ここでは *D:¥Program Files¥coLinux¥* にインストールしたとして書いています。 |
||
| 48 | 2 | Yuumi Yoshida | |
| 49 | 4. Ubuntu-6.06.1.ext3.1gb.bz2 を適当な解凍ツールを使い、coLinuxをインストールしたディレクトリー(ここでは:¥Program Files¥coLinux¥)に解凍します。 |
||
| 50 | 1 | Yuumi Yoshida | |
| 51 | 5. coLinux 設定ファイルを作成します。 |
||
| 52 | 2 | Yuumi Yoshida | i. D:¥Program Files¥coLinux¥xample.conf をコピーして D:¥Program Files¥coLinux¥ubuntu.conf という名前にします。 |
| 53 | i. ubuntu.conf ファイルを以下のように変更します。(変更した行のみ書きます) |
||
| 54 | 24 | Yuumi Yoshida | <pre> |
| 55 | 2 | Yuumi Yoshida | cobd0="c:¥coLinux¥root_fs" |
| 56 | ↓ |
||
| 57 | 1 | Yuumi Yoshida | cobd0="D:\Program Files\coLinux\Ubuntu-6.06.1.ext3.1gb" |
| 58 | 3 | Yuumi Yoshida | |
| 59 | 2 | Yuumi Yoshida | ro |
| 60 | ↓ |
||
| 61 | 1 | Yuumi Yoshida | #ro |
| 62 | 3 | Yuumi Yoshida | |
| 63 | 2 | Yuumi Yoshida | #mem=64 |
| 64 | 1 | Yuumi Yoshida | ↓ |
| 65 | mem=256 |
||
| 66 | |||
| 67 | eth0=slirp |
||
| 68 | ↓ |
||
| 69 | eth0=tuntap |
||
| 70 | 24 | Yuumi Yoshida | </pre> |
| 71 | *注意* mem= は coLinux のメモリー割り当てです。メモリーをたくさん積んでいるPCの場合は大きい方が良いかもしれません、 |
||
| 72 | 1 | Yuumi Yoshida | 私が使っているPCはWindowsXP メモリー 1Gbyte のものです。 |
| 73 | |||
| 74 | 6. DOSプロンプトを開き、coLinux を起動します |
||
| 75 | 24 | Yuumi Yoshida | <pre> |
| 76 | 2 | Yuumi Yoshida | > D: |
| 77 | 1 | Yuumi Yoshida | > cd ¥Proguram Files¥coLinux |
| 78 | > colinux-daemon @ubuntu.conf |
||
| 79 | 24 | Yuumi Yoshida | </pre> |
| 80 | 2 | Yuumi Yoshida | |
| 81 | [[Image(dos.png, 375)]] |
||
| 82 | |||
| 83 | 7. 設定に間違いが無ければ、 DOS 窓に上のようなメッセージが表示され、別ウィンドウに 以下のように coLinux が起動されます。 |
||
| 84 | |||
| 85 | 1 | Yuumi Yoshida | [[Image(coLinux.png, 375)]] |
| 86 | |||
| 87 | 24 | Yuumi Yoshida | 上のように、 *ubuntu login:* が表示されれば成功です。 |
| 88 | 2 | Yuumi Yoshida | |
| 89 | 1 | Yuumi Yoshida | |
| 90 | 3 | Yuumi Yoshida | |
| 91 | 24 | Yuumi Yoshida | h3. ネットワーク設定 |
| 92 | |||
| 93 | |||
| 94 | ネットワーク構成ですが、coLinux にはPCとは別のセングメントを割り当てます。 |
||
| 95 | |||
| 96 | coLinux と PC のネットワークの間は TAP-Win32 というドライバー(ブリッジソフト)が変換するので、coLinux と PC は通信が出来ます。 |
||
| 97 | |||
| 98 | 3 | Yuumi Yoshida | しかし coLiunx からインターネットにアクセスできません、そこでWindowsの「インターネットの共有」機能(NAT)を設定し、coLiunx からインターネットにアクセスできるようにします。 |
| 99 | |||
| 100 | 24 | Yuumi Yoshida | [[WindowsXP]] HOME Edition では、インターネットの共有で設定出来るアドレスは 192.168.0.1 に限られるので、今回は以下のように設定します。 |
| 101 | * coLinux : 192.168.0.2 (192.168.0.2 〜 192.168.0.254 なら変更可能) |
||
| 102 | * TAP-Win32: 192.168.0.1 |
||
| 103 | 1 | Yuumi Yoshida | |
| 104 | また、PC 、インタネット接続のルーターは以下のアドレスになっているとして書きます。 |
||
| 105 | 24 | Yuumi Yoshida | * PC : 192.168.1.12 |
| 106 | * ルーター: 192.168.1.1 |
||
| 107 | 3 | Yuumi Yoshida | |
| 108 | 4 | Yuumi Yoshida | 1. PC 側設定 |
| 109 | 24 | Yuumi Yoshida | coLinuxが立ち上がった時点で、ネットワーク接続を表示すると以下のように、TAP-Win32 Adapter とうローカルエリア接続があります。 |
| 110 | ここでは「ローカルエリア接続 3」になっていますが環境によって違う名前が付きます。 |
||
| 111 | 1 | Yuumi Yoshida | |
| 112 | 4 | Yuumi Yoshida | [[Image(net_list.png, 260)]] |
| 113 | 1 | Yuumi Yoshida | |
| 114 | 2. TAP-Win32 Adapter のプロパティーを表示し、アドレスを 192.168.0.1 に設定します。 |
||
| 115 | 5 | Yuumi Yoshida | |
| 116 | 1 | Yuumi Yoshida | [[Image(net_prop1.png, 260)]] [[Image(net_prop2.png, 260)]] |
| 117 | 5 | Yuumi Yoshida | |
| 118 | 24 | Yuumi Yoshida | 3. インターネットに接続されている接続(ここでは、ワイヤレスネットワーク接続)に「インターネット接続の共有」を設定します。 |
| 119 | インターネットの共有はプロパティーの「詳細設定」タブにあります、 |
||
| 120 | 「インターネット接続の共有」のチェック と 「ホームネットワーク接続」に TAP-Win32 Adapterを選択します。 |
||
| 121 | 5 | Yuumi Yoshida | |
| 122 | [[Image(net_prop3.png, 260)]] |
||
| 123 | |||
| 124 | 4. coLinux console に root でログインします。パスワードは root です、インストールが終わったら変更しましょうね。 |
||
| 125 | 1 | Yuumi Yoshida | |
| 126 | 5 | Yuumi Yoshida | 5. ログインできたら、ネットワークの設定を変更します |
| 127 | 24 | Yuumi Yoshida | <pre> |
| 128 | 5 | Yuumi Yoshida | # cp /etc/network/interfaces /etc/network/interfaces.org ← 変更前のファイルはバックアップしておきましょう |
| 129 | 1 | Yuumi Yoshida | # vi /etc/network/interfaces |
| 130 | |||
| 131 | 8 | Yuumi Yoshida | ※※ iface eth0 inet static 以下を下のように変更します |
| 132 | 1 | Yuumi Yoshida | |
| 133 | iface eth0 inet static |
||
| 134 | 5 | Yuumi Yoshida | address 192.168.0.2 |
| 135 | 1 | Yuumi Yoshida | broadcast 192.168.0.255 |
| 136 | netmask 255.255.255.0 |
||
| 137 | 5 | Yuumi Yoshida | gateway 192.168.0.1 |
| 138 | 24 | Yuumi Yoshida | </pre> |
| 139 | 5 | Yuumi Yoshida | |
| 140 | 24 | Yuumi Yoshida | *注意* coLinux console は英語キーボードの配列になっているので、記号がキーに書かれているのと違う文字が入ります ^^); |
| 141 | 1 | Yuumi Yoshida | |
| 142 | 6. DNS(name server) の設定も変更します。通常のブローバンドルーターを使っている場合は、DNS はルータのIPアドレスです。 |
||
| 143 | 24 | Yuumi Yoshida | <pre> |
| 144 | 1 | Yuumi Yoshida | # cp/etc/resolv.conf /etc/resolv.conf.org |
| 145 | # vi /etc/resolv.conf |
||
| 146 | 5 | Yuumi Yoshida | |
| 147 | ※※ ブローバンドルーターのIPアドレスを指定 |
||
| 148 | nameserver 192.168.1.1 |
||
| 149 | 24 | Yuumi Yoshida | </pre> |
| 150 | 5 | Yuumi Yoshida | |
| 151 | 7. ネットワークを設定 |
||
| 152 | 24 | Yuumi Yoshida | <pre> |
| 153 | 5 | Yuumi Yoshida | # /etc/init.d/networking restart |
| 154 | 24 | Yuumi Yoshida | </pre> |
| 155 | 5 | Yuumi Yoshida | |
| 156 | 1 | Yuumi Yoshida | 8. 確認、まずは自分(coLinux)にpingが届くこと |
| 157 | 24 | Yuumi Yoshida | <pre> |
| 158 | 1 | Yuumi Yoshida | # ping -c 3 192.168.0.2 |
| 159 | 5 | Yuumi Yoshida | PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data. |
| 160 | 64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=0.155 ms |
||
| 161 | 1 | Yuumi Yoshida | 64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=0.158 ms |
| 162 | 5 | Yuumi Yoshida | 64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=0.161 ms |
| 163 | 1 | Yuumi Yoshida | |
| 164 | --- 192.168.0.2 ping statistics --- |
||
| 165 | 3 packets transmitted, 3 received, 0%25 packet loss, time 2015ms |
||
| 166 | rtt min/avg/max/mdev = 0.155/0.158/0.161/0.002 ms |
||
| 167 | 24 | Yuumi Yoshida | </pre> |
| 168 | 5 | Yuumi Yoshida | |
| 169 | 9. OKなら TAP-Win32 にpingが届くことを確認 |
||
| 170 | 24 | Yuumi Yoshida | <pre> |
| 171 | 5 | Yuumi Yoshida | # ping -c 3 192.168.0.1 |
| 172 | 1 | Yuumi Yoshida | 以下省略 |
| 173 | 24 | Yuumi Yoshida | </pre> |
| 174 | 5 | Yuumi Yoshida | 10. OKなら PC にpingが届くことを確認 |
| 175 | 24 | Yuumi Yoshida | <pre> |
| 176 | 1 | Yuumi Yoshida | # ping -c 3 192.168.1.12 |
| 177 | 以下省略 |
||
| 178 | 24 | Yuumi Yoshida | </pre> |
| 179 | 5 | Yuumi Yoshida | 11. OKなら ルーター にpingが届くことを確認 |
| 180 | 24 | Yuumi Yoshida | <pre> |
| 181 | 1 | Yuumi Yoshida | # ping -c 3 192.168.1.1 |
| 182 | 以下省略 |
||
| 183 | 24 | Yuumi Yoshida | </pre> |
| 184 | 1 | Yuumi Yoshida | 12. OKなら ネット上のサイト にpingが届くことを確認 |
| 185 | 24 | Yuumi Yoshida | <pre> |
| 186 | 1 | Yuumi Yoshida | # ping -c 3 mixi.jp |
| 187 | 以下省略 |
||
| 188 | 24 | Yuumi Yoshida | </pre> |
| 189 | 5 | Yuumi Yoshida | |
| 190 | 1 | Yuumi Yoshida | |
| 191 | |||
| 192 | 24 | Yuumi Yoshida | h3. アカウント作成 |
| 193 | |||
| 194 | |||
| 195 | 5 | Yuumi Yoshida | 1. 自分のログイン用アカウントを作りましょう。ログイン名/パスワードは PC と同じにして下さい。 |
| 196 | 24 | Yuumi Yoshida | <pre> |
| 197 | 1 | Yuumi Yoshida | # adduser taro ← ログイン名 trao を作成 |
| 198 | 24 | Yuumi Yoshida | Adding user @taro'... |
| 199 | Adding new group @taro' (1001). |
||
| 200 | Adding new user @taro' (1001) with group @taro'. |
||
| 201 | Creating home directory @/home/taro'. |
||
| 202 | Copying files from @/etc/skel' |
||
| 203 | 5 | Yuumi Yoshida | Enter new UNIX password: ← パスワード |
| 204 | Retype new UNIX password: ← パスワード |
||
| 205 | passwd: password updated successfully |
||
| 206 | Changing the user information for taro |
||
| 207 | Enter the new value, or press ENTER for the default |
||
| 208 | Full Name []: ← Enter のみでよい |
||
| 209 | 1 | Yuumi Yoshida | Room Number []: |
| 210 | 6 | Yuumi Yoshida | Work Phone []: |
| 211 | Home Phone []: |
||
| 212 | Other []: |
||
| 213 | Is the information correct? [y/N] y ← Y を忘れずに |
||
| 214 | 24 | Yuumi Yoshida | </pre> |
| 215 | 1 | Yuumi Yoshida | |
| 216 | 2. sudo が使えるように設定します |
||
| 217 | 24 | Yuumi Yoshida | <pre> |
| 218 | 1 | Yuumi Yoshida | # vi /etc/sudoers |
| 219 | 6 | Yuumi Yoshida | root ALL=(ALL) ALL |
| 220 | 5 | Yuumi Yoshida | taro ALL=(ALL) ALL ← 自分のアカウントを rootと同様に追加 |
| 221 | 24 | Yuumi Yoshida | </pre> |
| 222 | 7 | Yuumi Yoshida | |
| 223 | |||
| 224 | 24 | Yuumi Yoshida | h3. いったん終了、coLinux の再起動 |
| 225 | |||
| 226 | |||
| 227 | 1 | Yuumi Yoshida | この辺でいったん、coLinux を終了してみましょう。 |
| 228 | 24 | Yuumi Yoshida | <pre> |
| 229 | 1 | Yuumi Yoshida | # /sbin/shutdown -h 0 |
| 230 | 24 | Yuumi Yoshida | </pre> |
| 231 | coLinux consoleにメッセージが数行表示され *Power down* と表示されたら 終了完了です。 |
||
| 232 | 7 | Yuumi Yoshida | |
| 233 | coLinuxを起動した、DOSプロンプト上の colinux-daemon が終了しているはずです。 |
||
| 234 | |||
| 235 | |||
| 236 | 1 | Yuumi Yoshida | 再起動は 以前と同じく |
| 237 | 24 | Yuumi Yoshida | <pre> |
| 238 | 1 | Yuumi Yoshida | colinux-daemon @ubuntu.conf |
| 239 | 24 | Yuumi Yoshida | </pre> |
| 240 | 1 | Yuumi Yoshida | |
| 241 | 7 | Yuumi Yoshida | |
| 242 | 24 | Yuumi Yoshida | h3. ターミナルエミュレータからのログイン |
| 243 | |||
| 244 | |||
| 245 | 7 | Yuumi Yoshida | coLinux console はスクロールが出来ない、日本語キーに対応してないので、putty 等のターミナルエミュレータから coLinuxにログインします。 |
| 246 | ログイン先は 192.168.0.2 です。 上で作成したアカウントでログインしてみましょう。 |
||
| 247 | |||
| 248 | |||
| 249 | 24 | Yuumi Yoshida | h3. Cコンパイラー等のインストール |
| 250 | 7 | Yuumi Yoshida | |
| 251 | 24 | Yuumi Yoshida | |
| 252 | モジュール等のインストールで必要になるCコンパイラー(gcc)等をインストールします。 |
||
| 253 | インストールにはdebian(Ubuntuはdebianベースのlinux)の *apt* を使います。 |
||
| 254 | |||
| 255 | <pre> |
||
| 256 | 1 | Yuumi Yoshida | $ sudo apt-get update ← インストーラの更新(?) |
| 257 | 8 | Yuumi Yoshida | $ sudo apt-get install libc6-dev gcc make |
| 258 | 24 | Yuumi Yoshida | </pre> |
| 259 | 途中で _Install these packages without verification [y/N]?_ 等の確認がありますが *y* を入力して下さい。 |
||
| 260 | 1 | Yuumi Yoshida | |
| 261 | 8 | Yuumi Yoshida | |
| 262 | |||
| 263 | 24 | Yuumi Yoshida | h3. rubyのインストール |
| 264 | |||
| 265 | |||
| 266 | 8 | Yuumi Yoshida | debian に用意されている ruby は 1.8.4 と少し古いですが、今回はこれを使ってみます。 |
| 267 | 24 | Yuumi Yoshida | <pre> |
| 268 | 8 | Yuumi Yoshida | $ sudo apt-get ruby1.8 rdoc1.8 ri1.8 libreadline-ruby1.8 irb1.8 ruby1.8-dev |
| 269 | 1 | Yuumi Yoshida | $ sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby |
| 270 | $ ruby --version |
||
| 271 | 8 | Yuumi Yoshida | ruby 1.8.4 (2005-12-24) [i486-linux] |
| 272 | 24 | Yuumi Yoshida | </pre> |
| 273 | 8 | Yuumi Yoshida | |
| 274 | |||
| 275 | 24 | Yuumi Yoshida | h3. ソースからの rubyインストール(オプション) |
| 276 | |||
| 277 | |||
| 278 | 12 | Yuumi Yoshida | 最新のruby をインストールしたい場合は、ソースからインストールします。 |
| 279 | 24 | Yuumi Yoshida | <pre> |
| 280 | 12 | Yuumi Yoshida | $ mkdir Install |
| 281 | 19 | Yuumi Yoshida | $ cd Install |
| 282 | 12 | Yuumi Yoshida | $ sudo apt-get install zlib1g-dev libreadline5-dev libopenssl libopenssl-dev |
| 283 | $ wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.bz2 |
||
| 284 | $ tar xvjf ruby-1.8.6-p111.tar.bz2 |
||
| 285 | $ cd ruby-1.8.6-p111 |
||
| 286 | $ ./configure |
||
| 287 | $ make |
||
| 288 | $ make test |
||
| 289 | $ sudo make install |
||
| 290 | $ ruby -v |
||
| 291 | ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux] |
||
| 292 | 24 | Yuumi Yoshida | </pre> |
| 293 | 8 | Yuumi Yoshida | |
| 294 | |||
| 295 | 24 | Yuumi Yoshida | h3. gem のインストール |
| 296 | |||
| 297 | |||
| 298 | <pre> |
||
| 299 | 8 | Yuumi Yoshida | $ mkdir Install |
| 300 | $ cd Install |
||
| 301 | $ wget http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz |
||
| 302 | $ tar xvzf rubygems-0.9.4.tgz |
||
| 303 | $ cd rubygems-0.9.4 |
||
| 304 | 1 | Yuumi Yoshida | $ sudo ruby setup.rb |
| 305 | 8 | Yuumi Yoshida | $ gem --version |
| 306 | 0.9.4 |
||
| 307 | 24 | Yuumi Yoshida | </pre> |
| 308 | 8 | Yuumi Yoshida | |
| 309 | 1 | Yuumi Yoshida | |
| 310 | 24 | Yuumi Yoshida | h3. rake,rails のインストール |
| 311 | |||
| 312 | |||
| 313 | <pre> |
||
| 314 | 8 | Yuumi Yoshida | $ sudo gem install rake -y |
| 315 | $ rake --version |
||
| 316 | 18 | Yuumi Yoshida | rake, version 0.8.1 |
| 317 | 8 | Yuumi Yoshida | $ sudo gem install rails -y |
| 318 | $ rails --version |
||
| 319 | 18 | Yuumi Yoshida | Rails 2.0.2 |
| 320 | 24 | Yuumi Yoshida | </pre> |
| 321 | 8 | Yuumi Yoshida | |
| 322 | |||
| 323 | 24 | Yuumi Yoshida | h3. sqlite3 のインストール |
| 324 | |||
| 325 | |||
| 326 | <pre> |
||
| 327 | 8 | Yuumi Yoshida | $ sudo apt-get install sqlite3 libsqlite3-dev |
| 328 | $ sudo gem install sqlite3-ruby -- --with-sqlite3-include=/usr/include --with-sqlite3-lib=/usr/lib |
||
| 329 | Bulk updating Gem source index for: http://gems.rubyforge.org |
||
| 330 | Select which gem to install for your platform (i486-linux) |
||
| 331 | 1. sqlite3-ruby 1.2.1 (mswin32) |
||
| 332 | 2. sqlite3-ruby 1.2.1 (ruby) |
||
| 333 | 3. sqlite3-ruby 1.2.0 (mswin32) |
||
| 334 | 4. sqlite3-ruby 1.2.0 (ruby) |
||
| 335 | 5. Skip this gem |
||
| 336 | 6. Cancel installation |
||
| 337 | > 2 ← 最新のruby版を選択 |
||
| 338 | |||
| 339 | $ sqlite3 |
||
| 340 | SQLite version 3.2.8 |
||
| 341 | Enter ".help" for instructions |
||
| 342 | 9 | Yuumi Yoshida | sqlite> .exit |
| 343 | 24 | Yuumi Yoshida | </pre> |
| 344 | 9 | Yuumi Yoshida | |
| 345 | |||
| 346 | 24 | Yuumi Yoshida | h3. samba のインストール(オプション) |
| 347 | |||
| 348 | |||
| 349 | 9 | Yuumi Yoshida | ソースファイル等の作成・編集は Windows上のエディターで行いたい場合は samba を使って、coLinux上のディレクトリーを共有すると良いでしょう。 |
| 350 | |||
| 351 | 1. samaba のインストール |
||
| 352 | 24 | Yuumi Yoshida | <pre> |
| 353 | 9 | Yuumi Yoshida | $ sudo apt-get install samba |
| 354 | 24 | Yuumi Yoshida | </pre> |
| 355 | 9 | Yuumi Yoshida | 2. samaba 用ログインの作成、 Windowsのログイン/パスワードで作成します。 |
| 356 | 24 | Yuumi Yoshida | <pre> |
| 357 | 9 | Yuumi Yoshida | $ sudo smbpasswd -a taro |
| 358 | 10 | Yuumi Yoshida | New SMB password: |
| 359 | 9 | Yuumi Yoshida | Retype new SMB password: ← パスワード |
| 360 | Added user taro. ← パスワード |
||
| 361 | 24 | Yuumi Yoshida | </pre> |
| 362 | 9 | Yuumi Yoshida | 3. 設定ファイルの変更 |
| 363 | 24 | Yuumi Yoshida | <pre> |
| 364 | 10 | Yuumi Yoshida | $ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.org |
| 365 | $ sudo vi /etc/samba/smb.conf |
||
| 366 | |||
| 367 | ※※ 変更した行のみ書きます |
||
| 368 | |||
| 369 | workgroup = MSHOME |
||
| 370 | ↓ |
||
| 371 | workgroup = EY-OFFICE.NET ← 自分の使っているworkgroupに合わせる |
||
| 372 | |||
| 373 | server string = %25h server (Samba, Ubuntu) |
||
| 374 | ↓ |
||
| 375 | server string = coLinux server |
||
| 376 | |||
| 377 | ;[homes] |
||
| 378 | ; comment = Home Directories |
||
| 379 | ; browseable = no |
||
| 380 | ↓ |
||
| 381 | [homes] |
||
| 382 | comment = Home Directories |
||
| 383 | browseable = no |
||
| 384 | |||
| 385 | ; writable = no |
||
| 386 | ↓ |
||
| 387 | writable = yes |
||
| 388 | |||
| 389 | ; create mask = 0600 |
||
| 390 | ↓ |
||
| 391 | create mask = 0644 |
||
| 392 | |||
| 393 | |||
| 394 | ; directory mask = 0700 |
||
| 395 | 11 | Yuumi Yoshida | ↓ |
| 396 | directory mask = 0755 |
||
| 397 | |||
| 398 | 24 | Yuumi Yoshida | </pre> |
| 399 | 13 | Yuumi Yoshida | 4. Windows 側 |
| 400 | 23 | Yuumi Yoshida | |
| 401 | [[Image(my_network.png, 360)]] |
||
| 402 | |||
| 403 | |||
| 404 | 13 | Yuumi Yoshida | |
| 405 | 24 | Yuumi Yoshida | h2. 質問 |
| 406 | |||
| 407 | |||
| 408 | ご質問のある方は、"私のBlog":http://d.hatena.ne.jp/yuum3/comment?date=20080607#c にコメント願います。 |
||
| 409 | 1 | Yuumi Yoshida | |
| 410 | ---- |