Debian 管理ノート / Apache http://www.rad51.net/blog/linuxnote/ Debian 管理ノート / Apache ja Jeans CMS © Weblog http://backend.userland.com/rss https://www.rad51.net/jeans/skins/jeans/images/jeans2.gif Debian 管理ノート http://www.rad51.net/blog/linuxnote/ Apache/PHP/SQLite http://www.rad51.net/blog/linuxnote/?itemid=712
apt-get install apache2
apt-get install php5
apt-get install php5-sqlite
apt-get install php5-sqlite3
/usr/sbin/apache2ctl restart

ちなみに、Apacheの設定ファイルは/etc/apache2/apache2.confのようで、このファイルで次のように記述されている。
# Include all the user configurations:
Include /etc/apache2/httpd.conf
細かな設定は、このhttpd.confに記述すればよさそう。(追記:/etc/apache2/sites-enabled/000-default 要設定:下記参照)

PHPの設定ファイルは、/etc/php5/apache2/php.ini にある。ざっと見た感じデフォルトの設定で気がついたのは、register_globals=off, magic_quote_gpc=on, memory_limit=16M。あとで修正する。

追記:上記の方法でmb_stringはインストールされるが、GDはされないので、別途 apt-get install php5-gd の必要アリ。

/etc/apache2/sites-enabled/000-defaultの設定(抜粋)
        <Directory /var/www/>
                AuthUserFile /root/.htpasswd
                AuthGroupFile /dev/null
                AuthName "Please enter username and password"
                AuthType Basic
                require valid-user

                #Options Indexes FollowSymLinks MultiViews
                Options FollowSymLinks
                AllowOverride All
                Order deny,allow
                deny from all
                allow from 192.168.0.0/16
                allow from 129.16.97.0/24
        </Directory>

/etc/php5/apache2/php.iniの設定(変更部分抜粋)
short_open_tag = Off
memory_limit = 128M
magic_quotes_gpc = Off
allow_url_fopen = Off
]]>
Apache http://www.rad51.net/blog/linuxnote/?itemid=712 Sat, 28 Feb 2009 19:43:02 PST ITEM712_20090228
GD http://www.rad51.net/blog/linuxnote/?itemid=298 kandk:~# apt-get install php4-gd Reading package lists... Done Building dependency tree... Done The following extra packages will be installed:   libgd2-xpm libt1-5 libxpm4 Suggested packages:   libgd-tools The following packages will be REMOVED:   libgd2-noxpm The following NEW packages will be installed:   libgd2-xpm libt1-5 libxpm4 php4-gd 0 upgraded, 4 newly installed, 1 to remove and 0 not upgraded. Need to get 427kB of archives. After unpacking 684kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://linux.csua.berkeley.edu etch/main libxpm4 1:3.5.5-2 [35.5kB] Get:2 http://linux.csua.berkeley.edu etch/main libgd2-xpm 2.0.33-5.2 [204kB] Get:3 http://linux.csua.berkeley.edu etch/main libt1-5 5.1.0-2 [155kB] Get:4 http://linux.csua.berkeley.edu etch/main php4-gd 6:4.4.4-8+etch1 [32.3kB] Fetched 427kB in 2s (150kB/s)   dpkg: libgd2-noxpm: dependency problems, but removing anyway as you request: analog depends on libgd2-noxpm (>= 2.0.33) | libgd2-xpm (>= 2.0.33); however:   Package libgd2-noxpm is to be removed.   Package libgd2-xpm is not installed. (Reading database ... 32205 files and directories currently installed.) Removing libgd2-noxpm ... Selecting previously deselected package libxpm4. (Reading database ... 32197 files and directories currently installed.) Unpacking libxpm4 (from .../libxpm4_1%3a3.5.5-2_powerpc.deb) ... Selecting previously deselected package libgd2-xpm. Unpacking libgd2-xpm (from .../libgd2-xpm_2.0.33-5.2_powerpc.deb) ... Selecting previously deselected package libt1-5. Unpacking libt1-5 (from .../libt1-5_5.1.0-2_powerpc.deb) ... Selecting previously deselected package php4-gd. Unpacking php4-gd (from .../php4-gd_6%3a4.4.4-8+etch1_powerpc.deb) ... Setting up libxpm4 (3.5.5-2) ... Setting up libgd2-xpm (2.0.33-5.2) ... Setting up libt1-5 (5.1.0-2) ... Setting up php4-gd (4.4.4-8+etch1) ... kandk:~# vi /etc/php4/apache2/php.ini extension=gd.so kandk:~# /etc/init.d/apache2 restart]]> Apache http://www.rad51.net/blog/linuxnote/?itemid=298 Wed, 02 May 2007 15:40:20 PDT ITEM298_20070502 Apache 設定 http://www.rad51.net/blog/linuxnote/?itemid=293
config は、/etc/apache2/apache2.conf にて設定。ここから /etc/sites-enabled/000-default が読み込まれているため、殆どの設定は 000-default で行う。

Document root を、/home/katsumi/www とした。]]>
Apache http://www.rad51.net/blog/linuxnote/?itemid=293 Wed, 02 May 2007 14:27:08 PDT ITEM293_20070502