2013-10-01から1ヶ月間の記事一覧

さくらVPSのCentOSにjettyをインストール

CentOS 6.4 jetty 9.0.6 参考 http://gari-dev.blogspot.jp/2013/01/centosjetty.html http://gari-dev.blogspot.jp/2013/01/centosjettydaemon.html http://www.eclipse.org/jetty/documentation/current/setuid.html jettyをダウンロード jetty-distributi…

さくらVPSのCentOSにJavaをインストール

CentOS 6.4 Javaのrpmを取得 下記からrpmを取得。 http://www.oracle.com/technetwork/java/javase/downloads/index.html 直接wgetしようとするとうまくダウンロードできないので、いったん手元のマシンにブラウザでダウンロードしてからVPSに送る。 インス…

Vagrantでログインするユーザその他諸々を変更したい

こんな感じ config.ssh.guest_port = 19999 config.ssh.username = "username" config.ssh.host = "127.0.0.1" config.ssh.private_key_path = "~/.ssh/id_rsa"

vagrant snapshot go XXXできない

vagrant snapshot go XXXすると下記のようなエラーメッセージが出る。 There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["controlvm", "b9a2e6c4-19…

Postfixでnull clientを作成

null clientは送信だけしかせず、受信や中継をしないSMTPサーバ。 Postfixでは下記のように設定。 myhostname = mail.hoge.com mydomain = hoge.com myorigin = $myhostname inet_interfaces = loopback-only mydestination = $myhostname, localhost.$mydom…

rubyでファイルに文字列を挿入したい

open(path, "r+") do |f| file_content = f.read new_file_content = file_contentになんか挿入 f.rewind f.puts(new_file_content) f.truncate(f.tell) end

Chef周りのメモ2

Vagrantで作成した仮想環境のSSHポートを変更したい まず普通にvagrant up sudoが面倒なのでrootになる SSHポート変更 vi /etc/ssh/ssh_config #Port 22 ↓ Port 19999 /etc/init.d/sshd restart iptablesでSSH用に開けているポートを変更 vi /etc/sysconfig/…

Chef周りのメモ

Vagrantfileにberkshelfやchefの設定を行うと、"vagrant up"でcookbookの取得と仮想環境への適用を行ってくれるため、開発環境の配布に非常に便利。 2回目以降は"vagrant provision"を実行しないとchefの設定は適用されない。 ただし、VPSに環境を作る前にロ…

ChefとVagrantの練習メモ

VirtualBoxインストール https://www.virtualbox.org/wiki/Downloads OS X向けをダウンロード、インストール Vagrantインストール http://downloads.vagrantup.com/tags/v1.3.4 CentOS6.4のboxを取得 vagrant box add centos-6.4 http://developer.nrel.gov/…