日記/2015/03/16/CentOS7でApache HTTPDとPHPをインストールした手順メモ
日記 / 2015 / 03 / 16 / CentOS7でApache HTTPDとPHPをインストールした手順メモ
id: 1405 所有者: msakamoto-sf
作成日: 2015-03-16 19:20:55
カテゴリ: Apache CentOS7 Linux PHP
ググれば沢山出てきますが、備忘録的にメモ。
Apacheのインストール:
# yum install httpd
→他にもいっぱい(SSL無し):
# yum install httpd httpd-devel httpd-manual httpd-tools
PHPのインストール:
# yum install php php-cli php-mbstring
設定ファイル:
- Apache : "/etc/httpd/conf/httpd.conf", "/etc/httpd/conf.d/" 以下の各モジュールごと。
- PHP : "/etc/php.ini", "/etc/php.d/" 以下の各モジュールごと。
Apacheの設定ファイルのsyntaxチェック:
# apachectl configtest
起動:
# systemctl start httpd
停止:
# systemctl stop httpd
再起動:(gracefulの仕方は調査サボってます)
# systemctl restart httpd
自動起動ONか?:
# systemctl is-active httpd
自動起動の設定:
# systemctl enable httpd
参考:
- Webサーバー構築(Apache) - CentOSで自宅サーバー構築
- CentOS and RHEL 7: Install Linux, Apache, MariaDB, PHP (LAMP) Stack
プレーンテキスト形式でダウンロード
現在のバージョン : 1
更新者: msakamoto-sf
更新日: 2017-02-12 19:24:02
md5:f93d5ee5d390ee83c3737819880d5b30
sha1:f092e60e63f3c541be5da3a59cbe7bb7cd60df4b