Ubuntu Server 12.04を用いたHTTPサーバ、DBサーバ、メールサーバなどの構築のための記録
導入
注意
インストール途中でhome directoryを暗号化するかどうか、という質問がでるがこれにYesと答えると
SSHはクライアントの公開鍵の置き場所を変えるなどしないといけなくなります。
SSHサーバ導入
KVMのコンソールが非常に使いにくいので最初のこれをインストール
バックアップ環境構築
とりあえず、動かそうとすると後に回しそうだがこれは非常に重要。
規模が大きくなってから失ったら取り返しがつかないです。
次にcronの設定を行い毎日自動で行うが、sudoで実行するためこのままでは実行できない。
でsudoerの編集を行います。
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) NOPASSWD:ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
username ALL=(ALL) NOPASSWD:/usr/bin/remastersys ←追加
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
これで自動バックアップが行えます。
GCCのインストール
Apache2のインストール
ソースコードの取得
wget http://ftp.kddilabs.jp/infosystems/apache//httpd/httpd-2.4.6.tar.gz
gunzip httpd-2.4.6.tar.gz
tar -xvf httpd-2.4.6.tar
解凍されたディレクトリにはいり
./configure
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
configure:
configure: Configuring Apache Portable Runtime library...
configure:
checking for APR... no
configure: error: APR not found. Please read the documentation.
APRがない。libapr1-dev,libaprutil1-devをインストール
sudo apt-get install libapr1-dev
sudo apt-get install libaprutil1-dev
./configure
できた。makeがないことにここで気づいたのでmakeをインストール
sudo apt-get install make
//httpdの場所へ移動
make
sudo make install //ディレクトリを作るタイミングで権限が必要なため
インストールはこれで完了。
最終更新:2013年10月15日 20:52