UJP - Raspbian 9.4上のApache2の実行状況確認,停止,起動

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

  • カテゴリ Raspberry Pi の最新配信
  • RSS
  • RDF
  • ATOM

ブログ - Raspbian 9.4上のApache2の実行状況確認,停止,起動

Raspbian 9.4上のApache2の実行状況確認,停止,起動

カテゴリ : 
PC » Raspberry Pi
ブロガー : 
ujpblog 2018/9/2 19:08
 Apache HTTPD サーバのの停止と起動方法を確認.
pi@raspberrypi:~ $ service apache2 status🆑
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-09-02 01:34:42 JST; 17h ago
 Main PID: 459 (apache2)
   CGroup: /system.slice/apache2.service
           ├─ 459 /usr/sbin/apache2 -k start
           ├─ 486 /usr/sbin/apache2 -k start
           ├─ 487 /usr/sbin/apache2 -k start
           ├─ 488 /usr/sbin/apache2 -k start
           ├─ 489 /usr/sbin/apache2 -k start
           ├─ 490 /usr/sbin/apache2 -k start
           ├─7383 /usr/sbin/apache2 -k start
           ├─7384 /usr/sbin/apache2 -k start
           └─7385 /usr/sbin/apache2 -k start

 9月 02 01:34:41 raspberrypi systemd[1]: Starting The Apache HTTP Server...
 9月 02 01:34:42 raspberrypi apachectl[419]: AH00558: apache2: Could not reliably determine the server's fully qualified
 9月 02 01:34:42 raspberrypi systemd[1]: Started The Apache HTTP Server.
pi@raspberrypi:~ $
 Apache Web Serverを停止してステータスを確認.
pi@raspberrypi:~ $ sudo service apache2 stop🆑
pi@raspberrypi:~ $ service apache2 status🆑
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: inactive (dead)🈁 since Sun 2018-09-02 19:01:59 JST; 5s ago
  Process: 7422 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
 Main PID: 459 (code=exited, status=0/SUCCESS)

 9月 02 01:34:41 raspberrypi systemd[1]: Starting The Apache HTTP Server...
 9月 02 01:34:42 raspberrypi apachectl[419]: AH00558: apache2: Could not reliably determine the server's fully qualified
 9月 02 01:34:42 raspberrypi systemd[1]: Started The Apache HTTP Server.
 9月 02 19:01:59 raspberrypi systemd[1]: Stopping The Apache HTTP Server...
 9月 02 19:01:59 raspberrypi apachectl[7422]: AH00558: apache2: Could not reliably determine the server's fully qualified
 9月 02 19:01:59 raspberrypi systemd[1]: Stopped The Apache HTTP Server.
pi@raspberrypi:~ $
 停止していますね.
 次に,起動してステータス確認.
pi@raspberrypi:~ $ sudo service apache2 start🆑
pi@raspberrypi:~ $ service apache2 status🆑
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-09-02 19:02:11 JST; 2s ago
  Process: 7422 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
  Process: 7466 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 7470 (apache2)
   CGroup: /system.slice/apache2.service
           ├─7470 /usr/sbin/apache2 -k start
           ├─7474 /usr/sbin/apache2 -k start
           ├─7475 /usr/sbin/apache2 -k start
           ├─7476 /usr/sbin/apache2 -k start
           ├─7477 /usr/sbin/apache2 -k start
           └─7478 /usr/sbin/apache2 -k start

 9月 02 19:02:11 raspberrypi systemd[1]: Starting The Apache HTTP Server...
 9月 02 19:02:11 raspberrypi apachectl[7466]: AH00558: apache2: Could not reliably determine the server's fully qualified
 9月 02 19:02:11 raspberrypi systemd[1]: Started The Apache HTTP Server.
pi@raspberrypi:~ $
 プロセスを確認.
pi@raspberrypi:~ $ ps -ef|grep apache🆑
root      7470     1  0 19:02 ?        00:00:00 /usr/sbin/apache2 -k start
www-data  7474  7470  0 19:02 ?        00:00:00 /usr/sbin/apache2 -k start
www-data  7475  7470  0 19:02 ?        00:00:00 /usr/sbin/apache2 -k start
www-data  7476  7470  0 19:02 ?        00:00:00 /usr/sbin/apache2 -k start
www-data  7477  7470  0 19:02 ?        00:00:00 /usr/sbin/apache2 -k start
www-data  7478  7470  0 19:02 ?        00:00:00 /usr/sbin/apache2 -k start
pi        7485  5883  0 19:04 pts/0    00:00:00 grep --color=auto apache
pi@raspberrypi:~ $
 www-dataというユーザで起動している模様.
 念のために,リモートからログインできないように設定されているか確認.
pi@raspberrypi:~ $ cat /etc/passwd|grep www-data🆑
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin🈁
pi@raspberrypi:~ $
 ちゃんとシェルがない状態でした.

トラックバック


広告スペース
Google