ssk’s posterous

ssk’s posterous

Nov 18 / 9:11pm

悪文:[ECLIPSE][ANT]Unable to find a javac compilerエラーの解決 - livedoor Blog(ブログ)

by ssk
要は、build.xmlのjavacタスクのところに、fork="true"を追加すればよいようだ。

ubuntu 8.04lts では大丈夫だったけど squeeze での make 時にエラーでこけたので。sun-java5-jdk ではなく sun-java6-jdk だったからであろうか

Filed under  //  debian   java   squeeze  

Comments (0)

Sep 1 / 2:58am

sysklogdの設定方法 @sarunoie

by ssk
sysklogdの設定方法

Debianでlogrotateを使ってログを保存したいのにsyslogが勝手にrotateしてしまうという現象に遭遇した。

ソースを読んだりしてようやく解決

syslogは/etc/cron.dailyと/etc/cron.weeklyのsysklogdというスクリプトでログを回している。

sysklogdは/usr/sbin/syslogd-listfilesを読んでリストアップされたファイルをrotate。

syslogd-listfilesは/etc/syslog.confを読んで含まれているログファイルをリストアップ。

sysklogdで回転させないようにするにはsysklogd内のsyslogd-listfilesに-sで除外を指定するとOK。
例えばmail.infoを除外させたい場合には

for LOG in `syslogd-listfiles -s "mail.info"`

で除外可能。

複数指定したい場合には

for LOG in `syslogd-listfiles -s "mail.info|uucp.log"`

と|で区切れば良い。

Filed under  //  debian   linux  

Comments (0)

Aug 16 / 10:22pm

pdnsd installation failed on debian lenny

by ssk
未選択パッケージ pdnsd を選択しています。
(データベースを読み込んでいます ... 現在 42724 個のファイルとディレクトリがイン ストールされています。)
(.../pdnsd_1.2.6-par-11_i386.deb から) pdnsd を展開しています...
未選択パッケージ resolvconf を選択しています。
(.../resolvconf_1.42_all.deb から) resolvconf を展開しています...
man-db のトリガを処理しています ...
pdnsd (1.2.6-par-11) を設定しています ...
Starting pdnsd failed!
invoke-rc.d: initscript pdnsd, action "start" failed.
dpkg: pdnsd の処理中にエラーが発生しました (--configure):
 サブプロセス post-installation script はエラー終了ステータス 1 を返しました
resolvconf (1.42) を設定しています ...
mkdir: created directory `/lib/init/rw/resolvconf'
mkdir: created directory `/lib/init/rw/resolvconf/interface'
以下のパッケージの処理中にエラーが発生しました:
 pdnsd
E: Sub-process /usr/bin/dpkg returned an error code (1)
パッケージをインストールできませんでした。復旧を試みています:
pdnsd (1.2.6-par-11) を設定しています ...
Starting pdnsd failed!
invoke-rc.d: initscript pdnsd, action "start" failed.
dpkg: pdnsd の処理中にエラーが発生しました (--configure):
 サブプロセス post-installation script はエラー終了ステータス 1 を返しました
以下のパッケージの処理中にエラーが発生しました:
 pdnsd
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
拡張状態情報を読み込んでいます
パッケージの状態を初期化しています... 完了
拡張状態情報を書き込んでいます... 完了
タスクの記述を読み込んでいます... 完了
Filed under  //  debian   powerdns  

Comments (1)

Jul 23 / 12:30am

AWS 雑多なメモ - 雑多なメモ Wiki版

by ssk
  • EC2 での /etc/hosts と hostname
debian, ubuntu 方面で厳密化している localhost と hostname の扱いを考えると、EC2 の プライベート IP アドレス空間での /etc/hosts は Canonical 版 ubuntu ami の /usr/sbin/ec2-set-hostname で設定しているやりかたが妥当な所かな
127.0.0.1 localhost
127.0.1.1 AMIのlocal-hostname(AMI instance Metadata から取得)

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
また、hostname は hostname --fqdn で取得したホスト名を DNS を引けば、現在の ローカル IP アドレス を引けるものを設定する事。つまり、AMIのlocal-hostname(AMI instance Metadata から取得)を hostname とする。

Filed under  //  debian   ubuntu  

Comments (0)

Jul 18 / 1:59am

nginx config file

by ssk

