Linux-Java-Memo.com
LinuxでのEvernote利用
Evernoteは便利なんだけど、会社での私のメインPCはLinuxなので便利なクライアントソフトが動かない。ブラウザ版は、動きが遅すぎて使う気がしません。Wine+Evernote 3.1も入れてみたけど、検索とかの動きが変。日本語入力も不安定でいまいち。
と、先日ふと気づいたのですが、EvernoteのiGoogleガジェットが結構きびきび動きます。モバイル版と連携しているみたいで、それが高速ということか。知らんかった。これで結構便利に使えそうです。
Posted at 11:21午前 5 20, 2010 by pochi in Linux |
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 も追加。これでやっと解決。
Posted at 05:41午後 12 15, 2009 by pochi in Linux |
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 インストール
Posted at 09:49午前 7 14, 2009 by pochi in Linux |
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)
Posted at 09:43午前 7 14, 2009 by pochi in Linux |
Ubuntuのサポート終了版の置き場所
ubuntu 7.10(gutsy)でapt-get update出来なくなっていたので、sources.listを修正。ubuntuの場合は、
jp.archive.ubuntu.com/ubuntu gutsy ...とやるらしい。
==> old-releases.ubuntu.com/ubuntu gutsy ...
Posted at 12:15午後 5 29, 2009 by pochi in Linux |
logcheck - Security Eventsの検出条件/無視条件
例えばsudoコマンドであれば、
- 抽出条件は
- /etc/logcheck/violations.d/sudo
- 無視条件は
- /etc/logcheck/violations.ignore.d/logcheck-sudo
Posted at 09:05午前 10 22, 2008 by pochi in Linux |
scpやrsyncの帯域制御
大きなファイル転送などで、あまり負荷をかけずに行いたい時
scp -l limit (limits the used bandwidth: Kbit/s)
rsync --bwlimit (limits I/O bandwidth: KBytes/s)
Posted at 03:51午後 9 19, 2008 by pochi in Linux |
dumpコマンドによるバックアップ
こんな感じでファイルにバックアップ出来るらしい
dump -0f - /dev/hda1 2>> /tmp/backup.log | gzip > /tmp/backup_hda1.gz参照
Posted at 10:47午前 9 19, 2008 by pochi in Linux |
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
Posted at 09:11午前 8 20, 2008 by pochi in Linux |
UbuntuマシンへのSSHログイン
Ubuntuマシンへ公開鍵認証でSSHログインする時は、DSA鍵じゃないとダメ?
RSA鍵では、パスワードを求められてしまいます。
SSH - Community Ubuntu Documentation の例を見ると、DSAで作成するよう記述されており、
そのとおりやったところ、正常にログイン出来ました。
RSAAuthentication yes
と書かれているのに?
ところで、公開鍵をコピーするのに、
ssh-copy-id -i ~/.ssh/id_dsa.pub root@fileserver01とやればいいんですね。知らなかった。便利。
Posted at 12:00午前 5 27, 2008 by pochi in Linux |
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
Posted at 11:38午前 3 20, 2008 by pochi in Linux |
Bluetoothでファイル転送に成功
この辺りを読んで、Bluetoothで携帯からのファイル転送に成功。簡単でした。
Posted at 10:09午前 3 18, 2008 by pochi in Linux |
メモ: mountいろいろ
- samba共有フォルダのマウント
mount -t smbfs -o username=hoge,password=hoge //hoge/hoge ~/mnt/ - EUCでアクセスしているパーティションのマウント?
mount -t vfat -o codepage=932 /dev/sda1 ~/media/disk
Posted at 10:42午前 2 19, 2008 by pochi in Linux |
sh: 拡張子の判定
case $1 in
*.gz)
echo "gz"
;;
*)
echo "else"
;;
esac
Posted at 07:18午後 2 07, 2008 by pochi in Linux |
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 <下位マスタ>
Posted at 05:58午後 2 07, 2008 by pochi in Linux |