湖濱散記部落格的樹心幽徑[login][主頁]
391:20180426安裝apache2 httpd

treehrt@hrt:~$ sudo apt-get install apache2
[sudo] password for treehrt:
正在讀取套件清單... 完成
正在重建相依關係         
正在讀取狀態資料... 完成
以下套件為自動安裝,並且已經無用:
  linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic
  linux-headers-4.4.0-112 linux-headers-4.4.0-112-generic
  linux-headers-4.4.0-116 linux-headers-4.4.0-116-generic
  linux-headers-4.4.0-98 linux-headers-4.4.0-98-generic
  linux-image-4.4.0-101-generic linux-image-4.4.0-112-generic
  linux-image-4.4.0-116-generic linux-image-extra-4.4.0-101-generic
  linux-image-extra-4.4.0-112-generic linux-image-extra-4.4.0-116-generic
Use 'sudo apt autoremove' to remove them.
下列的額外套件將被安裝:
  apache2-bin apache2-data apache2-utils libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap
建議套件:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
下列【新】套件將會被安裝:
  apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap
升級 0 個,新安裝 8 個,移除 0 個,有 382 個未被升級。
需要下載 1,521 kB 的套件檔。
此操作完成之後,會多佔用 5,850 kB 的磁碟空間。
是否繼續進行 [Y/n]? [Y/n] y

:

 

treehrt@hrt:~$ sudo /etc/init.d/apache2 status
[sudo] password for treehrt:
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: active (running) since 四 2018-04-26 07:58:35 CST; 4h 36min ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/apache2.service
           ├─3468 /usr/sbin/apache2 -k start
           ├─3471 /usr/sbin/apache2 -k start
           └─3472 /usr/sbin/apache2 -k start

 4月 26 07:58:34 hrt systemd[1]: Starting LSB: Apache2 web server...
 4月 26 07:58:34 hrt apache2[3445]:  * Starting Apache httpd web server apache2
 4月 26 07:58:34 hrt apache2[3445]: AH00558: apache2: Could not reliably d...ge
 4月 26 07:58:35 hrt apache2[3445]:  *
 4月 26 07:58:35 hrt systemd[1]: Started LSB: Apache2 web server.
Hint: Some lines were ellipsized, use -l to show in full.
treehrt@hrt:~$ vi /var/www/html/index.html

 


select id,article_id,topic,text from lt_articles_text where article_id =391; ok. update lt_articles set num_reads=num_reads +1 where id=391; ok.