> $ cat /etc/nginx/sites-available/default
> # You may add here your
> # server {
> #       ...
> # }
> # statements for each of your virtual hosts
>
> server {
>         listen   80;
>         server_name  localhost;
>
>         access_log  /var/log/nginx/localhost.access.log;
>
> #       location / {
> #               root   /var/www/nginx-default;
> #               index  index.html index.htm;
> #       }
>
>         location /doc {
>                 root   /usr/share;
>                 autoindex on;
>                 allow 127.0.0.1;
>                 deny all;
>         }
>
>         location /images {
>                 root   /usr/share;
>                 autoindex on;
>         }
>
>         #error_page  404  /404.html;
>
>         # redirect server error pages to the static page /50x.html
>         #
>         error_page   500 502 503 504  /50x.html;
>         location = /50x.html {
>                 root   /var/www/nginx-default;
>         }
>
>         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
>         #
>         #location ~ \.php$ {
>                 #proxy_pass   http://127.0.0.1;
>         #}
>
>         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
>         #
>         #location ~ \.php$ {
>                 #fastcgi_pass   127.0.0.1:9000;
>                 #fastcgi_index  index.php;
>                 #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
>                 #includefastcgi_params;
>         #}
>
>         # deny access to .htaccess files, if Apache's document root
>         # concurs with nginx's one
>         #
>         #location ~ /\.ht {
>                 #deny  all;
>         #}
>
>         location / {
>                 proxy_pass http://127.0.0.1:8000;
>                 proxy_redirect     off;
>                 proxy_set_header   Host             $host;
>                 proxy_set_header   X-Real-IP        $remote_addr;
>                 proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
>
>         }
> }
>
>
> # another virtual host using mix of IP-, name-, and port-based configuration
> #
> #server {
> #listen   8000;
> #listen   somename:8080;
> #server_name  somename  alias  another.alias;
>
> #location / {
> #root   html;
> #index  index.html index.htm;
> #}
> #}
>
>
> # HTTPS server
> #
> #server {
> #listen   443;
> #server_name  localhost;
>
> #ssl  on;
> #ssl_certificate  cert.pem;
> #ssl_certificate_key  cert.key;
>
> #ssl_session_timeout  5m;
>
> #ssl_protocols  SSLv2 SSLv3 TLSv1;
> #ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
> #ssl_prefer_server_ciphers   on;
>
> #location / {
> #root   html;
> #index  index.html index.htm;
> #}
> #}

Filed under  //  debian   nginx  

Comments (0)

Jun 12 / 12:59am

debianmeetingresume2005-natsu.pdf (application/pdf オブジェクト)

by ssk

pdf の引用テスト

Filed under  //  debian   pdf  

Comments (0)

Jun 11 / 11:20pm

Debian GNU/Solarisという選択肢 - @IT

by ssk
ZFSを含めて、OpenSolarisのコードはCDDLというライセンス形態で配布されている。GNUプロジェクトの解説によれば、「(CDDLと)GNU GPLとは矛盾します。そこで、GPLで保護されたモジュールとCDDLで保護されたモジュールは合法的に一緒にリンクすることができません」とされている。このため、互いにオープンソースでありながら、LinuxでZFSが利用できないということになっている(それ故にLinux上にZFSを移植したものは、カーネルに組み込む形ではなく、ユーザー空間で動かすファイルシステム「FUSE」(Filesystem in Userspace)を利用する形になっている)。

zfs 使うなら solaris 系ですね

Filed under  //  debian  

Comments (0)

Apr 21 / 12:12am

Installation PostfixAdmin to Debian Lenny Part.3

by ssk

php5-mysql install.

ssk@debonvm01 src $ sudo aptitude install php5-mysql
ssk@debonvm01 src $ sudo /usr/sbin/apache2ctl configtest
Syntax OK
ssk@debonvm01 src $ sudo /usr/sbin/apache2ctl graceful

run
http://devonvm01/postfixadmin/setup.php
and create superadmin account.
 
and move setup.php

ssk@debonvm01 src $ sudo mv /usr/share/postfixadmin/setup.php ~/.setup.php
Filed under  //  debian   postfix  

Comments (0)

Apr 20 / 11:49pm

Installation PostfixAdmin to Debian Lenny Part.2

by ssk

ssk@debonvm01 src $ cat /etc/apache2/sites-available/default

    ServerAdmin webmaster@localhost
 
    DocumentRoot /var/www/
    
        Options FollowSymLinks
        AllowOverride None
    
    
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    
 
  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
 
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    
 
  ErrorLog /var/log/apache2/error.log
 
  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel warn
 
  CustomLog /var/log/apache2/access.log combined
 
  Alias /doc/ "/usr/share/doc/"
 
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
  
 
  Alias /postfixadmin/ "/usr/share/postfixadmin/"
 

 
ssk@debonvm01 src $ sudo /usr/sbin/apache2ctl configtest
Syntax OK
ssk@debonvm01 src $ sudo /usr/sbin/apache2ctl graceful
 
 
ssk@debonvm01 src $ mysql -uroot -h localhost
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 44
Server version: 5.0.51a-24-log (Debian)
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql> create database postfixadmin;
Query OK, 1 row affected (0.16 sec)
 
mysql> grant all on postfixadmin.* to postfixadmin@'localhost'
identified by 'foobar';
Query OK, 0 rows affected (1.51 sec)
 
mysql>
 
