PC/NETのetcetra/2007-04-02 の変更点

※※このサイトは2012年頃より更新を停止しています。※※

職場や様々な場面でメモったことの転載。
ずいぶんほったらかしにしてたから溜まってた。
まだあるけど、とりあえず部分的に処理。

**ちょい
- CentOSのup2dateの取得パッケージの格納先 > /var/spool/up2date
- ブログCGI Serene Bach(sb) [[脆弱性報告>http://www.ipa.go.jp/security/vuln/documents/2006/JVN_65500885.html]]

**Avast4のウィルス該当ファイルの退避先
 C:\Program Files\Alwil Software\Avast4\DATA\moved

**debian系のapache suexec
[[apache-ssl はデフォルトで suEXEC が効かない>http://www.jp-z.jp/changelog/2006-07-23.html]]とか。

**フレームワーク
[[ITpro - Java,.NET,スクリプト言語のフレームワーク>http://itpro.nikkeibp.co.jp/article/lecture/20070205/260732/?ST=oss]]
***PHP
5大フレームワークなんだと。
-「symfony」
安定バージョン1.0.0のリリース間近なんだと。(2006-12現在)
-「Zend Framework」
-「Ethna」
日本発で、GREEの開発に使われてるんだと。
-「Piece Framework」
-「CakePHP」

**レセプトソフト
-''ORCA (オープンソース)''
[[日本医師会総合政策研究機構ORCA>http://www.orca.med.or.jp/]]
[[ORCA project>http://www.orca.med.or.jp/index.rhtml]]

**choのPCのドライバ
[[参考>http://www.geocities.jp/mobile_vp_labo/software.html]]
http://121ware.com/download/pc/module/stupgd/w2000/nx/drv/3MODEJ/3MODEJ.htm

**P2Pと音楽・映像業界
[[DRMの話>http://peer2peer.blog79.fc2.com/blog-entry-249.html]]
[[音楽産業の低迷はP2Pファイル共有のせい?>http://peer2peer.blog79.fc2.com/blog-entry-248.html]]
[[Blu-RayやHD DVDのコピープロテクト規格AACSをクラック>http://peer2peer.blog79.fc2.com/blog-entry-199.html]]

**PostgreSQL
PostgreSQLのコマンドライン操作について。
-psql
 psql -l -h /SOCKET_DIR/ -U USERNAME
↑こんなんとか。
 # /usr/local/bin/psql --help
 This is psql 7.4.8, the PostgreSQL interactive terminal.
 
 Usage:
   psql [OPTIONS]... [DBNAME [USERNAME]]
 
 General options:
   -d DBNAME       specify database name to connect to (default: "root")
   -c COMMAND      run only single command (SQL or internal) and exit
   -f FILENAME     execute commands from file, then exit
   -l              list available databases, then exit
   -v NAME=VALUE   set psql variable NAME to VALUE
   -X              do not read startup file (~/.psqlrc)
   --help          show this help, then exit
   --version       output version information, then exit
 
 Input and output options:
   -a              echo all input from script
   -e              echo commands sent to server
   -E              display queries that internal commands generate
   -q              run quietly (no messages, only query output)
   -o FILENAME     send query results to file (or |pipe)
   -n              disable enhanced command line editing (readline)
   -s              single-step mode (confirm each query)
   -S              single-line mode (end of line terminates SQL command)
 
 Output format options:
   -A              unaligned table output mode (-P format=unaligned)
   -H              HTML table output mode (-P format=html)
   -t              print rows only (-P tuples_only)
   -T TEXT         set HTML table tag attributes (width, border) (-P 
 tableattr=)
   -x              turn on expanded table output (-P expanded)
   -P VAR[=ARG]    set printing option VAR to ARG (see \pset command)
   -F STRING       set field separator (default: "|") (-P fieldsep=)
   -R STRING       set record separator (default: newline) (-P 
 recordsep=)
 
 Connection options:
   -h HOSTNAME     database server host or socket directory (default: 
 "local socket")
   -p PORT         database server port (default: "5432")
   -U NAME         database user name (default: "root")
   -W              prompt for password (should happen automatically)
 
 For more information, type "\?" (for internal commands) or "\help"
 (for SQL commands) from within psql, or consult the psql section in
 the PostgreSQL documentation.
 
 Report bugs to <pgsql-bugs@postgresql.org>.
-createdb
 /usr/bin/createdb -h /SOCKET_DIR/ -U USERNAME -E SJIS kimi_test
↑こんなんとか。
 # /usr/local/pgsql/bin/createdb  --help
 createdb creates a PostgreSQL database.
 
 Usage:
   createdb [OPTION]... [DBNAME] [DESCRIPTION]
 
 Options:
   -D, --location=PATH       alternative place to store the database
   -E, --encoding=ENCODING   encoding for the database
   -O, --owner=OWNER         database user to own the new database
   -T, --template=TEMPLATE   template database to copy
   -e, --echo                show the commands being sent to the server
   -q, --quiet               don't write any messages
   --help                    show this help, then exit
   --version                 output version information, then exit
 
 Connection options:
   -h, --host=HOSTNAME       database server host or socket directory
   -p, --port=PORT           database server port
   -U, --username=USERNAME   user name to connect as
   -W, --password            prompt for password
 
 By default, a database with the same name as the current user is 
 created.
 
 Report bugs to <pgsql-bugs@postgresql.org>.

**fsck (2007-02-03)
ubuntuとxpのデュアルブートにしてるうちのデスクトップに、さらにCentOSも入れた。
ubuntuを起動しようとすると起動時のfsckが
 /dev/hda5: 11613 files, 689157/1310020 clusters
 fsck.ext3: Unable to resolve 'UUID=b8cda766-56d7-4d0b-b336-ff51474d0fe0'
 fsck died with exit status 8
と言ってきた。
っていうか、このPCの/dev/hda5はFAT32なんだけどな。
 A log is being saved in /var/log/fsck/checkfs if that location is writable.
 Please repair the file system manually.
だそうな。
メンテナンスモードのコンソールになってたので、とりあえず
 # reboot
と入力すると(ぉ)、なぜか普通にGUI起動処理が続行。
ユーザ名/パスワードを入力したら無事に使えた。
しかし再度起動を試すと同じ症状に。同じ対処で起動まで持っていけた。
/etc/fstab を覗くと、どうやらデバイス認識の形式が変わっているようで、今までのディストリでは各行の先頭に「/etc/hda5」とか記述されていたはずのところが「UUID=〜ほにゃらら〜」という形式になっている。
調べてみると下記のような参考URLがあった。
[[参考:Messala.net>http://www.messala.net/items/1022/]]
[[参考:gmaxのてけとうなlab.>http://d.hatena.ne.jp/gmaxlab/20061104/1162609696]]
[[参考:TOLLE ET LEGE 屋根裏書庫 本とMacとLinux>http://homepage3.nifty.com/~ynakano/200611.html]]
ということで、fstabを元々の形式に書き直して再起動で解決。
CentOSをインストールした時にデバイスのUUID部分の書き換えがされたとかんとかかな?と勝手に理解した。ほんとかどうかは知らんけど。

**Vector
-''びっくり''
http://www.vector.co.jp/vpack/filearea/unix/
UNIX系ソフトウェアがカテゴリ化されてる!
やっぱずいぶん一般のユーザが増えて流行ってきてるんだね。
-''GsBlog''
http://www.vector.co.jp/soft/unix/net/se308028.html
記事のカテゴリ分類、コメント機能、TrackBack機能、掲示板機能、ファイルアップロード機能などを標準。日本語でのblogサイト構築を前提に開発していますので初めから日本語で使用することができます。 

**muttの設定ファイル
うちのubuntuサーバで使ってる設定ファイルを公開。
ずいぶん前(3年とか)に、どっかを参考にしてつぎはぎ。
各設定項目のちゃんとした意味は知らないことばっかり。
-''~/.mutt/muttrc''
 ### アカウント情報を読込
 source ~/.mutt/localspool
 #source ~/.mutt/mailserver
 
 ### メールボックス
 set spoolfile=/var/spool/mail/$USER
 set mbox_type=MH
 set tmpdir="~/tmp"
 
 ### 文字コードセット
 set charset="UTF-8"
 set send_charset="us-ascii:iso-2022-jp"
 
 ### メールを読む
 set ascii_chars=yes
 set index_format="%4C %Z %{%b %d} %-15.15L|%s"
 # index and pager
 set pager_index_lines=10
 set quote_regexp="^([\t]*[|>])+"
 set tilde=yes
 # header
 ignore *
 unignore date from to cc reply-to subject x-mailer Return-Path
 unignore x-fingerprint x-gpg x-gnupg x-pgp
 unignore X-Mailing-List X-ML-Name
 # mailcap
 auto_view text/enriched text/html
 set mailcap_path="~/.mailcap:/etc/mailcap"
 # スレッド設定
 #folder-hook . 'set sort=threads'
 #folder-hook sent 'set sort=date-sent'
 
 ### メールを書く
 # 送信を延期したメールの保存先フォルダを指定
 #set postponed=+postponed
 
 set abort_nosubject=no
 set attribution=">>> %d, %n さんは書きました:"
 set forward_format="Fwd: %s"
 set sig_dashes=no
 
 set envelope_from
 set mime_forward=no
 
 ### その他
 unset beep
 # 8bit encode(?)をサポートしていないメーラーへの配慮
 #set allow_8bit=no
 set allow_8bit
 
 ### color
 color normal default default
 color status yellow blue
 color error red default
 
 color bold brightdefault default
 color underline white black
 color header blue default ^(From|Subject|Date):
 color indicator black cyan
 color markers green default
 color message blue default
 color search black yellow
 color tilde magenta default
 color tree cyan default
 color quoted default default
 
 ### GnuPG
 set pgp_long_ids=yes
 set pgp_strict_enc=no
 set pgp_verify_sig=ask-no
 set pgp_good_sign="^gpg: 正しい署名:"
-''インクルードファイル''
さらに、上記先頭のsourceでインクルードしてるファイルは下記。
--''~/.mutt/localspool''
 ### メールボックス
 set folder=~/Mail
 set mbox=+inbox
 set record=+sent
 mailboxes ! "+inbox" "+sent"
 # 送信を延期したメールの保存先フォルダを指定(つまりsylpheedの草稿)
 set postponed=+draft
--''~/.mutt/mailserver''
 ### アカウント情報
 set realname="my name"
 set hostname="MyHostName.jp"
 set pop_host="pop://account_name\@MailDomain.jp@pop.ServerName.jp"
 set pop_authenticators="user"
 set pop_pass="Pop_Password"
 set from="account_name@MailDomain.jp"
 
 ### メールボックス
 set folder=~/Mail/
 set mbox=+inbox
 set record=+sent
 mailboxes ! "+inbox" "+sent"
 # 送信を延期したメールの保存先フォルダを指定(つまりsylpheedの草稿)
 set postponed=+draft
 
 ### 署名
 # set signature="~/Mail/account_name/.signature"

**あの職場のCentOSのXOOPSメール通知が文字化けしていた件について。
[[参考:あおたけメモ置き場>http://www.bmath.org/modules/wordpress1/index.php?p=84]]
「XOOPSからメールを送るとサブジェクトが化ける問題の回避」という、まんまなタイトルの記事あり。
MySQLの複数デーモン起動の作業が終わったらじっくり読もう。
できれば直しに行きたい。

**レベルゲートCD2
どうやらこの頃のCCCDによる不正リッピング対策の中には、レベルゲートCD2なんてものがあるらしい。
ExactAudioCopy([[配布サイト>http://www.exactaudiocopy.de/]])

**screenのススメ
http://www.dekaino.net/screen/
少し使い勝手がわかった。
これ超便利。

**RHELとFedoraの相関関係(対応表)
[[参考:Wikipedia「Red Hat Enterprise Linux」>http://ja.wikipedia.org/wiki/Red_Hat_Enterprise_Linux]]
-RHL 6.2 → RHL 6.2E
-RHL 7.2 → RHEL 2.1
-RHL 9→RHEL 3
-FC 3→RHEL 4
-FC 6→RHEL 5(2006年12月リリース予定)

**euc-jp&UTF-8のWebページ混在の工夫
-''MySQLの複数デーモン起動''
--[[4.2. 同じマシン上で複数の MySQL サーバを実行する>http://mirrors.dotsrc.org/mysql/doc/refman/4.1/ja/multiple-servers.html]]
--[[4.2.2. Unix 上で複数のサーバを実行する>http://mirrors.dotsrc.org/mysql/doc/refman/4.1/ja/multiple-unix-servers.html]]
--[[4.2.3. 複数サーバ環境でクライアントプログラムを使用する>http://mirrors.dotsrc.org/mysql/doc/refman/4.1/ja/multiple-server-clients.html]]
--[[4.8.3. mysqld_multi(複数の MySQL サーバを管理するプログラム)>http://mirrors.dotsrc.org/mysql/doc/refman/4.1/ja/mysqld-multi.html]]
--MySQLデーモンの状態確認方法
 mysqladmin -u root -p variables
 mysqladmin -h localhost --port=3306 variables -p
これで、現在起動しているデーモンの各種環境変数(?)を確認できるっぽい。
これと被らないように、datadirとかportとかをmysql_safeで起動するってことでいいのかな?
--実際の起動方法
---mysqld_multiのinitスクリプト
[[参考:わたりんの雑記とLAMPめも>http://yaplog.jp/watarin/archive/53]]
---mysqld_safeをローカルユーザで起動
[[参考:あおたけめも置き場>http://www.bmath.org/modules/wordpress2/index.php?p=21]]
mysqld_multi を使って複数起動するやり方だと、都度root権限でmy.cnf の編集しなきゃいけない雰囲気(正確には全然わからんけど)。
そこで、ローカルユーザのホームディレクトリ配下にmy.cnfとかデータとかログとかを全部置く形でmysqld_safeを実行してしまうのが良いなと。
だからレンタルサーバなんてするときはDBサーバは別マシンにするんだね。
--実際にやった作業の殴り書き。
 ~# /etc/init.d/mysql stop
 ~$ mkdir -p mysqld/datadir
 ~$ chmod 777 -R mysqld
 ~$ cp /etc/mysqld/my.cnf ./.my.cnf
 ~$ vi .my.cnf
 ~$ mysql_install_db --defaults-file=/home/username/.my.cnf  --datadir=/home/username/mysqld/datadir
 ~$ mysqld_safe --defaults-file=/home/username/.my.cnf  --datadir=/home/username/mysqld/datadir &
 ~$ mysqladmin -h 127.0.0.1 --port=3307 variables -u root -p
 ~$ mysqladmin --socket=/home/username/mysqld/mysqld.sock variables -u root -p
 ~$ mysqladmin --socket=/home/username/mysqld/mysqld.sock -u root -p shutdown
 ~# /etc/init.d/mysql start
 ~$ mysqld_safe --defaults-file=/home/username/.my.cnf  --datadir=/home/username/mysqld/datadir &
やっぱりlocalhostではできなかった。
--phpからの呼び出し対象デーモンの指定について
[[参考:mysql_connect>http://de3.php.net/manual/ja/function.mysql-connect.php]]
待ち受けポートが異なるデーモンに対しては、「localhost:3307」とかの表記でいいのか、と思ったら。mysql_connectのリファレンス読むと「localhost指定だとデフォルトのソケット接続に切り替えちゃう」といった記述あり。
これはつまり、複数起動で特別な設定ファイルを読み込ませてポート3307で待ち受けてるデーモンにTCP/IPにより接続したい場合でも、localhostで接続する時はデフォルトのデーモンが持ってるソケットにつないでしまうということっぽい。
「127.0.0.1:3307」と指定すれば、別ポートで待ち受けてるデーモンにつないでくれるかな。
-''1つのLANカードに複数のIPアドレス''
http://search.luky.org/fol.2002/msg00371.html
-''apacheのバーチャルホスト''
http://itbtech.itboost.co.jp/inst/inst_19.php

**フォクすけ*ブログ
http://spreadfirefox.jp/foxkeh/
「プロジェクトFx」っていうシリーズ記事、物語的に、楽しめる。

**ipcalc
http://itpro.nikkeibp.co.jp/article/COLUMN/20061214/256925/
IPアドレスとサブネット・マスクから,ネットワーク・アドレスやブロードキャスト・アドレスを計算できるコマンド。
-$ ipcalc -n 192.168.5.46/28
-$ ipcalc -n 192.168.5.46/28
-$ ipcalc -m 192.168.5.46/28
-$ ipcalc -p 192.168.5.46 255.255.255.240

**画像処理について
***参考URL
-''GIMPユーザーズマニュアル''
--日本語訳
http://www.geocities.jp/gimpfile/gum_jp/index.html
--GIMP Documentation
http://manual.gimp.org/
***ビットマップ画像とベクトル画像
ビットマップ画像はドット絵みたいな、情報を点で扱うもの。
アドベの製品の何かでは「パスツール」ってやつで、描画内容をベクトルで情報を扱うとかなんとか。
-''参考'' - http://cglove.com/8378834E8367838B89E6919C/
ベクトル画像(べくとるがぞう)とは、コンピュータグラフィックスにおける画像の形式のひとつ。画像のそれぞれの部分を線と線で囲まれた面で表現し、それぞれのさまざまな性質、すなわち、線の起終点の位置、曲線であればその曲がり方、太さ、色、それら線に囲まれた面の色、それらの変化のしかたなどを、数値で表すことにより、コンピュータで扱うデータとしたもの。画像を点の集合で表現しようとするビットマップ画像と比べ、拡大、縮小、その他の変形を施しても画像がほとんど劣化しないという特性を持つ。また一般にビットマップ画像よりもデータサイズは小さい。しかしながら、写真のような画像から線や面を抽出して数値化することは現在の技術では困難であり、実際には、はじめからグラフィックソフトを使用してベクトル画像を作成する場合を除いては、画像には使われない。すなわち、イラストには向くが、そのほかの画像には不向きである。逆に、文字のフォントにおいては、拡大や縮小その他の変形が容易なことから、多用される。このようなベクトル画像の手法を用いた文字フォントを「アウトラインフォント」と呼ぶ。
-''Gimp 2.0 におけるパスの使い方'' - [[gimp メモ>http://www.kabipan.com/computer/gimp/]]
ここの「パスの保存と別アプリでの読み込み」って項で、パスだけをエクスポートすることができるとの話がある。
svgというxmlに準拠したフォーマットで出力するそう。
汎用性の高いフォーマットで、ドローアプリケーションのAdobe IllustratorやInkscape などで読み込むことができるそうな。
-''GIMPの教科書。''
長谷川アンナという方による「GIMPの教科書。」って本が刊行されてる。
--「テキストからパスを作成」
+++テキストレイヤー選択
+++文字ツールのオプションにある「テキストからパスを作成」
(この瞬間、レイヤーウィンドウのタブのパスに関するところで、パス化された文字のデータが現れる)
+++オプションの編集モードを「デザイン」にする。
+++変形してパスツールの選択範囲を作成、コピる。
+++別レイヤーで加工する。
--「ボタン作成」
script-Fu > ボタン > 丸ボタン(R)

**音楽ポータルサイト
-リッスンジャパンのRSS
http://i.listen.jp/st/rss/
-muzie(インディーズ&アマチュア)
http://www.muzie.co.jp/
-東芝EMI系のサービスで休止したやつ
http://du-ub.com/
[[参考:impress>http://internet.watch.impress.co.jp/cda/news/2003/08/18/161.html]]

トップ   差分 バックアップ リロード   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS