カテゴリ : Debian

2ページ目 / 全3ページ

Debian Sarge で PHP5.1


# PHP5
#deb php5 sarge
deb php5.1 sarge


# aptitude install php5.1 php5.1-gd php5.1-mbstring

$ COLUMNS=112 dpkg -l |grep php5.1
ii  libapache2-mod-php5.1  5.1.4-0.1~sarge1       HTML-embedded scripting language (apache 2.0 module)
ii  php5.1                 5.1.4-0.1~sarge1       server-side, HTML-embedded scripting language (meta-package)
ii  php5.1-cgi             5.1.4-0.1~sarge1       HTML-embedded scripting language (CGI binary)
ii  php5.1-cli             5.1.4-0.1~sarge1       command-line interpreter for the PHP 5.1 scripting language
ii  php5.1-common          5.1.4-0.1~sarge1       common files for packages built from the php5.1 source
ii  php5.1-gd              5.1.4-0.1~sarge1       GD module for PHP 5.1
ii  php5.1-mbstring        5.1.4-0.1~sarge1       mbstring module for PHP 5.1
ii  php5.1-mysql           5.1.4-0.1~sarge1       MySQL module for PHP 5.1
ii  php5.1-session         5.1.4-0.1~sarge1       session module for PHP 5.1
ii  php5.1-sqlite          5.1.4-0.1~sarge1       SQLite module for PHP 5.1

Debian GNU/Linux に Zope ,Plone のインストール


# aptitude install zope zope2.7


dpkg: zope の読み込みエラーです(--configure):
 サブプロセス post-installation script はエラー終了ステータス 22 を返しました。。

# zopectl pcgi
Creating PCGI resource file for default... done.
# zopectl init
Initializing Zope instance home for default... done.
# zopectl access
Setting up initial user for default...Password: パスワードを入力
Verify password: パスワードを入力

# aptitude install zope


# aptitude install plone


# /etc/init.d/zope start




ユーザ名 Admin
パスワード zopectl access を行った際に入力したパスワード


1. [Root Folder] - [acl_users] をクリック
2. [Add...] をクリック
3. ユーザ名,パスワードを入力,Domains は空,Rolesはとりあえずすべて選択し,[Add]をクリック.
4. ログアウトして,作成したユーザで再ログイン.

Plone を設定

1. 右ペインの[Add Product]の左のメニューから[Plone Site]を選択し,[Add Product]をクリック.
2. IDに適当な名前を入力し,[Add Plone Site]をクリック.入力したID でアクセスできるようになる.
3. 左ペインの[Refresh]をクリックすると,左ペイン内に[plone]が現れる.

Reference - 運営スタッフblog - Debian GNU/Linux SargeにZopeとPloneをインストールする

jigdo を利用して Debian GNU/Linux を 最新のパッケージ,カーネルでインストールする


jigdo を利用すると,最新のパッケージ,カーネルのISOイメージを簡単に作成できる.


1. インストールCDの作成

# aptitude install jigdo-file
% jigdo-lite


Jigsaw Download "lite"
Copyright (C) 2001-2004  |  jigdo@
Richard Atterer          |
Getting mirror information from /etc/apt/sources.list

To resume a half-finished download, enter name of .jigdo file.
To start a new download, enter URL of .jigdo file.
You can also enter several URLs/filenames, separated with spaces,
or enumerate in {}, e.g. `http://server/cd-{1_NONUS,2,3}.jigdo'

Downloading .jigdo file

Enter のみ入力.

Images offered by `':
  1: 'Debian GNU/Linux 3.1 r1 "Sarge" - Official i386 Binary-1 CD' (debian-31r1-i386-binary-1.iso)

Further information about `debian-31r1-i386-binary-1.iso':
Generated on Tue, 20 Dec 2005 00:33:52 +0100

If you already have a previous version of the CD you are
downloading, jigdo can re-use files on the old CD that are also
present in the new image, and you do not need to download them
again. Mount the old CD ROM and enter the path it is mounted under
(e.g. `/mnt/cdrom').
Alternatively, just press enter if you want to start downloading
the remaining files.
Files to scan:

/etc/apt/sources.list から1行目のデータが使用されるのか,
デフォルトで になっていた.

ここで,jp と入力すると,日本のミラーサイトの一覧が表示される.

The jigdo file refers to files stored on Debian mirrors. Please
choose a Debian mirror as follows: Either enter a complete URL
pointing to a mirror (in the form
`'), or enter any regular expression
for searching through the list of mirrors: Try a two-letter
country code such as `de', or a country name like `United
States', or a server name like `sunsite'.
Debian mirror []:

Downloading .template file


Merging parts from `file:' URIs, if any...
Found 0 of the 1190 files required by the template
Will not create image or temporary file - try again with different input files


Found 1 of the 1 files required by the template
Successfully created `debian-31r1-i386-binary-1.iso'

The fact that you got this far is a strong indication that `debian-31r1-i386-binary-1.iso'
was generated correctly. I will perform an additional, final check,
which you can interrupt safely with Ctrl-C if you do not want to wait.

OK: Checksums match, image is good!




2. ISOイメージを焼く
Windows でイメージを焼くには,CD Manipulator を利用する.
  - 下段左から二番目をクリック
  - トラックリストタブをクリック
  - メニューバーのトラック -> iso ファイルの挿入
  - CD の書き込み

3. インストール


Sarge(Debian) をインストールしよう CD編
jigdo (Jigsaw Download) - a download manager for CD/DVD images

Debian で Apache2 + SSL


Apache2 で SSL を導入する.
[2006-11-09] 変更.
[2008-06-18] 変更.


1. 鍵の生成
2. SSL用 confファイル作成
3. VirtualHost とSSLモジュールの有効化
4. apache の再起動

/usr/share/ssl-cert/ssleay.cnf をコピーする

# cd /usr/share/ssl-cert
# cp ssleay.cnf custom.cnf
# vi custom.cnf

/usr/share/ssl-cert/custom.cnf を編集


/etc/apache2/ssl/apache.pem を作成

# mkdir /etc/apache2/ssl
# make-ssl-cert /usr/share/ssl-cert/custom.cnf /etc/apache2/ssl/apache.pem

/etc/apache2/sites-available/ssl を作成

# cp /usr/share/apache2/config/default-443 /etc/apache2/sites-available/ssl

/etc/apache2/sites-available/ssl を編集


# a2enmod ssl
# a2ensite ssl


日々の試行と実験: SSL導入(Debian sarge apache2)

klog: Debian の Apache2 で SSL セットアップ

deb/WWWサーバ - PukiWiki Plus!


[2008-06-18] 追記

Debian Etchでは
apache2-ssl-certificate ではなく,

LDAPv3 HOWTO on Debian


LDAPv3 HOWTO on Debian
Windowsネットワーク用統合認証サーバー構築(OpenLDAP+Samba) - Fedoraで自宅サーバー構築
PC View : Network : LDAPではじめる情報共有—第1回 LDAPの概要(1)—ディレクトリと識別名

Debian で Apache + mod_ssl


# aptitude install libapache-mod-ssl
# aptitude install libapache-mod-ssl-doc
# cat /usr/share/doc/libapache-mod-ssl-doc/examples/mod-ssl.conf >> /etc/apache/conf.d/ssl.conf
# zcat /usr/share/doc/libapache-mod-ssl-doc/examples/vhost.conf.gz >> /etc/apache/conf.d/vhost.conf
# apachectl configtest


# mod-ssl-makecert
What type of certificate do you want to create?

1. dummy (dummy self-signed Snake Oil cert)
2. test (test cert signed by Snake Oil CA)
3. custom (custom cert signed by own CA)
4. existing (existing cert)

Use dummy when you are a vendor package maintainer,
test when you are an admin but want to do tests only,
custom when you are an admin willing to run a real server
existing when you are an admin who upgrades a server.

Normally you would choose 2.

your choice: 2
Which algorithm should be used to generate required key(s)?

1. RSA
2. DSA

Normally you would choose 1.

your choice: 1
SSL Certificate Generation Utility (
Copyright (c) 1998-2000 Ralf S. Engelschall, All Rights Reserved.

Generating test certificate signed by Snake Oil CA [TEST]
WARNING: Do not use this for real-life/production systems

STEP 1: Generating RSA private key (1024 bit) [server.key]
1261417 semi-random bytes loaded
Generating RSA private key, 1024 bit long modulus
e is 65537 (0x10001)

STEP 2: Generating X.509 certificate signing request [server.csr]
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.

1. Country Name (2 letter code) [XY]:JP
2. State or Province Name (full name) [Snake Desert]:Tokyo
3. Locality Name (eg, city) [Snake Town]:Itabashi-ku
4. Organization Name (eg, company) [Snake Oil, Ltd]:Example Co.,Ltd.
5. Organizational Unit Name (eg, section) [Webserver Team]:Web Contents Group
6. Common Name (eg, FQDN) [www.snakeoil.dom]
7. Email Address (eg, name@FQDN) [www@snakeoil.dom]
8. Certificate Validity (days) [365]:

STEP 3: Generating X.509 certificate signed by Snake Oil CA [server.crt]
Certificate Version (1 or 3) [3]:3
Signature ok
subject=/C=JP/ST=Tokyo/L=Itabashi-ku/O=Example Co.,Ltd./OU=Web Contents
Getting CA Private Key
Verify: matching certificate & key modulus
Verify: matching certificate signature
/etc/apache/ssl.crt/server.crt: OK

STEP 4: Enrypting RSA private key with a pass phrase for security
The contents of the server.key file (the generated private key) has to be
kept secret. So we strongly recommend you to encrypt the server.key file
with a Triple-DES cipher and a Pass Phrase.
Encrypt the private key now? [Y/n]: n
Warning, you're using an unencrypted RSA private key.
Please notice this fact and do this on your own risk.

RESULT: Server Certification Files

o /etc/apache/ssl.key/server.key
   The PEM-encoded RSA private key file which you configure
   with the 'SSLCertificateKeyFile' directive (automatically done
   when you install via APACI). KEEP THIS FILE PRIVATE!

o /etc/apache/ssl.crt/server.crt
   The PEM-encoded X.509 certificate file which you configure
   with the 'SSLCertificateFile' directive (automatically done
   when you install via APACI).

o /etc/apache/ssl.csr/server.csr
   The PEM-encoded X.509 certificate signing request file which
   you can send to an official Certificate Authority (CA) in order
   to request a real server certificate (signed by this CA instead
   of our demonstration-only Snake Oil CA) which later can replace
   the /etc/apache/ssl.crt/server.crt file.

WARNING: Do not use this for real-life/production systems


# chmod 600 /etc/apache/ssl.key/server.key


# apachectl stop
# apachectl start




  apt-get を実行すると IPv6 アドレスが表示される.
  AWStats の実行も非常に遅くなる.


修正前 alias net-pf-10 ipv6
修正後 alias net-pf-10 off

update-modules を実行し,/etc/modules.confを更新する

# update-modules

reboot が必要

[2011-07-15] 追記

/etc/modprobe.d/blacklist に以下を記載しても良い。

blacklist ipv6

[2011-07-15] 追記

squeeze 以降は ipv6モジュールではなく、 kernelに組み込まれているため、
/etc/sysctl.d/ipv6.conf に以下を記載。


net.ipv6.conf.all.disable_ipv6 = 1


net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1


# sysctl -p

Software/Network - Debian GNU/Linux スレッドテンプレ


Debian GNU/Linux スレッドテンプレ - install

2ch-Linux-Beginners - NetworksFAQs

とりあえずやってみる 2005年8月

Debian - grub

grub-install を実行

# grub-install /dev/hda
Probing devices to guess BIOS drives. This may take a long time.
Installation finished. No error reported.
This is the contents of the device map /boot/grub/
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0) /dev/fd0
(hd0) /dev/hda

update-grub を実行

# update-grub
Searching for GRUB installation directory ... found: /boot/grub .
Testing for an existing GRUB menu.list file...

Could not find /boot/grub/menu.lst file. Would you like
/boot/grub/menu.lst generated for you? (y/N) y
Searching for splash image... none found, skipping...
Found kernel: /vmlinuz-2.4.18-bf2.4
Updating /boot/grub/menu.lst ... done

/boot/grub/menu.lst を編集

再度 update-grub を実行

# update-grub
Searching for GRUB installation directory ... found: /boot/grub .
Testing for an existing GRUB menu.list file... found: /boot/grub/menu.lst
Searching for splash image... none found, skipping...
Found kernel: /vmlinuz-2.4.18-bf2.4
Updating /boot/grub/menu.lst ... done


/etc/kernel-img.conf を作成

postinst_hook = /sbin/update-grub
postrm_hook = /sbin/update-grub
do_bootloader = no


Iwatani Electronics - Debian GNU/Linux で利用する GNU GRUB


language-env user-ja をインストール

# aptitude install language-env user-ja


% set-language-env

ja-trans と jless のインストール

# aptitude install ja-trans jless

locale を生成

/etc/locale.gen の編集


# /usr/sbin/locale-gen


/etc/apt/apt.conf.d/70debconf に追記


Acquire::http::Proxy "";
Acquire::ftp::Proxy "";


Acquire {
	Retries "0";
	http {
		Proxy "";
	ftp {
		Proxy "";
	// comment


Acquire::http::Proxy "";
Acquire::ftp::Proxy "";


Acquire {
	Retries "0";
	http {
		Proxy "";
	ftp {
		Proxy "";
	// comment


  Linux/apt.conf - discypus



$ apt-get moo
  / |    ||
.*  /\---/\
    ~~   ~~
...."Have you mooed today?"...


$ apt-build moo

        (__)    ~
        (oo)   /
   /  /\ / /
  ~  /  * /
    / ___/
  /  \
 /   /
~    ~
..."Have you danced today ? Discow !"...

aptitude (LANG=C と LANG=ja_JP.eucJP を列挙)

$ aptitude moo
There are no Easter Eggs in this program.


$ aptitude -v moo
There really are no Easter Eggs in this program.


$ aptitude -vv moo
Didn't I already tell you that there are no Easter Eggs in this program?


$ aptitude -vvv moo
Stop it!


$ aptitude -vvvv moo
Okay, okay, if I give you an Easter Egg, will you go away?

わかった、わかった、 あんたにイースターエッグをあげればどっかいってくれるかい?

$ aptitude -vvvvv moo
All right, you win.

                       -------/      \
                      /               \
                     /                |
   -----------------/                  --------\


わかったよ、 あなたの勝ちだ。

                       -------/      \
                      /               \
                     /                |
   -----------------/                  --------\


$ aptitude -vvvvvv moo
What is it?  It's an elephant being eaten by a snake, of course.

なにそれ? もちろんウワバミに食べられてる象に決ってるじゃん。


Debian GNU/Linux スレッドテンプレ - Tips - moo?
The Easter Egg Archive - Apt-get and Super Cow Powers
The Easter Egg Archive - Got apt-get?

Debian パッケージへのリンクプラグイン

Debian パッケージ検索へのリンク

### Debian バイナリパッケージ検索へのリンク
# usage: {{debian('パッケージ名')}}
sub debian {
	my ($str) = @_;
	my $prefix = q(;
	return qq(<a href="$prefix/$str" title="Debian パッケージディレクトリ検索 (バイナリ) - $str">Debian パッケージディレクトリ検索 (バイナリ) - $str</a>);
### Debian ソースパッケージ検索へのリンク
# usage: {{debian_src('パッケージ名')}}
sub debian_src {
	my ($str) = @_;
	my $prefix = q(;
	return qq(<a href="$prefix/src:$str" title="Debian パッケージディレクトリ検索 (ソース) - $str">Debian パッケージディレクトリ検索 (ソース) - $str</a>);

Debian パッケージ内容検索へのリンク

### Debian パッケージ内容検索へのリンク
# usage: {{debian_search('keyword')}}
sub debian_search {
	my ($str) = @_;
	my $prefix = q(;
	# $version は stable, testing, unstable で指定
	my $version = q(all);
	# $arch は 以下で指定.
	# i386      : Intel x86
	# m68k      : Motorola 680x0
	# alpha     : Alpha
	# sparc     : SPARC
	# powerpc   : PowerPC
	# arm       : ARM
	# hppa      : HP PA/RISC
	# ia64      : Intel IA-64
	# mips      : MIPS
	# mipsel    : MIPS (DEC)
	# s390      : IBM S/390
	# hurd-i386 : Hurd (i386)
	my $arch = q(i386);
	return qq(<a href="$prefix?word=$str&searchmode=searchfiles&version=$version&arch=$arch" title="Debian パッケージ内容検索 - $str">Debian パッケージ内容検索 - $str</a>);

packages that contain files or directories whose names contain the keyword$str&searchmode=searchword&version=$version&arch=$arch


  Debian - Packages