티스토리 툴바


'2012/02'에 해당되는 글 2

  1. 2012/02/02 Amazon Linux AMI에서 Apache2.2 + Tomcat7 연동
  2. 2012/02/01 Amazon Linux AMI에 대하여...

Amazon Linux AMI에서 Apache2.2 + Tomcat7 연동

2012/02/02 17:24 | Posted by 포데브(엄지사랑) 엄지사랑
: 서버구축환경

OS: Amazon Linux AMI release 2011.09 <== CentOS 계열(5.x)
WS: Apache/2.2.21 (Unix)
WAS: tomcat-7.0.22


: Apache2(httpd) 설치

$ sudo yum install httpd


: 설치확인

$ chkconfig  --list | grep httpd
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
$ apachectl -v
Server version: Apache/2.2.21 (Unix)
Server built:   Oct 26 2011 22:12:40


: 설치정보

$ cd /etc/httpd
$ ll
total 8
drwxr-xr-x 2 root root 4096 Feb  2 05:33 conf
drwxr-xr-x 2 root root 4096 Feb  2 05:33 conf.d
lrwxrwxrwx 1 root root   19 Feb  2 05:33 logs -> ../../var/log/httpd
lrwxrwxrwx 1 root root   29 Feb  2 05:33 modules -> ../../usr/lib64/httpd/modules
lrwxrwxrwx 1 root root   19 Feb  2 05:33 run -> ../../var/run/httpd


: apache 실행

$ sudo /usr/sbin/apachectl start
$ netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN
tcp        0      0 :::80                       :::*                        LISTEN
tcp        0      0 :::8080                     :::*                        LISTEN
tcp        0      0 :::22                       :::*                        LISTEN
tcp        0      0 ::ffff:127.0.0.1:8005       :::*                        LISTEN
tcp        0      0 :::8009                     :::*                        LISTEN


: apache2.2 + tomcat7 연동 설정(mod_proxy_proxy)

> 참고: http://bugcide.blogspot.com/2011/07/centos-apache-tomcat-yum.html

> /etc/httpd/conf/httpd.conf 에 mod_proxy 활성화 되어있는지 확인 (기본 설치값은 활성화되어 있음)
> * LoadModule proxy_module modules/mod_proxy.so
> conf/httpd.conf 에 주석처리된 mod_proxy.c 부분을 설정해도 좋지만
> /etc/httpd/conf.d/ 에 tomcat.conf 파일을 새로 생성함


$ sudo vi /etc/httpd/conf.d/tomcat.conf

<IfModule mod_proxy.c>

ProxyRequests off

ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/

<IfModule mod_disk_cache.c>
   CacheEnable disk /
   CacheRoot "/var/cache/mod_proxy"
</IfModule>

</IfModule>


$ sudo /usr/sbin/apachectl restart 


끝.
저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License

Amazon Linux AMI에 대하여...

2012/02/01 13:48 | Posted by 포데브(엄지사랑) 엄지사랑
AWS 에서 사용하고 있는 OS는 Amazon Linux AMI 입니다.
Amazon Linux AMI는 CentOS를 기반으로 하고 있으며
CentOS는 RedHat Enterprise Linux AS 기반의 리눅스 배포판입니다.

참고: 
http://centos.pe.kr/owiki/index.php?url=centos
http://www.jopenbusiness.com/mediawiki/index.php/CentOS

또한 Amazon Linux AMI User Guide 문서에는 아래와 같은 내용이 있습니다.

Is the Amazon Linux AMI compatible with other Linux distributions?
The Amazon Linux AMI is very similar to CentOS in file system layout and package management. 
Applications built for CentOS 5 and later should run without recompilation of the Amazon Linux AMI. 
However, the Amazon Linux AMI is configured for use only in Amazon EC2.

Does the Amazon Linux AMI support third-party independent software vendor (ISV) applications?
Yes. Most ISV applications that are designed to run on CentOS 5 or later will run on the Amazon Linux AMI. 
However, the Amazon Linux AMI has not gone through any formal certification efforts with ISVs. 
If you have a specific question about whether an ISV will officially support running its application on the Amazon Linux AMI, 
please contact the ISV directly.


즉, Amazon Linux AMI는 CentOS와 호환되며 
ISV들에 의해 CentOS 5 또는 이후 버전에서 동작하는 것들은 Amazon Linux AMI에서 동작될 것이나
ISV들과 공식적인 인증 노력을 하지 않기 때문에 ISV 들의 애플리케이션이 지원하는지 여부는 직접 문의해라.

그리고 해당 OS 버전을 확인할때는 아래와 같이 하되 정확한 CentOS 버전을 확인할 방법은 없어 보입니다.

$ cat /etc/issue
Amazon Linux AMI release 2011.09

$ cat /etc/image-id 
image_name="amzn-ami"
image_version="2011.09"
image_arch="x86_64"
image_file="amzn-ami-2011.09.2.x86_64.ext4"
image_stamp="46f7-fb98"
image_date="20111027225247"
recipe_name="amzn ami"
recipe_id="2aaca5dd-b34f-4a46-8281-d2471ce38631"

저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License
이전 1 다음