iTerm2をインストールする方法
- homebrewのインストール
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
- brewの診断ツールを走らせる
brew doctor
- 結果
Warning: You really should consult the `brew doctor`! Error: Experimental support for using Xcode without the "Command Line Tools". Error: Git could not be found in your PATH. Homebrew uses Git for several internal functions, and some formulae use Git checkouts instead of stable tarballs. You may want to install Git: brew install git Error: No Xcode version found! No compiler found in /usr/bin! To fix this, either: - Install the "Command Line Tools for Xcode" from http://connect.apple.com/ Homebrew does not require all of Xcode, you only need the CLI tools package! (However, you need a (free) Apple Developer ID.) - Install Xcode from the Mac App Store. (Normal Apple ID is sufficient, here) Error: Your Xcode is configured with an invalid path. You should change it to the correct path: sudo xcode-select -switch /Developer
そういえば、Xcode入ってないね。入れなきゃいけないんだった。
時間かかるから先やっとくといいかも。
これはxcodeのPreferencesから
- git のインストール
brew install git
- libeventのインストール
brew install libevent
- ドットファイルを纏めてインストール
git clone https://github.com/yuroyoro/dotfiles.git cd dotfiles ./setup.sh
※カレントディレクトリ以下のドットファイルのリンク先がおかしい場合があるので注意
- vim起動
vim
- BundleInstall
:BundleInstall
Report Terminal Typeがxtermとかだと、うまく表示されないので256colorに変更
- vim-proc をmake
cd ~/.vim/bundle/vimproc/ make -f make_mac.mak
- フォントのパッチ当て面倒なのでステータスラインを表示しないようにする。
vi /Users/KBMJ/dotfiles/.vimrc.statusline
- コメントアウトする
" vim-powerlineでフォントにパッチを当てないなら以下をコメントアウト " let g:Powerline_symbols = 'fancy'
rubyのインストールで数時間かかった・・・(おばか日記)
xenで組んだサーバで、3つのGestOSにrubyを入れなきゃダメだったんですが、そのうちの
1つがmakeをすると待てど暮らせど終わらない・・・馬鹿だから数時間あたふたしてました。
原因は、サーバの時間が合ってないこと。
いや〜 ホントがっかりです。
GestOSにntpインストールして設定しましたが時間がうまく設定できず、domain0(大元)に
ntp入れて設定してあげれば時間はうまくいきました。
で、rubyのインストールをやってみたら、すんなり終了。
考えられません。。。
解決に至までに以下のページを参考にさせてもらいました。ありがとうございました。
http://sakaguch.com/pastbbs/0025/B0013189.html
自分への戒めの為にここに記録させて頂きました。。。
svnのリポジトリ変更(備忘録)
- svnの情報を見る
svn info
以下のように出ていたとする
Path: . URL: http://hogehoge/repos/hoge/trunk Repository Root: http://hogehoge/repos/hoge Repository UUID: xxxxxxxxxxxxxxxxxxxxxxxxxx Revision: xxx Node Kind: directory Schedule: normal Last Changed Author: zatsuso Last Changed Rev: xxx Last Changed Date: xxxxxxxxxxxxxxxxxxxxxxxx
- リポジトリ変更します。
svn switch --relocate http://hogehoge/repos/hoge http://fugefuge/repos/hoge --username zatsuso
hogehogeが移行元、fugefugeが移行先
この後infoで除いてみて下さい
svn info
Path: . URL: http://fugefuge/repos/hoge/trunk Repository Root: http://fugefuge/repos/hoge Repository UUID: xxxxxxxxxxxxxxxxxxxxxxxxxx Revision: xxx Node Kind: directory Schedule: normal Last Changed Author: zatsuso Last Changed Rev: xxx Last Changed Date: xxxxxxxxxxxxxxxxxxxxxxxx
成功!
備忘録
日本語での解説が少なすぎるので、悪戦苦闘しとります。
一応めも
[i] = integer based index [s] = string based index [proxy] proxy.global - data structure shared amongst all lua state machines proxy.global.config - sub structure (possibly added for esthetical reasons only) proxy.backends - array of backends (shared) proxy.connection - mysql connection object [proxy.backends[i]] proxy.backends[i].connected_clients - connected clients proxy.backends[i].address - server Address proxy.backends[i].state - status {BACKEND_STATE_UNKNOWN, BACKEND_STATE_UP, BACKEND_STATE_DOWN} proxy.backends[i].type - type {BACKEND_TYPE_UNKNOWN, BACKEND_TYPE_RW, BACKEND_TYPE_RO} proxy.backends[i].pool - connection pool object [proxy.backends[i].pool] proxy.backends[i].pool.max_idle_connections - max connections proxy.backends[i].pool.min_idle_connections - min connections proxy.backends[i].pool.users - hash table containing sockets hashed by username [proxy.backends[i].pool.users[s]] proxy.backends[i].pool.users[s].cur_idle_connections - number of sockets currently in the pool (meaning they are idle) [proxy.connection] proxy.connection.backend_ndx - id of active backend (magic value, setting it can trigger server socket changes, i.e: setting it to 0 returns the socket into the connection pool) proxy.connection.server - server socket object proxy.connection.client - client socket object [proxy.connection.client] proxy.connection.client.default_db - database proxy.connection.client.username - user proxy.connection.client.address - ip address (?) proxy.connection.client.scrambled_password - password as it was sent from the client [proxy.connection.server] proxy.connection.server.default_db - database proxy.connection.server.username - user proxy.connection.server.address - ip address (?) proxy.connection.server.scrambled_password - password as it was sent from the client proxy.connection.server.mysqld_version - mysql version proxy.connection.server.thread_id - connection id as set during the server handshake proxy.connection.server.scramble_buffer - password hash (?)
XenのゲストOS起動で血迷った
Xenで動いているゲストOSが停止したので、以下でおおもとからリブートをかけた。
xm list
Name ID Mem(MiB) VCPUs State Time(s) HogeOS2 2 1703 1 -b---- 1196773.0 HogeOS1 1 1703 1 -b---- 1196773.0
xm reboot HogeOS1
xm list
Name ID Mem(MiB) VCPUs State Time(s) HogeOS2 2 1703 1 -b---- 1196773.0
待てど暮らせど上がってこない・・・
挙げ句の果て起動コマンドが分からず、あたふたして調べた
vi /etc/init.d/xendomains
init.dの下にxenの自動起動スクリプトがあるのでその中にxm create ××ってのが書いてあったので
それを調べた。
当り!!
xm create HogeOS01 -c
※オプションの-cは起動時にconsoleを自動的に開くというオプションです。
xm list
Name ID Mem(MiB) VCPUs State Time(s) HogeOS2 2 1703 1 -b---- 1196773.0 HogeOS1 1 1703 1 -b---- 1196773.0
おわり
Basic認証でつまづいた
Basic認証についての備忘録。。。 詳しく調べてなかったらこういうしょーもない事でつまづく。。。
<Directory "/var/hoge/html"> AuthType Basic AuthName "Hoge User" AuthUserFile /home/hoge/.htpasswd Require user hogehoge </Directory>
の設定で下記のエラーが出続けていたので色々といじくり回したり調べたりした。
access to / failed, reason: user 'hogehoge' does not meet 'require'ments for user/valid-user to be allowed access
ちなみに.htpasswordの中に存在するユーザはhogeでした。
<Directory "/var/hoge/html"> AuthType Basic AuthName "Hoge User" AuthUserFile /home/hoge/.htpasswd Require valid-user </Directory>
にしたらエラーでなくなった。
気になったので調べました。以下参照。
require user ユーザ単位で、認証の機会を与えます。パスワードファイルに登録されているユーザのうち、user-id だけに認証の機会を与え、 ほかは拒否します。 require group グループ単位で、認証の機会を与えます。パスワードファイルに登録されているユーザのうち、group-name グループに属している 場合だけに認証の機会を与え、ほかは拒否します。AuthGroupFile であらかじめグループ定義を行う必要があります。 valid-user 全てのユーザに、認証の機会を与えます。通常、これを選択します。 require が <Limit> セクション内でグループ化されている場合は、<Limit> で指示されているメソッドでのアクセスを制限し認証に かけます。他のメソッドは制限しません。require が <Limit> セクション内になければ、すべてのメソッドを制限します。
上記より、下記のように修正しました。
<Directory "/var/hoge/html"> AuthType Basic AuthName "Hoge User" AuthUserFile /home/hoge/.htpasswd Require user hoge </Directory>
正常にBasic認証通過!!
おわり
objective-cのinit処理での疑問
こういう疑問(質問)がとあるところであった。
以下の処理。
- (id)init { if(self = [super init]){ /* initialization code */ } return self; }
元々のselfは何処へ。。。