본문 바로가기
웹서버/톰켓

톰켓설치

by 베어그릴스 2022. 7. 27.
반응형

[리눅스 업데이트]

리눅스 업데이트
apt-get update

압축파일을 풀 때 쓰인다.
apt-get install zip

apt-get install unzip

리눅스 업그레이드
apt-get upgrade

 

[톰켓 다운로드]

 

wget 설치

sudo apt install wget

 

현재 10버전 까지 나왔으며 설치할 버전을 골라서 다운로드 받아주도록 한다.

 

  • tomcat Download 한다
    ----------------------------------------------------------------------------https://tomcat.apache.org/download-80.cgi
    8.5.81
    Please see the README file for packaging information.
    It explains what every distribution contains.
  • Binary Distributions Core:
    - zip (pgp, md5, sha1)
    - tar.gz (pgp, md5, sha1) <- 이파일을 download한다.
    - 32-bit Windows zip (pgp, md5, sha1)
    - 64-bit Windows zip (pgp, md5, sha1)
    - 32-bit/64-bit Windows Service Installer (pgp, md5, sha1)

위에서 설치한 wget으로 톰켓을 사이트에서 받지 않고 리눅스 콘솔에서 받을 수 있다.

$ wget http://mirror.navercorp.com/apache/tomcat/tomcat-8/v8.5.81/bin/apache-tomcat-8.5.81.tar.gz

tomcat 계정으로 압축을 해제

[tomcat@localhost ~]$ tar -xvzf apache-tomcat-8.5.81.tar.gz
[tomcat@localhost ~]$ ls -al

폴더명 변경

$ mv apache-tomcat-8.5.81 tomcat-8.5.81

톰켓 실행

[tomcat@localhost ~]$ ./tomcat-8.5.81/bin/startup.sh

 

 

ip 얻는 방법은

ifconfig

인터넷 주소창에 입력

IP:8080

 

[톰켓 메모리튜닝]

서버구동이 느릴때 옵션변경 tomcat서버구동이느릴때를 참조

  • re설정이 따로 필요하면 bin 폴더 아래 setenv.sh 파일을 만든다.

$ tomcat@webstyle:~$ cd tomcat-8.5.81/bin/
$ tomcat@webstyle:~$ vi setenv.sh

 

setenv.sh 파일 생성 메모리튜닝및, 서버구동속도 증가, ip4 주소설정 START

export JAVA_OPTS="$JAVA_OPTS -server"
export JAVA_OPTS="$JAVA_OPTS -Xms1024m"
export JAVA_OPTS="$JAVA_OPTS -Xmx1024m"
export JAVA_OPTS="$JAVA_OPTS -Djava.security.egd=file:/dev/./urandom"
export JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"

튜닝후 재실행 해야 한다.

반응형

'웹서버 > 톰켓' 카테고리의 다른 글

tomcat URL Rewrite  (0) 2023.10.24

댓글