CentOSのは、Apacheのソースコードをコンパイルしてインストールします

アパッチの最新バージョンをダウンロードしてください1.

wgetのhttp://mirror.downloadvn.com/apache//httpd/httpd-2.4.41.tar.gz

2、インストールパッケージ

yumを4月* GCCをインストール

3、コンパイルしてインストールします

タール-zxvfのhttpd-2.4.41.tar.gz
のhttpd-2.4.41 CD
は./configure -prefix =は/ usr / local / apacheの-enable-のvhost-エイリアス-enable-書き換え-enable-情報
メイク
make installを

初期化ファイルをコピーし、Apacheが起動するように設定

CPビルド/回転数/ httpd.init /etc/init.d/httpd
のchmod 755 /etc/init.d/httpd
のchkconfig -add httpdの
chkconfigのレベルの35 httpdの上

シンボリックリンクを作成します。

LN -sは、/ usr / local / apache / httpdの
CDは/ usr / sbinに/
LN -fsは/ usr / local / apacheの/ binに/ httpdの
LN -fsは/ usr / local / apacheの/ binに/のapachectl
CDの/ var /ログ
RM - RFのhttpd /
/etc/init.d/httpd開始

スタート/ストップhttpdサービス

サービスのhttpdの再起動
サービスのhttpd起動
は/ usr / local / apacheの/ binに/はapachectl開始
は/ usr / local / apacheの/ binに/のapachectl停止
は/ usr / local / apacheの/ binに/はapachectlステータスが
起動/etc/init.d/httpd
の/ etc /init.d/httpd停止
/etc/init.d/httpd再開

pgrepコマンドは見つけることのプロセスを使用して開始しました

pgrep httpdの

CentOSのは、Apacheのソースコードをコンパイルしてインストールします

Apacheの設定ファイル

我々のを/usr/local/apache/conf/httpd.conf

おすすめ

転載: www.linuxidc.com/Linux/2020-01/162074.htm