<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Curl on 答えを知りたい</title><link>https://hack.ironsand.net/tags/curl/</link><description>Recent content in Curl on 答えを知りたい</description><generator>Hugo -- 0.147.9</generator><language>en-US</language><lastBuildDate>Mon, 14 Apr 2014 19:55:58 +0000</lastBuildDate><atom:link href="https://hack.ironsand.net/tags/curl/index.xml" rel="self" type="application/rss+xml"/><item><title>cygwinの必要なパッケージをコマンドラインで一括インストール</title><link>https://hack.ironsand.net/2014/install-cygwin-package-by-using-command-line/</link><pubDate>Mon, 14 Apr 2014 19:55:58 +0000</pubDate><guid>https://hack.ironsand.net/2014/install-cygwin-package-by-using-command-line/</guid><description>&lt;p>今まではcygwinをインストールしたディレクトリを全部SugarSyncで同期して使ってたんだけど、&lt;/p>
&lt;p>よくわからないままに色々入れてたら700MBぐらいあったので整理整頓することにしました。&lt;/p>
&lt;h3 id="どうするか">どうするか？&lt;/h3>
&lt;p>既にインストールされてるcygwinのファイルを整理するのはめんどくさかったの新規インストールをすることにしたのはいいけど、何せパッケージ選択がめんどくさい。めんどくさいっていうか手動でやると必ず忘れてしまうので自動化したい。&lt;/p>
&lt;p>そこでコマンドラインインストールの登場です！&lt;/p>
&lt;h3 id="インストール方法">インストール方法&lt;/h3>
&lt;pre>&lt;code>setup-x86.exe --quiet-mode -P util-linux,curl,wget,openssh,rsync,zip,tree -s ftp://ftp.iij.ad.jp/pub/cygwin/ --root %USERPROFILE%\cyg --local-package-dir %USERPROFILE%\cyg
&lt;/code>&lt;/pre>
&lt;p>これでホームディレクトリ直下の &lt;code>C:\Users\ironsand\cyg&lt;/code>とかにインストールされる。&lt;/p>
&lt;h3 id="やめたパッケージ">やめたパッケージ&lt;/h3>
&lt;p>&lt;code>gcc&lt;/code>とか入れてcygwinでコンパイルして色々してると毎回ドツボにハマるので、もうそういうのはVirtualBox上のUbuntuですることにする。&lt;/p>
&lt;p>&lt;code>ruby&lt;/code>や&lt;code>python&lt;/code>はWindowsのネイティブパッケージを使う。結局なんだかんだでそれが一番安定してる気がするので。&lt;/p>
&lt;p>&lt;code>git&lt;/code>も&lt;code>cygwin&lt;/code>用のパス名周りのエラーが鬱陶しくなることがちょくちょくあったので&lt;code>Chocolatey&lt;/code>使って&lt;code>cinst git&lt;/code>でインストールする方法に変更。&lt;/p>
&lt;h3 id="注意点">注意点&lt;/h3>
&lt;p>何故か 64bit バージョンは動きませんでした。理由はわかりませんが、こういう関係のソフトは32bit版のほうが今はまだ安定してる気がするし大量にメモリ使うこともないので気にしないことにします。&lt;/p>
&lt;p>&lt;code>ssh&lt;/code>だと&lt;code>ssh&lt;/code>コマンドはインストールされないので&lt;code>openssh&lt;/code>を指定しましょう。&lt;/p>
&lt;p>インストール後に&lt;code>/etc/passwd&lt;/code>のホームディレクトリ設定を&lt;code>/home/username&lt;/code>から&lt;code>cygdrive/c/Users/username&lt;/code>とWindowsのホームフォルダに変更しておくと&lt;code>ssh&lt;/code>とかのコマンドの時に設定ファイルを自動的に読みに行ってくれるので便利。便利というかしないとちゃんと動かない。&lt;/p>
&lt;p>あと環境変数に&lt;code>set HOME=%USERPROFILE%&lt;/code>もどこかに仕込んでたほうが良いかも。&lt;/p>
&lt;h3 id="util-linux">Util-Linux&lt;/h3>
&lt;p>何故かカレンダー表示の&lt;code>cal&lt;/code>コマンドが見つからなかったので探してみたら、&lt;code>cal&lt;/code>のみのインストールはないらしい。&lt;/p>
&lt;p>とりあえず&lt;code>util-linux&lt;/code>が良さそうなんでこれを使う事にした。&lt;/p>
&lt;h3 id="tree">tree&lt;/h3>
&lt;p>Windows由来のコマンドなのにWindowsの&lt;code>tree&lt;/code>コマンドは階層指定もできない残念仕様なので&lt;code>cygwin&lt;/code>のを入れました。&lt;code>tree -L 2&lt;/code>とかで階層指定できる。便利！&lt;/p></description></item></channel></rss>