PGメモ

非エンジニアの記録

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

CentOS5.9にReviewBoardをインストール

必要なものを入れます # yum install mysql-devel httpd-devel python-devel # easy_install mysql-python # easy_install Review Board # easy_install RbTools# wget http://modwsgi.googlecode.com/files/mod_wsgi-3.3.tar.gz # tar zxvf mod_wsgi-3.3.ta…

CentOS5.9にeasy_installをインストール

超簡単 # wget http://peak.telecommunity.com/dist/ez_setup.py # python ez_setup.py

CentOS5.9にPython2.7を入れる

ReviewBoardを入れたい。 そのためにはPythonのバージョンを2.7にしたい。 # yum install zlib zlib-devel tk-devel tcl-devel sqlite-devel ncurses-devel gdbm-devel readline-devel bzip2-devel db4-devel openssl-devel mod-ssl# wget http://www.python…

CentOS5.9にPhabricatorをインストール

まずは必要なものを入れます # yum install httpd httpd-devel # yum install php53 php53-devel php53-mysql php53-mbstring # yum install mysql mysql-serverPhabricatorを入れます。Gitから落としてきます # mkdir /var/www/phabricator # mv /var/www/p…

CentOS5.9にApache2.4.6を入れる

古いバージョンが入っていたら迷わず削除 # yum remove httpdまずはソースをダウンロード # wget http://ftp.meisei-u.ac.jp/mirror/apache/dist//httpd/httpd-2.4.6.tar.gz解凍 # tar -vzxf httpd-2.4.6.tar.gconfigureをかます # cd httpd-2.4.6 # ./confi…

Apache 2.2.7以下でBと同じものを使う

mod_rewriteの[B]。本家曰く The [B] flag instructs RewriteRule to escape non-alphanumeric characters before applying the transformation. mod_rewrite has to unescape URLs before mapping them, so backreferences will be unescaped at the time t…

CentOS5.9にGitサーバーを立てる。

意気揚々とgitサーバを立てる事にする・・がパッケージがない。 # yum install git-daemon Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: ftp.tsukuba.wide.ad.jp * extras: mirrors.hust.edu.cn * updates:…

私的にgitでよく使うコマンド

Git

ローカル&リモートにブランチを作る $ git checkout -b working origin $ vim test.txt $ git commit -am "commit" $ git push origin workingローカルブランチを削除 $ git branch -d <branchname>リモートブランチを削除 $ git push --delete <repository> <branchname>ブランチをマージする $ </branchname></repository></branchname>…

solrでjava.net.UnknownHostExceptionと出た時の解決法

solrを使っていて、updateやcommitする際に java.net.UnknownHostException local.test上記みたいな自分で設定したローカルドメインでunknown hostが出た時。 $ vim /etc/hosts# Do not remove the following line, or various programs # that require netw…

GitHubで初めてのコミット

まず始めにリポジトリを作ります。GitHubの画面の右下にある「New repository」をクリック リポジトリの名前を入れます 完成 次いでローカルリポジトリを作ります・・が その前に初期設定をします $ git config --global user.name '<user_name>' $ git config --global</user_name>…

CentOSにgitを入れる

Git

デフォルトでは入りません。レポジトリを追加します。 # rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm # yum install --enablerepo=webtatic git-all

【Ruby on Rails】ユニットテストをする

Ruby on Railsでテストをしたい。テストはrakeで行うようです。 $ rakeRun options: --seed 9253 # Running tests: .............. Finished tests in 1.049915s, 13.3344 tests/s, 24.7639 assertions/s. 14 tests, 26 assertions, 0 failures, 0 errors, 0…

【Ruby on Rails】カラムを追加する

やり方は2つ1. migrationファイルを書く 2. コマンドを書いてmigrationファイルを自動生成1. migrationファイルを書く場合/db/migrate/以下にタイムスタンプ(西暦、月、日、時、分、秒)_行う処理.rb を作ります。そこに処理を記述していきます。使えるメソッ…

【Ruby on Rails】テーブルとモデルを作る。

Ruby on Railsでテーブルとモデルを作ります。例えばユーザーテーブル。カラムはidとname $ rails generate scaffold User id:integer name:string上記コマンドでデータモデルの属性をオプションとしてパラメータに追加します。 $ bundle exec rake db:migra…