ssk@debonvm01 src $ diff -u /etc/postfixadmin/config.inc.php.org
/etc/postfixadmin/config.inc.php
--- /etc/postfixadmin/config.inc.php.org 2009-04-19
05:24:51.000000000 +0900
+++ /etc/postfixadmin/config.inc.php 2009-04-21 15:48:33.000000000 +0900
@@ -29,7 +29,7 @@
 * Doing this implies you have changed this file as required.
 * i.e. configuring database etc; specifying setup.php password etc.
 */
-$CONF['configured'] = false;
+$CONF['configured'] = true;
 
 // In order to setup Postfixadmin, you MUST specify a hashed password here.
 // To create the hash, visit setup.php in a browser and type a password
into the field,
@@ -39,14 +39,14 @@
 // Postfix Admin Path
 // Set the location of your Postfix Admin installation here.
 // YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin
-$CONF['postfix_admin_url'] = '';
+$CONF['postfix_admin_url'] = 'http://devonvm01/postfixadmin';
 
 // shouldn't need changing.
 $CONF['postfix_admin_path'] = '/usr/share/postfixadmin';
 
 // Language config
 // Language files are located in './languages', change as required..
-$CONF['default_language'] = 'en';
+$CONF['default_language'] = 'ja';
 
 // Database Config
 // mysql = MySQL 3.23 and 4.0, 4.1 or 5
@@ -54,9 +54,9 @@
 // pgsql = PostgreSQL
 $CONF['database_type'] = 'mysql';
 $CONF['database_host'] = 'localhost';
-$CONF['database_user'] = 'postfix';
-$CONF['database_password'] = 'postfixadmin';
-$CONF['database_name'] = 'postfix';
+$CONF['database_user'] = 'postfixadmin';
+$CONF['database_password'] = 'foobar';
+$CONF['database_name'] = 'postfixadmin';
 $CONF['database_prefix'] = '';
 
 // Here, if you need, you can customize table names.
@@ -79,7 +79,7 @@
 // Site Admin
 // Define the Site Admins email address below.
 // This will be used to send emails from to create mailboxes.
-$CONF['admin_email'] = 'postmaster@change-this-to-your.domain.tld';
+$CONF['admin_email'] = 'admin@devonvm01';
 
 // Mail Server
 // Hostname (FQDN) of your mail server.
@@ -129,10 +129,10 @@
 // Default Aliases
 // The default aliases that need to be created for all domains.
 $CONF['default_aliases'] = array (
- 'abuse' => 'abuse@change-this-to-your.domain.tld',
- 'hostmaster' => 'hostmaster@change-this-to-your.domain.tld',
- 'postmaster' => 'postmaster@change-this-to-your.domain.tld',
- 'webmaster' => 'webmaster@change-this-to-your.domain.tld'
+ 'abuse' => 'abuse@devonvm01',
+ 'hostmaster' => 'hostmaster@devonvm01',
+ 'postmaster' => 'postmaster@devonvm01',
+ 'webmaster' => 'webmaster@devonvm01'
 );
 
 // Mailboxes
@@ -182,7 +182,7 @@
 // This is the autoreply domain that you will need to set in your Postfix
 // transport maps to handle virtual vacations. It does not need to be a
 // real domain (i.e. you don't need to setup DNS for it).
-$CONF['vacation_domain'] = 'autoreply.change-this-to-your.domain.tld';
+$CONF['vacation_domain'] = 'autoreply.devonvm01';
 
 // Vacation Control
 // If you want users to take control of vacation set this to 'YES'.
@@ -247,14 +247,14 @@
 $CONF['header_text'] = ':: Postfix Admin ::';
 
 // link to display under 'Main' menu when logged in as a user.
-$CONF['user_footer_link'] = "http://change-this-to-your.domain.tld/main";
+$CONF['user_footer_link'] = "http://devonvm01/postfixadmin/main";
 
 // Footer
 // Below information will be on all pages.
 // If you don't want the footer information to appear set this to 'NO'.
 $CONF['show_footer_text'] = 'YES';
-$CONF['footer_text'] = 'Return to change-this-to-your.domain.tld';
-$CONF['footer_link'] = 'http://change-this-to-your.domain.tld';
+$CONF['footer_text'] = 'Return to devonvm01';
+$CONF['footer_link'] = 'http://devonvm01/postfixadmin';
 
 // Welcome Message
 // This message is send to every newly created mailbox.

Filed under  //  debian   postfix  

Comments (0)

Apr 20 / 11:23pm

Installation PostfixAdmin to Debian Lenny

by ssk

from history.

 525 wget
http://jaist.dl.sourceforge.net/sourceforge/postfixadmin/postfixadmin_2.3rc4_all.deb
 526 sudo dpkg -i postfixadmin_2.3rc4_all.deb
 527 sudo aptitude install libapache2-mod-php5
Filed under  //  debian   postfix  

Comments (0)