Shammer's Philosophy

My private adversaria

Debian

Using IP address as Apache ServerName directive

This blog is a feedback to Shammerism. I would like to use IP address as Apache ServerName directive. This blog is steps how to use IP address as ServerName. Adding IP address to /etc/hosts Adding ServerName directive to /etc/apache2/site-…

Could not reliably determine the server's fully qualified domain name

When restarting apache2 in my VPS, this message is always output. Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName ... waiting apache2: apr_sockaddr_info_get() failed for XXXXXXXXXX mean…

How to get Linux Hardware/System Information?

We can get Linux Hardware information like Serial Number without launching BIOS, via Linux OS. The command "dmidecode" enables this action. Here is an output example. root@MyMachine:~# dmidecode # dmidecode 2.11 SMBIOS 2.7 present. 56 stru…

SSH login delay

Some of my virtual machines running on Xen take a few seconds to login via SSH. This might be since that disabling management eth0's ipv6 disabled. There is no problem after logged in. Only login, it is a little bit slow, it takes more tha…

Enable PAM on Radius

About this article This is a consecutive article of Radius Install & Basic Configuration - Shammerism. This is a description how to use PAM on Radius authentication. Enable PAM procedure At default, PAM authentication is disabled. Editing …

Radius Install & Basic Configuration

About this article On Debian, there is a free package running Radius, named freeradius. This is an article to install freeradius and basic configuration. Install Install is very easy. There is an apt package, so executing some commands com…

curl message displayed after received chunked response

curl displays following message after receiving chunked response. # curl -v X.X.X.X * Rebuilt URL to: X.X.X.X/ * Hostname was NOT found in DNS cache * Trying X.X.X.X... * Connected to X.X.X.X (X.X.X.X) port 80 (#0) > GET / HTTP/1.1 > User-…

Static routing

Debian で Static Routing を定義するサンプル。10.10.0.0/24 のネットワークに対しては、10.0.0.254 経由でという意味。それ以外は 10.0.0.1 経由でアクセスを試みる。 # The primary network interface auto eth0 iface eth0 inet static address 10.0.0.1…

Install PHP5

I got a new VM yesterday, so I tried to install apache2 and php5. It is very easy. apt-get install apache2 apt-get install php5 configure php5 restart apache2 php test Install apache2 and php5 This is very simple. Exec following commands. …

Using curl as ftp client

Curl can be a ftp client. FTP is required an authentication. The option -u provides an user account and password to log in. $ curl -u user:password ftp://192.168.1.10/If path begins // instead of / like ftp://192.168.1.10//, this syntax se…

How to check the HTTP header?

The command line tools, curl has a -v option. This is very useful because all HTTP request and response header displays. The response header value is depends on the web server configuration. This is just sample to Debian squeeze apache res…

How to get html required authentication by curl?

The command "curl" has a -c option and -b option. The option -c makes cookie filed into local disk. And the option -b is used the cookie file to connect web server. Then, the option -d enables to send post data. So, the following steps ena…

Debian(wheezy)で Xen を使って VM を動かす

背景 以下の記事で、wheezy を Xen の Domain-0 として動作させるための準備を進めてきた。 Linux(Debian wheezy) で VLAN を利用する - Shammerism bridge を利用する - Shammerism VLAN の定義 - Shammerism Debian(wheezy) に Xen をインストール - Shamm…

Debian(wheezy) に Xen をインストール

背景 最終的には、 このホストを Xen の Domain-0 として動作させる 管理用のネットワークと検証用のネットワークを用意する Domain-0 を含めた全ての VM が両方のネットワークに接続可能にする 検証用ネットワークは Tag VLAN なので、検証用ネットワークは…

VLAN の定義

背景 以下の記事、 bridge を利用する - Shammerismでブリッジの設定をした。最終的には、 このホストを Xen の Domain-0 として動作させる 管理用のネットワークと検証用のネットワークを用意する Domain-0 を含めた全ての VM が両方のネットワークに接続可…

bridge を利用する

最終構成について 昨日の記事 Linux(Debian wheezy) で VLAN を利用する - ShammerismでVLAN の設定をやってみたが、最終的な目標は NIC 2枚挿しで Debian をインストール 片方の NIC は管理用ネットワークに接続、もう一方の NIC は検証用ネットワークへ接…

Linux(Debian wheezy) で VLAN を利用する

