Linux-Java-Memo.com

木曜日 5 20, 2010

LinuxでのEvernote利用

Evernoteは便利なんだけど、会社での私のメインPCはLinuxなので便利なクライアントソフトが動かない。ブラウザ版は、動きが遅すぎて使う気がしません。Wine+Evernote 3.1も入れてみたけど、検索とかの動きが変。日本語入力も不安定でいまいち。

と、先日ふと気づいたのですが、EvernoteのiGoogleガジェットが結構きびきび動きます。モバイル版と連携しているみたいで、それが高速ということか。知らんかった。これで結構便利に使えそうです。

火曜日 12 15, 2009

mod_auth_imapモジュールで認証

mod_auth_imap
ここの、version 2を利用した。

  • mod_auth_imap2-current.tar.gzをダウンロードして展開
  • READMEにしたがってコンパイル。
    apxs2 -i -c mod_auth_imap.c (-aは付けない)

    ==> /usr/lib/apache2/modules/mod_auth_imap.so が出来る
  • mods-availableにファイルは生成されないので作る (auth_imap.load)
    LoadModule auth_imap_module /usr/lib/apache2/modules/mod_auth_imap.so

  • examples以下を参照して、.htaccessか、httpd.conf or sites-enabled/hoge を編集。
  • ここで、apache2を再起動してアクセスしてもエラーになる。
    ==> こちらを参照して Alternative authentication methods with Apache 2.2
     設定に AuthBasicAuthoritative offを追加。
  • 認証成功するが、まだerror.logに “Internal error: pcfg_openfile() called with NULL filename” と表示される。こちらを参照して、
    ==> AuthUserFile /dev/null も追加。これでやっと解決。

火曜日 7 14, 2009

trac-ja 0.11.4ja インストールメモ

debian lenny に trac-ja 0.11.4ja インストールした時のメモ。
http://trac.edgewall.org/wiki/TracInstall に従って必要パッケージをインストール

  • apache2との連携はmod_wsgiにしてみた。
  • git使うつもりなのでsubversionは入れない。
  • setup.py install ... とやると、/usr/bin/にインストールされるので注意。 --prefix=~/usr/localを忘れずに
  • mod_auth_mysqlで認証 ... debian lennyパッケージでの設定パラメータがよくわからなかったが、こちらに書いてある。
  • WYSIWYGエディタplugin インストール
  • git plugin インストール

OpenPNE 3.0.xのインストールメモ

OpenPNE 3.0.xを入れてみたので、その時のメモを。結局3.0.xではまだあまりプラグインとか充実していないようで、資料も少ないみたいでしたので、2.12.xxを入れなおしました。

  • ベースはdebian lenny
  • apache2,php5,php5-cli,mysql(5.0) インストール
  • http://www.openpne.jp/openpne3_setup_guide/ に従って作業
  • ./symfony openpne:install を実行するとFatal Error: で終了する。
    PHPのmemory_limitが原因 /etc/php5/cli/php.iniの memory_limit = 128M にして再実行した。
    途中、なにやら2個くらいエラーメッセージが出る。
    • エラー1: mysqlのアクセス権の設定して解決
    • エラー2: proxy経由でプラグインのダウンロードが出来ない
      → http://trac.openpne.jp/ticket/3768 ... config/ProjectConfiguration.class.php内で sfConfig::set('op_http_proxy','host:port');
  • mod_rewrite を有効にする:  a2enmod rewrite
  • .htaccess内、  RewriteBaseを適切に設定(絶対URL)

金曜日 5 29, 2009

Ubuntuのサポート終了版の置き場所

ubuntu 7.10(gutsy)でapt-get update出来なくなっていたので、sources.listを修正。ubuntuの場合は、

jp.archive.ubuntu.com/ubuntu gutsy ...
==> old-releases.ubuntu.com/ubuntu gutsy ...
とやるらしい。

水曜日 10 22, 2008

logcheck - Security Eventsの検出条件/無視条件

例えばsudoコマンドであれば、

抽出条件は
/etc/logcheck/violations.d/sudo
無視条件は
/etc/logcheck/violations.ignore.d/logcheck-sudo
に記述する。

