Wiki内検索
最近更新したページ
2012-06-02
2012-01-15
2012-01-10
2009-06-25
2009-06-23
2008-12-27
2008-12-04
2008-07-20
2008-06-18
2008-06-14
2008-04-18
2008-04-17
2008-03-11
2008-03-09
2008-02-19
2008-02-18
2008-02-17
最新コメント
Gentoo化 by check it out
Gentoo化 by check it out
Ruby on Rails by check it out
Ubuntu by check it out
VisualBasic by canada goose jacket sale
キリスト教とIT by seo thing
VisualBasic by check this out
Gentoo化 by watch for this
Flex by seo thing
Ruby on Rails by tips about seo
Menu
タグ

Struts



環境構築


Jarの置き場

http://www.asahi-net.or.jp/~ei3k-iwt/imac_sage/mac...

MySQL

XAMPPの時のディレクトリ
/Applications/xampp/xamppfiles/bin/mysql -u root -p 3#%KA


create database Chap04DB

use Chap04DB

create table t_address (id serial unique primary key not null, name text not null, pref integer not null, address text not null);

create table t_pref (id serial unique primary key not null, pref text not null);

insert into t_pref (pref) values ('Tokyo'); insert into t_pref (pref) values ('Chiba');

select * from t_pref;

名前: Okada, 住所:東京都江戸川1-2-3 名前: Takahashi, 住所:千葉県市川市4-5-6

insert into t_address (name, pref, address) values ('Okada', 1, 'Edogawaku 1-2-3');
insert into t_address (name, pref, address) values ('Takahashi', 2, 'Ichikawashi 4-5-6');

※valueでなくてvaluesがよい。

select * from t_pref; select * from t_address;

PostgreSQLのインストール(MacOSX 10.4)


JDBCドライバ

http://jdbc.postgresql.org/

http://www.ne.jp/asahi/mac/blue/pages/osx/postgres...

  • 便利なパッケージ版が、Marc Liyanageさんのサイトにあるのでダウンロードする。
http://www.entropy.ch/software/macosx/postgresql/
  • 「pgsql-8.1.1.pkg.tar.gz」を解凍すると「pgsql-8.1.1.pkg」が展開されるので、これをダブルクリックする。

  • ユーザ「PostgreSQL User」の作成
「システム環境設定」の「アカウント」より、以下のようにアカウントを追加する。
   名前:PostgreSQL User
   ユーザ名:postgres
   パスワード:(パスワードを設定)
   確認:(パスワードを設定)


PostgreSQLサーバの起動

  • ディレクトリ/usr/local/pgsqlの所有者をユーザpostgresに変更
sudo chown -R postgres /usr/local/pgsql

  • Passwordを入力し、ユーザpostgresになる。
su - postgres

  • データ領域の初期化
/usr/local/bin/initdb -D /usr/local/pgsql/data

  • PostgreSQLサーバの起動
/usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l postgres.log start

  • データベースの作成
/usr/local/bin/createdb データベース名

  • 作成したデータベースの確認
/usr/local/bin/psql -l
 「List of Database」内に作成したデータベースが表示されていればOKである。

ユーザ「postgres」にてPATHを通す

  • Passwordを入力し、ユーザpostgresになる。
su - postgres vi .bash_profile export PATH=$PATH:/usr/local/bin
と記入、上書き保存。
一旦exitし、再度loginする。
$PATH ←と入力する。
bash: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin: No such file or directory
と表示されればOKである。

ここにつくる ~/Library/Java/Extensions/
2008年02月17日(日) 19:01:47 Modified by shinriyo




スマートフォン版で見る