아래와 같은 에러 발생 시
1 2 3 4 | # /etc/init.d/apache2 start [....] Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details. failed! | cs |
먼저 아파치를 완전 삭제
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # apt-get remove apache2 --purge Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: apache2* 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 502 kB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 101687 files and directories currently installed.) Removing apache2 (2.4.18-2ubuntu3.8) ... Purging configuration files for apache2 (2.4.18-2ubuntu3.8) ... dpkg: warning: while removing apache2, directory '/var/www/html' not empty so not removed Processing triggers for man-db (2.7.5-1) ... Processing triggers for ufw (0.35-0ubuntu2) ... | cs |
그리고 다시 설치를 진행
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | # apt-get install apache2 Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: www-browser apache2-doc apache2-suexec-pristine | apache2-suexec-custom The following NEW packages will be installed: apache2 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/86.8 kB of archives. After this operation, 502 kB of additional disk space will be used. Selecting previously unselected package apache2. (Reading database ... 101489 files and directories currently installed.) Preparing to unpack .../apache2_2.4.18-2ubuntu3.8_amd64.deb ... Unpacking apache2 (2.4.18-2ubuntu3.8) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for ufw (0.35-0ubuntu2) ... Processing triggers for systemd (229-4ubuntu21.2) ... Processing triggers for ureadahead (0.100.0-19) ... Setting up apache2 (2.4.18-2ubuntu3.8) ... Enabling module mpm_event. Enabling module authz_core. Enabling module authz_host. Enabling module authn_core. Enabling module auth_basic. Enabling module access_compat. Enabling module authn_file. Enabling module authz_user. Enabling module alias. Enabling module dir. Enabling module autoindex. Enabling module env. Enabling module mime. Enabling module negotiation. Enabling module setenvif. Enabling module filter. Enabling module deflate. Enabling module status. Enabling conf charset. Enabling conf localized-error-pages. Enabling conf other-vhosts-access-log. Enabling conf security. Enabling conf serve-cgi-bin. Enabling site 000-default. Processing triggers for systemd (229-4ubuntu21.2) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for ufw (0.35-0ubuntu2) ... root@mail:/etc/apache2# apt-get update Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB] Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB] Get:4 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [783 kB] Get:5 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [718 kB] Get:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB] Get:7 http://kr.archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [7,560 B] Get:8 http://kr.archive.ubuntu.com/ubuntu xenial-updates/restricted i386 Packages [7,520 B] Get:9 http://kr.archive.ubuntu.com/ubuntu xenial-updates/restricted Translation-en [2,272 B] Get:10 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [631 kB] Get:11 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [577 kB] Get:12 http://kr.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.4 kB] Get:13 http://kr.archive.ubuntu.com/ubuntu xenial-updates/multiverse i386 Packages [15.5 kB] Fetched 3,081 kB in 1s (2,016 kB/s) Reading package lists... Done root@mail:/etc/apache2# apt-get dist-upgrade -y Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | cs |
서비스 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # service apache2 status ● 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 Wed 2018-05-30 12:22:42 KST; 30s ago Docs: man:systemd-sysv-generator(8) CGroup: /system.slice/apache2.service ├─5211 /usr/sbin/apache2 -k start ├─5214 /usr/sbin/apache2 -k start └─5215 /usr/sbin/apache2 -k start May 30 12:22:41 mail systemd[1]: Starting LSB: Apache2 web server... May 30 12:22:41 mail apache2[5187]: * Starting Apache httpd web server apache2 May 30 12:22:41 mail apache2[5187]: AH00557: apache2: apr_sockaddr_info_get() failed for mail May 30 12:22:41 mail apache2[5187]: AH00558: apache2: Could not reliably determine the server's fully qualified domai May 30 12:22:42 mail apache2[5187]: * May 30 12:22:42 mail systemd[1]: Started LSB: Apache2 web server. | cs |
'Server > Tomcat' 카테고리의 다른 글
Tomcat for Windows 설치 (0) | 2017.10.30 |
---|