여백에 도장 찍기

Tomcat Installation & Settings on CentOS7 본문

Web Server & WAS/Apache Tomcat

Tomcat Installation & Settings on CentOS7

Linzyseo 2019. 3. 21. 12:53

CentOS7 에 Apache Tomcat 설치 

[root@localhost ~]# wget http://archive.apache.org/dist/tomcat/tomcat-8/v8.5.11/bin/apache-tomcat-8.5.11.tar.gz
[root@localhost ~]# tar xvfz apache-tomcat-8.5.11.tar.gz
[root@localhost ~]# mv apache-tomcat-8.5.11 /usr/local 
[root@localhost ~]# /usr/local/apache-tomcat-8.5.11/bin/startup.sh // Tomcat 시작
[root@localhost ~]# /usr/local/apache-tomcat-8.5.11/bin/shutdown.sh // Tomcat 종료

 

* Tomcat 설정 파일: /usr/local/apache-tomcat-8.5.11/conf/server.xml 

 

MySQL DB - Tomcat 연동 설정 

<Resource name="jdbc/idb"
	auth="Container"
    actory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
    driverClasName="com.mysql.jdbc.Driver"
    type="javax.sql.DataSource"
    url="jdbc:mysql://192.168.33.xx:3306/dbName?characterEncoding=UTF-8&amp;autoReconnect=true&amp;allowMultiQueries=true"
    username="dbUser"
    password="dbPassword"
    maxActive="30"
    maxIdle="10"
    maxWait="-1" validationQuery="select 1" />

 

Comments