亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

tomcat+jsp訪問mysql

發布時間:2020-08-16 18:46:03 來源:ITPUB博客 閱讀:166 作者:ckxllf 欄目:MySQL數據庫

  1. JDK 環境變量設置 (/etc/profile)

  export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64

  export JRE_HOME=${JAVA_HOME}/jre

  export JAVA_BIN=${JAVA_HOME}/bin

  export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib

  export PATH=${JAVA_HOME}/bin:$PATH

  2. Tomcat 安裝包放入/usr/local/tomcat 目錄, 不用安裝。

  tomcat 啟動:/usr/local/tomcat/bin/catalina.sh start

  tomcat 關閉:/usr/local/tomcat/bin/catalina.sh stop

  或配置服務文件 /etc/init.d/tomcat:

  systemctl enable tomcat

  systemctl restart tomate

  #!/bin/bash

  ### BEGIN INIT INFO

  # Provides: tomcat

  # Required-Start: $local_fs $remote_fs $network $syslog

  # Required-Stop: $local_fs $remote_fs $network $syslog

  # Default-Start: 2 3 4 5

  # Default-Stop: 0 1 6

  # Short-Description: starts the tomcat

  # Description: Tomcat server daemon

  ### END INIT INFO

  JAVA_OPTS='-server -Xms64m -Xmx128m'

  JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/

  CATALINA_HOME=/usr/local/tomcat

  #export JAVA_OPTS JAVA_HOME CATALINA_HOME

  $CATALINA_HOME/bin/catalina.sh $*

  ~

  修改tomcat配置:

  a. /usr/local/tomcat/conf/tomcat-users.xml

  添加如下配置

  用于Manager APP使用

  b. /usr/local/tomcat/conf/server.xml 修改server配置

  端口修改為80

  connectionTimeout="20000"

  redirectPort="8443" />

  添加虛擬主機

  unpackWARs="true" autoDeploy="true">

  prefix="localhost_access_log." suffix=".txt"

  pattern="%h %l %u %t "%r" %s %b" />

  修改/etc/hosts文件

  192.168.99.101 www.test1.com

  3. 官方下載 mysql-connector-java-5.1.48.tar.gz

  拷貝文件./mysql-connector-java-5.1.48/mysql-connector-java-5.1.48-bin.jar 到 /usr/local/tomcat/lib目錄下

  4. 靜態文件編寫 test.jsp

  6. Excute

  

tomcat+jsp訪問mysql

  7.Others

  HTTPS Enable

  1. 生成keystore 無錫婦科檢查醫院 http://www.87554006.com/

  keytool -genkey -v -alias testKey -keyalg RSA -validity 3650 -keystore test.keystore

  2. 拷貝到路徑/test.keystore

  root@ubuntu:/usr/local/tomcat# find . -name test.keystore

  ./conf/test.keystore

  3. 設置server.xml

  /usr/local/tomcat/conf/server.xml

  maxThreads="150" SSLEnabled="true" scheme="https" secure="true"

  clientAuth="false" sslProtocol="TLS" keystoreFile="/test.keystore" keystorePass="111111" />

  

tomcat+jsp訪問mysql

  查看keystore信息

  root@ubuntu:/# keytool -list -v -keystore test.keystore

  Enter keystore password:

  Keystore type: jks

  Keystore provider: SUN

  Your keystore contains 1 entry

  Alias name: testkey

  Creation date: Jul 31, 2019

  Entry type: PrivateKeyEntry

  Certificate chain length: 1

  Certificate[1]:

  Owner: CN=x, OU=t, O=tx, L=sh, ST=sh, C=cn

  Issuer: CN=x, OU=t, O=tx, L=sh, ST=sh, C=cn

  Serial number: 4ff9404b

  Valid from: Wed Jul 31 16:58:42 CST 2019 until: Sat Jul 28 16:58:42 CST 2029

  Certificate fingerprints:

  MD5: E1:5D:D1:D4:09:5C:A6:05:2A:E2:7A:2F:83:24:F4:B5

  SHA1: C9:4D:FA:96:96:EC:CC:74:5B:A3:6E:7B:01:E3:E5:A6:69:87:FC:12

  SHA256: BD:EB:3C:C9:37:B3:A0:9C:FC:2B:D9:D4:5D:8C:6C:08:46:BB:06:1B:65:26:56:90:D3:01:1F:33:C9:75:D2:D4

  Signature algorithm name: SHA256withRSA

  Subject Public Key Algorithm: 2048-bit RSA key

  Version: 3

  Extensions:

  #1: ObjectId: 2.5.29.14 Criticality=false

  SubjectKeyIdentifier [

  KeyIdentifier [

  0000: 98 8C 07 FF 38 6D 70 45 0D CE 07 04 50 39 2D 8B ....8mpE....P9-.

  0010: 06 44 0B 36 .D.6

  ]

  ]

  *******************************************

  *******************************************

  Warning:

  The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore test.keystore -destkeystore test.keystore -deststoretype pkcs12".

  root@ubuntu:/#

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

永泰县| 南陵县| 隆回县| 闸北区| 邹城市| 盐津县| 荆门市| 镇坪县| 河西区| 吴堡县| 茌平县| 奎屯市| 全椒县| 武定县| 樟树市| 大同市| 清远市| 麻江县| 溧水县| 龙山县| 白水县| 三江| 双城市| 瑞金市| 望城县| 芦山县| 灵川县| 荣昌县| 浦县| 诏安县| 抚松县| 迁安市| 印江| 红原县| 温州市| 磴口县| 甘肃省| 巫山县| 阿鲁科尔沁旗| 甘谷县| 英山县|