AWS(Amazon Web Services)

AWS(EC2) 아파치 Apache 웹서버 설치하기

dev.mk 2020. 9. 3. 09:46
반응형

#터미널에서 명령어 실행

yum list | grep httpd

 

  명령을 실행하면 아래 그림과 같이 httpd 이름에 들어가는 패키지의 목록을 있다

httpd.x86_64                             2.2.34-1.16.amzn1          @amzn-main  
httpd-devel.x86_64                       2.2.34-1.16.amzn1          @amzn-main  
httpd-tools.x86_64                       2.2.34-1.16.amzn1          @amzn-main  
dmlite-apache-httpd.i686                 1.14.0-3.el6               epel        
dmlite-apache-httpd.x86_64               1.14.0-3.el6               epel        
httpd-itk.x86_64                         2.2.22-7.el6               epel        
httpd-manual.noarch                      2.2.34-1.16.amzn1          amzn-main   
httpd24.x86_64                           2.4.46-1.90.amzn1          amzn-updates
httpd24-devel.x86_64                     2.4.46-1.90.amzn1          amzn-updates
httpd24-manual.noarch                    2.4.46-1.90.amzn1          amzn-updates
httpd24-tools.x86_64                     2.4.46-1.90.amzn1          amzn-updates
iipsrv-httpd-fcgi.noarch                 1.0.0-1.0.el6              epel        
libmicrohttpd.i686                       0.9.33-2.5.amzn1           amzn-main   
libmicrohttpd.x86_64                     0.9.33-2.5.amzn1           amzn-main   
libmicrohttpd-devel.x86_64               0.9.33-2.5.amzn1           amzn-main   
libmicrohttpd-doc.noarch                 0.9.33-2.5.amzn1           amzn-main   
lighttpd.x86_64                          1.4.53-1.36.amzn1          amzn-updates
lighttpd-fastcgi.x86_64                  1.4.53-1.36.amzn1          amzn-updates
lighttpd-mod_authn_gssapi.x86_64         1.4.53-1.36.amzn1          amzn-updates
lighttpd-mod_authn_mysql.x86_64          1.4.53-1.36.amzn1          amzn-updates
lighttpd-mod_authn_pam.x86_64            1.4.53-1.36.amzn1          amzn-updates
lighttpd-mod_geoip.x86_64                1.4.53-1.36.amzn1          amzn-updates
lighttpd-mod_mysql_vhost.x86_64          1.4.53-1.36.amzn1          amzn-updates
mirmon-httpd.noarch                      2.11-1.el6                 epel        
python-mozhttpd.noarch                   0-0.3.gitb077641.el6       epel        
python2-sphinxcontrib-httpdomain.noarch  1.7.0-1.el6                epel        
sympa-httpd.x86_64                       6.2.56-1.el6               epel        
sympa-lighttpd.x86_64                    6.2.56-1.el6               epel        
sysusage-httpd.noarch                    5.7-2.el6                  epel        
viewvc-httpd.noarch                      1.1.28-1.el6               epel        
web-assets-httpd.noarch                  5-2.el6                    epel    

  명령을 실행하면 아래 그림과 같이 httpd 이름에 들어가는 패키지의 목록을 있다

 Apache 패키지 명은 httpd 이며 현재 제공되는 버전은 2.4.34이다. 아래 명령으로 httpd 패키지를 설치해 주도록 하자.

sudo yum install httpd
sudo yum install httpd-devel

-r 로 권한을 변경해주면 명령어 앞에 sudo를 생략할 수 있다.

 추후에 Tomcat 등의 WAS 연동 계획없이 Apache 단독으로 돌려서 서비스를 계획하고 있다면 Apache 설치는 이제 끝이다. 하지만 Tomcat 연동할 계획이라면 httpd-devel 패키지도 설치해 주도록 하자httpd-devel 패키지는 Apache 모듈을 빌드할 사용될 헤더파일들과 도구(apxs) 설치해준다. Tomcat 연동을 위한 AJP13 프로토콜 연결을 위해서 mod_jk 모듈을 많이 사용하는데 mod_jk 모듈을 빌드하기 위해서 반드시 필요하므로 연동을 원한다면 반드시 설치해 주도록 하자.

 

// Apache 시작
sudo service httpd start

// Apache 종료
sudo service httpd stop

// Apache 재시작
sudo service httpd restart

 

반응형