コマンドを使用する場合 apt-get install vlan とやると、vconfig というコマンドが利用可能になる。このコマンドを使用することで NIC を vlan 対応にできるみたいだ。 # vconfig add eth0 10 Added VLAN with VID == 10 to IF -:eth0:-削除は rem を使う。…

change cookie by curl command

What is curl? This means cURL. Maybe URL client. This command has a lot of options which enable to control http access in detail. Most Basic command The most basic curl command is below. curl http://www.example.com/This command only get an…

ルーティングテーブル

ルーティングについて、これまでは言葉しか知らなかったが、業務内容の都合上、一歩深い理解を求められるようになった。具体的には、 一つの OS が複数の NIC を認識する それぞれの NIC がそれぞれ別のネットワークへつながっている デフォルトゲートウェイ…

cronでrsyncが動作しない

Debian 環境で定期バックアップのために rsync を cron で動かすようにしたのだがうまくいかない。実施コマンドは以下の通り。 rsync -ave ssh $BACKUP_TARGET $REMOTE_USER@$REMOTE_HOST:$BACKUP_DIRECTORY$ の情報は実際の環境依存値が入る。そして、cron …

Emacsでkill-ringとClipboardを分離-Linux編

SimpleClipを使用してkill-ringとClipboardを分離する方法を以前見つけたが、Debian環境でこれをやるとCopy & Paste が文字化けするようになった。英数字は問題ないけれども日本語とかのマルチバイト文字はNG。これでは困るのでどうしようかと思っていたが、…

iptables auto configuration

Debianで宛先ごとにルートを変更する - Shammerismで作成した iptables-save のファイルは複数のインタフェースごとに設定される内容。そのため、/etc/network/interfacesで、それぞれのインタフェースごとにpre-up iptables-restore そこで、別の方法を調査…

Debianで宛先ごとにルートを変更する

概要 Debian Router 化計画 - Shammerismでは、Debianをルーターのように動作させる設定をやってみた。ルーターではないが、宛先ごとに使用するインタフェースを変更したい(ルートを変えたい)。 構成としては、インタフェースを複数持っているDebianで、宛先…

DebianにEmacs24.2をインストール

参考サイトは以下。 Compiling Emacs on Debian Roy's musings: Installing Emacs 24.1 libjpeg-devのスペルが違う点以外はほぼ問題なかった。 apt-get install ttf-inconsolata apt-get install build-essential apt-get install xorg-dev apt-get install …

ssh known_hosts の確認、更新

検証環境で SSH を使っていると、否が応でも known_hosts が肥大化していく。そして、known_hosts のマシンが再インストールされたりすると、うまく接続できなくなったりする。そういうときには、known_hosts の情報を確認したり、削除したりする必要がある…

Common Lisp UDP Server 自動起動スクリプト Ver.20121225

自動起動スクリプトの作成 - Shammerismで書いた自動起動スクリプトを自作の/etc/init.d/XXXで起動したらbackgroundで動作しない - Shammerismで修正したが、さらにこのスクリプトを修正。pid ファイルの生成がうまく行っていなかったのと、停止時処理を適切…

Debian Squeeze でのSSH公開鍵認証設定

Cygwinでの方法を Cygwin SSHの公開鍵認証でXenServerへ接続 - Shammerismでまとめたので、Debian Squeeze 版(たまたま試したのがこの環境なだけで、CentOSとかでも問題ないはず)も書くことにした。ほとんど同じだが。 ssh-keygen -t rsa save the key to …

自作の/etc/init.d/XXXで起動したらbackgroundで動作しない

自動起動スクリプトの作成 - Shammerismで作成した UDP サーバーを、/etc/init.d/ 配下に作成したその UDP サーバ用の起動スクリプトで start するとフォアグラウンドで動作する。/etc/init.d/skeleton の start−stop−daemon が --background オプションがな…

自動起動スクリプトの作成

Lisp UDP Server 改 - Shammerismで作成した簡易UDPサーバを自動起動させたいと思う。その手順を整理する。大枠としては以下の作業になる。 lisp ファイルをコンパイルしてバイナリにする /etc/init.d/skeleton をコピーして編集 lisp ファイルをコンパイル…

文字化けファイル名を mv したい

Windows から Linux サーバへアップロードされたファイルで文字化けが発生することがよくある。そうすると、普通に mv しても、No such file or directory になる。。。 この場合の対処。 ls -li で対象ファイルの inode を調べる mv `ls -li | grep $INODE …