Ubuntu14.04を使ってみる – wwwサーバの標準である apache のインストール –

スポンサーリンク

コンテンツ

コマンド一つで簡単にできます

インストール

sudo apt-get install apache2

インストール時の様子

sudo apt-get install apache2
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています                
状態情報を読み取っています... 完了
以下の特別パッケージがインストールされます:
  apache2-bin apache2-data libaprutil1-dbd-sqlite3 libaprutil1-ldap
提案パッケージ:
  apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils
以下のパッケージが新たにインストールされます:
  apache2 apache2-bin apache2-data libaprutil1-dbd-sqlite3 libaprutil1-ldap
アップグレード: 0 個、新規インストール: 5 個、削除: 0 個、保留: 11 個。
1,106 kB のアーカイブを取得する必要があります。
この操作後に追加で 4,703 kB のディスク容量が消費されます。
続行しますか? [Y/n] y
取得:1 http://jp.archive.ubuntu.com/ubuntu/ trusty/main libaprutil1-dbd-sqlite3 amd64 1.5.3-1 [10.5 kB]
取得:2 http://jp.archive.ubuntu.com/ubuntu/ trusty/main libaprutil1-ldap amd64 1.5.3-1 [8,634 B]
取得:3 http://jp.archive.ubuntu.com/ubuntu/ trusty/main apache2-bin amd64 2.4.7-1ubuntu4 [839 kB]
取得:4 http://jp.archive.ubuntu.com/ubuntu/ trusty/main apache2-data all 2.4.7-1ubuntu4 [160 kB]
取得:5 http://jp.archive.ubuntu.com/ubuntu/ trusty/main apache2 amd64 2.4.7-1ubuntu4 [87.7 kB]
1,106 kB を 6秒 で取得しました (171 kB/s)                                      
以前に未選択のパッケージ libaprutil1-dbd-sqlite3:amd64 を選択しています。
(データベースを読み込んでいます ... 現在 189553 個のファイルとディレクトリがインストールされています。)
Preparing to unpack .../libaprutil1-dbd-sqlite3_1.5.3-1_amd64.deb ...
Unpacking libaprutil1-dbd-sqlite3:amd64 (1.5.3-1) ...
以前に未選択のパッケージ libaprutil1-ldap:amd64 を選択しています。
Preparing to unpack .../libaprutil1-ldap_1.5.3-1_amd64.deb ...
Unpacking libaprutil1-ldap:amd64 (1.5.3-1) ...
以前に未選択のパッケージ apache2-bin を選択しています。
Preparing to unpack .../apache2-bin_2.4.7-1ubuntu4_amd64.deb ...
Unpacking apache2-bin (2.4.7-1ubuntu4) ...
以前に未選択のパッケージ apache2-data を選択しています。
Preparing to unpack .../apache2-data_2.4.7-1ubuntu4_all.deb ...
Unpacking apache2-data (2.4.7-1ubuntu4) ...
以前に未選択のパッケージ apache2 を選択しています。
Preparing to unpack .../apache2_2.4.7-1ubuntu4_amd64.deb ...
Unpacking apache2 (2.4.7-1ubuntu4) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
libaprutil1-dbd-sqlite3:amd64 (1.5.3-1) を設定しています ...
libaprutil1-ldap:amd64 (1.5.3-1) を設定しています ...
apache2-bin (2.4.7-1ubuntu4) を設定しています ...
apache2-data (2.4.7-1ubuntu4) を設定しています ...
apache2 (2.4.7-1ubuntu4) を設定しています ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
 * Starting web server apache2                                                  AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
 * 
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...

実行

以下のコマンドで実行できます

sudo apachectl start

14.04はapacheのバージョンが2.4系になっているようです

$ apachectl -v
Server version: Apache/2.4.7 (Ubuntu)
Server built:   Apr  3 2014 12:20:28