金曜日 9 19, 2008

scpやrsyncの帯域制御

大きなファイル転送などで、あまり負荷をかけずに行いたい時

scp -l limit (limits the used bandwidth: Kbit/s)
rsync --bwlimit  (limits I/O bandwidth: KBytes/s)

dumpコマンドによるバックアップ

こんな感じでファイルにバックアップ出来るらしい

dump -0f - /dev/hda1 2>> /tmp/backup.log | gzip > /tmp/backup_hda1.gz
参照

水曜日 8 20, 2008

Emacs Manual: Rectangles

C-x r k
Kill the text of the region-rectangle, saving its contents as the "last killed rectangle" (kill-rectangle).
C-x r d
Delete the text of the region-rectangle (delete-rectangle).
C-x r y
Yank the last killed rectangle with its upper left corner at point (yank-rectangle).
C-x r o
Insert blank space to fill the space of the region-rectangle (open-rectangle). This pushes the previous contents of the region-rectangle rightward.
M-x clear-rectangle
Clear the region-rectangle by replacing its contents with spaces.
M-x delete-whitespace-rectangle
Delete whitespace in each of the lines on the specified rectangle, starting from the left edge column of the rectangle.
C-x r t string RET
Replace rectangle contents with string on each line. (string-rectangle).
M-x string-insert-rectangle RET string RET
Insert string on each line of the rectangle.

引用元: GNU Emacs Manual 

火曜日 5 27, 2008

UbuntuマシンへのSSHログイン

Ubuntuマシンへ公開鍵認証でSSHログインする時は、DSA鍵じゃないとダメ?

RSA鍵では、パスワードを求められてしまいます。
SSH - Community Ubuntu Documentation の例を見ると、DSAで作成するよう記述されており、
そのとおりやったところ、正常にログイン出来ました。

/etc/ssh/sshd_configには、
RSAAuthentication yes

と書かれているのに?

ところで、公開鍵をコピーするのに、

ssh-copy-id -i ~/.ssh/id_dsa.pub root@fileserver01
とやればいいんですね。知らなかった。便利。

木曜日 3 20, 2008

ubuntu: s2diskの設定



日経Linux 2008.4号より

sudo dpkg-reconfigure uswsusp

  • 「続行しますか」 yes
  • 「デバイス・ノード」 Enter
  • 「チェック・サム」「圧縮」「早めの書き出し」 yes
  • 「イメージの推奨サイズ」「ログのレベル」「最大ログのレベル」 Enter
  • 「レジュームに利用するスワップ領域」 UUID...項目にカーソルがある場合、/dev/sda5などに変更
  • 「暗号化」 no
  • 「スプラッシュ」 yes

終了後
  • sudo mkdir /etc/hibernate
  • sudo gedit /etc/hibernate/hibernate.conf
    一番上の行に、  TryMethod ususpend-disk.conf

火曜日 3 18, 2008

Bluetoothでファイル転送に成功



この辺りを読んで、Bluetoothで携帯からのファイル転送に成功。簡単でした。

Ubuntuだと、Bluetoothにしろ、D02HWにしろ、ほとんど標準のままで使えてしまいますね。Windows系より楽ちん。Bluetoothマウスを物色中。

火曜日 2 19, 2008

メモ: mountいろいろ



  • samba共有フォルダのマウント
    mount -t smbfs -o username=hoge,password=hoge //hoge/hoge ~/mnt/
  • EUCでアクセスしているパーティションのマウント?
    mount -t vfat  -o codepage=932 /dev/sda1 ~/media/disk

木曜日 2 07, 2008

sh: 拡張子の判定



case $1 in
    *.gz)
       echo "gz"
       ;;
    *)
       echo "else"
       ;;
esac

ntpサーバの設定



/etc/ntp.conf: 上位(マスタ)サーバの設定

server 127.127.1.1 prefer
fudge  127.127.1.1
下位マスタの設定
server <上位のIPアドレス> prefer
server 127.127.1.1
fudge  127.127.1.1
スレーブの設定
server <上位マスタ>
server <下位マスタ>



Calendar

tags

Feeds

Search

Links