Tomcat catalina.out daily logrotate
1. logrotate 설정 디렉토리로 이동
$ cd /etc/logrotate.d/
2. 설정 파일 생성
$ nano tomcat
/var/local/tomcat/logs/catalina.out {
copytruncate
daily
rotate 30
missingok
notifempty
dateext
}
3. (선택) 현재 파일 강제 갱신
$ logrotate -f /etc/logrotate.d/tomcat
설정 파일 참고 :
http://linuxcommand.org/man_pages/logrotate8.html
2017/02/28
2016/01/14
[ubuntu] ubuntu tomcat 7 install
- ubuntu tomcat install
- ubuntu tomcat7 install
sudo apt-get install tomcat7
http://hangaebal.tistory.com/11
2014/06/18
Tomcat Server에 JDBC DataSource 설정
1. context.xml 파일에 <Resource> 태그 추가
(=> Tomcat 서버가 해당 자원을 관리 하도록 설정)
<Resource name="jdbc/스키마명" auth="Container" type="javax.sql.DataSource"
maxActive="10" maxIdle="3" maxWait="10000"
username="사용자명" password="암호"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://도메인/스키마명"
closeMethod="close"/>
name="JNDI 이름"
maxActive="꺼낼 수 있는 커넥션 최대 갯수 (기본값 8)"
maxIdle="유휴 커넥션 최대 갯수 (기본값 8)"
maxWait="최대 커넥션 발급 상태에서 추가 요청이 들어왔을때 기다리는 초. 이후 예외 Throw(기본값 -1 == 반납 될 때 까지 기다림)"
2. web.xml (Deloyment Descriptor == DD 파일)에 선언
(=> 설정 된 서버 자원을 해당 웹 앱에서 참조하도록)
<resource-ref>
<res-ref-name>jdbc/스키마명</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
(=> Tomcat 서버가 해당 자원을 관리 하도록 설정)
<Resource name="jdbc/스키마명" auth="Container" type="javax.sql.DataSource"
maxActive="10" maxIdle="3" maxWait="10000"
username="사용자명" password="암호"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://도메인/스키마명"
closeMethod="close"/>
name="JNDI 이름"
maxActive="꺼낼 수 있는 커넥션 최대 갯수 (기본값 8)"
maxIdle="유휴 커넥션 최대 갯수 (기본값 8)"
maxWait="최대 커넥션 발급 상태에서 추가 요청이 들어왔을때 기다리는 초. 이후 예외 Throw(기본값 -1 == 반납 될 때 까지 기다림)"
2. web.xml (Deloyment Descriptor == DD 파일)에 선언
(=> 설정 된 서버 자원을 해당 웹 앱에서 참조하도록)
<resource-ref>
<res-ref-name>jdbc/스키마명</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
피드 구독하기:
글 (Atom)