当前位置: 首页 > news >正文

Linux Shell 实现一键部署tomcat10+java13

        

tomcat 前言

Tomcat 服务器是一个免费的开放源代码的Web 应用服务器,属于轻量级应用服务器,在中小型系统和并发访问用户不是很多的场合下被普遍使用,是开发和调试JSP 程序的首选。对于一个初学者来说,可以这样认为,当在一台机器上配置好Apache 服务器,可利用它响应HTML(标准通用标记语言下的一个应用)页面的访问请求。实际上Tomcat是Apache 服务器的扩展,但运行时它是独立运行的,所以当你运行tomcat 时,它实际上作为一个与Apache 独立的进程单独运行的。

java 前言

Java具有大部分编程语言所共有的一些特征,被特意设计用于互联网的分布式环境。Java具有类似于C++语言的形式和感觉,但它要比C++语言更易于使用,而且在编程时彻底采用了一种以对象为导向的方式。

tomcat + java下载

tomcat下载java 下载
downloaddownload

Linux 各系统下载使用参考

Red HatRocky Linux Oracle Linux

AlmaLinux 

ubuntususelinuxesxiRHEL标准安装系统安装参考YUM参考

MobaXterm 远程连接工具

Red Hat Enterprise 9.0 文档Kickstart 生成器
downloaddownloaddownloaddownloaddownloaddownloaddownload参考参考配置参考download参考Kickstart 
版本兼容性

安装 tomcat+java

  • 创建安装自动化脚本

  • 实现在线下载tomcat,java,解压安装tomcat,java,环境变量设置,端口更改8082,开启(Server Status ,Manager App,Host Manager 用户名密码admin/admin)删除软件包,企业微信机器人通知
  • 以下基于Redhat系统
  • tomcat 安装位置 /opt/tomcat
  • java 安装位置/opt/jdk
  • Redhat 9 functions使用需要执行安装yum install initscripts -y 
  • curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=XXXXX' #更改自己的企业微信机器人地址 
  • curl -o /etc/yum.repos.d/redhat.repo http://mirrors.aliyun.com/repo/Centos-8.repo #阿里在线repo
  • yum install figlet -y #用于将文字转换为放大艺术字(使用figlet Mysql显示)
vim /tomcat_java_install.sh
#!/bin/sh
# -*- coding: utf-8 -*-
# Author: CIASM 
# Date: 2023/04/02<<!
████████╗ ██████╗ ███╗   ███╗ ██████╗ █████╗ ████████╗
╚══██╔══╝██╔═══██╗████╗ ████║██╔════╝██╔══██╗╚══██╔══╝██║   ██║   ██║██╔████╔██║██║     ███████║   ██║   ██║   ██║   ██║██║╚██╔╝██║██║     ██╔══██║   ██║   ██║   ╚██████╔╝██║ ╚═╝ ██║╚██████╗██║  ██║   ██║   ╚═╝    ╚═════╝ ╚═╝     ╚═╝ ╚═════╝╚═╝  ╚═╝   ╚═╝
!source /etc/rc.d/init.d/functions#tomcat configuration file
server_xml=/opt/tomcat/conf/server.xml
tomcat_user_xml=/opt/tomcat/conf/tomcat-users.xml
manager_xml=/opt/tomcat/conf/Catalina/localhost/manager.xml
context_xml=/opt/tomcat/webapps/host-manager/META-INF/context.xml#Define data path variables
data_downloads=/data/downloads
drive=/opt/tomcat_url=https://dlcdn.apache.org/tomcat/tomcat-10/v10.1.7/bin/
tomcat_gz=apache-tomcat-10.1.7.tar.gz
tomcat_catalogue=apache-tomcat-10.1.7
tomcat_new=tomcat
tomcat_PREFIX=/opt/tomcatjava_url=https://repo.huaweicloud.com/java/jdk/13+33/
java_gz=jdk-13_linux-x64_bin.tar.gz
JAVA_PREFIX=/opt/jdk
java_catalogue=jdk-13
java_catalogue_new=jdkfunction install_java (){
if [ ! -d ${JAVA_PREFIX} ];then
yum install net-tools wget -y
mkdir -p $data_downloads
wget -N -P $data_downloads $java_url$java_gz
tar -zxf $data_downloads/$java_gz -C $drive
mv $drive/$java_catalogue $drive/$java_catalogue_newif [ $? -eq 0 ];thensed -i '$aexport JAVA_HOME=/opt/jdk' /etc/profilesed -i '$aexport PATH=$JAVA_HOME/bin:$PATH:$CATALINA_HOME/bin' /etc/profilesource /etc/profilejava -version 2>&1 | tee /var/log/java_version.logaction "The java Install Sussess..." /bin/trueelseaction "The java Install Failed..." /bin/false exit 1fielseecho -e "\033[31mThe java already Install...\033[0m"
fi
}function install_tomcat (){
if [ ! -d ${tomcat_PREFIX} ];then
wget -N -P $data_downloads $tomcat_url$tomcat_gz
tar -zxf $data_downloads/$tomcat_gz -C $drive
mv $drive/$tomcat_catalogue $drive/$tomcat_new
useradd -M -d /opt/tomcat tomcat 
chown -R tomcat. /opt/tomcat
chmod +x /opt/tomcat/bin/*.shif [ $? -eq 0 ];thensed -i '$aexport CATALINA_HOME=/opt/tomcat' /etc/profilesource /etc/profilerm -rf /opt/tomcat/conf/tomcat-users.xmlrm -rf /opt/tomcat/webapps/host-manager/META-INF/context.xmlrm -rf /opt/tomcat/conf/server.xml/opt/tomcat/bin/version.sh | tee /var/log/tomcat_version.logConfigurin_tomcatmanager_xmlaction "The tomcat Install Sussess..." /bin/trueelseaction "The tomcat Install Failed..." /bin/false exit 1fielseecho -e "\033[31mThe tomcat already Install...\033[0m"
fi
}function Configurin_tomcat (){
cat >>/usr/lib/systemd/system/tomcat.service<<EOF
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target mysqld.service tomcat.keygen.service[Service]
Type=forkingEnvironment=JAVA_HOME=/opt/jdk
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms4096M -Xmx4096M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.shUser=tomcat
Group=tomcat
Restart=always[Install]
WantedBy=multi-user.target
EOFcat >>$tomcat_user_xml<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!--Licensed to the Apache Software Foundation (ASF) under one or morecontributor license agreements.  See the NOTICE file distributed withthis work for additional information regarding copyright ownership.The ASF licenses this file to You under the Apache License, Version 2.0(the "License"); you may not use this file except in compliance withthe License.  You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
-->
<tomcat-users xmlns="http://tomcat.apache.org/xml"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"version="1.0">
<!--By default, no user is included in the "manager-gui" role requiredto operate the "/manager/html" web application.  If you wish to use this app,you must define such a user - the username and password are arbitrary.Built-in Tomcat manager roles:- manager-gui    - allows access to the HTML GUI and the status pages- manager-script - allows access to the HTTP API and the status pages- manager-jmx    - allows access to the JMX proxy and the status pages- manager-status - allows access to the status pages onlyThe users below are wrapped in a comment and are therefore ignored. If youwish to configure one or more of these users for use with the manager webapplication, do not forget to remove the <!.. ..> that surrounds them. Youwill also need to set the passwords to something appropriate.
-->
<!--<user username="admin" password="<must-be-changed>" roles="manager-gui"/><user username="robot" password="<must-be-changed>" roles="manager-script"/>
-->
<!--The sample user and role entries below are intended for use with theexamples web application. They are wrapped in a comment and thus are ignoredwhen reading this file. If you wish to configure these users for use with theexamples web application, do not forget to remove the <!.. ..> that surroundsthem. You will also need to set the passwords to something appropriate.
-->
<!--<role rolename="tomcat"/><role rolename="role1"/><user username="tomcat" password="tomcat" roles="tomcat"/><user username="both" password="tomcat" roles="tomcat,role1"/><user username="role1" password="tomcat" roles="role1"/>
--><user username="admin" password="admin" roles="manager-gui,admin-gui"/> 
</tomcat-users>
EOFcat >>$context_xml<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!--Licensed to the Apache Software Foundation (ASF) under one or morecontributor license agreements.  See the NOTICE file distributed withthis work for additional information regarding copyright ownership.The ASF licenses this file to You under the Apache License, Version 2.0(the "License"); you may not use this file except in compliance withthe License.  You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
-->
<Context privileged="true" antiResourceLocking="false"docBase="$catalina.home /webapps/manager"><CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"sameSiteCookies="strict" /><Valve className="org.apache.catalina.valves.RemoteAddrValve"allow="^.*$" /><Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
</Context>
EOFcat >>$server_xml<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!--Licensed to the Apache Software Foundation (ASF) under one or morecontributor license agreements.  See the NOTICE file distributed withthis work for additional information regarding copyright ownership.The ASF licenses this file to You under the Apache License, Version 2.0(the "License"); you may not use this file except in compliance withthe License.  You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may notdefine subcomponents such as "Valves" at this level.Documentation at /docs/config/server.html-->
<Server port="8005" shutdown="SHUTDOWN"><Listener className="org.apache.catalina.startup.VersionLoggerListener" /><!-- Security listener. Documentation at /docs/config/listeners.html<Listener className="org.apache.catalina.security.SecurityListener" />--><!-- APR library loader. Documentation at /docs/apr.html --><Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /><!-- Prevent memory leaks due to use of particular java/javax APIs--><Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /><Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /><Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /><!-- Global JNDI resourcesDocumentation at /docs/jndi-resources-howto.html--><GlobalNamingResources><!-- Editable user database that can also be used byUserDatabaseRealm to authenticate users--><Resource name="UserDatabase" auth="Container"type="org.apache.catalina.UserDatabase"description="User database that can be updated and saved"factory="org.apache.catalina.users.MemoryUserDatabaseFactory"pathname="conf/tomcat-users.xml" /></GlobalNamingResources><!-- A "Service" is a collection of one or more "Connectors" that sharea single "Container" Note:  A "Service" is not itself a "Container",so you may not define subcomponents such as "Valves" at this level.Documentation at /docs/config/service.html--><Service name="Catalina"><!--The connectors can use a shared executor, you can define one or more named thread pools--><!--<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"maxThreads="150" minSpareThreads="4"/>--><!-- A "Connector" represents an endpoint by which requests are receivedand responses are returned. Documentation at :HTTP Connector: /docs/config/http.htmlAJP  Connector: /docs/config/ajp.htmlDefine a non-SSL/TLS HTTP/1.1 Connector on port 8080--><Connector port="8082" protocol="HTTP/1.1"connectionTimeout="20000"redirectPort="8443" /><!-- A "Connector" using the shared thread pool--><!--<Connector executor="tomcatThreadPool"port="8080" protocol="HTTP/1.1"connectionTimeout="20000"redirectPort="8443" />--><!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2This connector uses the NIO implementation. The defaultSSLImplementation will depend on the presence of the APR/nativelibrary and the useOpenSSL attribute of the AprLifecycleListener.Either JSSE or OpenSSL style configuration may be used regardless ofthe SSLImplementation selected. JSSE style configuration is used below.--><!--<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"maxThreads="150" SSLEnabled="true"><UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /><SSLHostConfig><Certificate certificateKeystoreFile="conf/localhost-rsa.jks"type="RSA" /></SSLHostConfig></Connector>--><!-- Define an AJP 1.3 Connector on port 8009 --><!--<Connector protocol="AJP/1.3"address="::1"port="8009"redirectPort="8443" />--><!-- An Engine represents the entry point (within Catalina) that processesevery request.  The Engine implementation for Tomcat stand aloneanalyzes the HTTP headers included with the request, and passes themon to the appropriate Host (virtual host).Documentation at /docs/config/engine.html --><!-- You should set jvmRoute to support load-balancing via AJP ie :<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">--><Engine name="Catalina" defaultHost="localhost"><!--For clustering, please take a look at documentation at:/docs/cluster-howto.html  (simple how to)/docs/config/cluster.html (reference documentation) --><!--<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>--><!-- Use the LockOutRealm to prevent attempts to guess user passwordsvia a brute-force attack --><Realm className="org.apache.catalina.realm.LockOutRealm"><!-- This Realm uses the UserDatabase configured in the global JNDIresources under the key "UserDatabase".  Any editsthat are performed against this UserDatabase are immediatelyavailable for use by the Realm.  --><Realm className="org.apache.catalina.realm.UserDatabaseRealm"resourceName="UserDatabase"/></Realm><Host name="localhost"  appBase="webapps"unpackWARs="true" autoDeploy="true"><!-- SingleSignOn valve, share authentication between web applicationsDocumentation at: /docs/config/valve.html --><!--<Valve className="org.apache.catalina.authenticator.SingleSignOn" />--><!-- Access log processes all example.Documentation at: /docs/config/valve.htmlNote: The pattern used is equivalent to using pattern="common" --><Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"prefix="localhost_access_log" suffix=".txt"pattern="%h %l %u %t &quot;%r&quot; %s %b" /></Host></Engine></Service>
</Server>
EOFsystemctl daemon-reload  &&  systemctl enable --now tomcat
firewall-cmd --zone=public --add-port=8082/tcp --permanent && firewall-cmd --reload
}function manager_xml (){
cat >>$manager_xml<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!--Licensed to the Apache Software Foundation (ASF) under one or morecontributor license agreements.  See the NOTICE file distributed withthis work for additional information regarding copyright ownership.The ASF licenses this file to You under the Apache License, Version 2.0(the "License"); you may not use this file except in compliance withthe License.  You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
-->
<Context privileged="true" antiResourceLocking="false"docBase="$catalina.home /webapps/manager"><CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"sameSiteCookies="strict" /><Valve className="org.apache.catalina.valves.RemoteAddrValve"allow="^.*$" /><Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
</Context>
EOFsystemctl restart tomcat
rm -rf $data_downloads/*
}function Deployment_completion_notification (){host_ID=`dmidecode -s system-serial-number | sed -r 's/\s+//g'`host_IP=`ifconfig -a | grep inet | grep -v '127.0.0.1' | awk '{ print $2}' | awk 'NR==1'`memory_Size=`dmidecode -t memory | grep Size | grep -v No | awk '{sum+=$2} END {printf "%.0fG\n",sum/1^C4}'`CPU_Model=`cat /proc/cpuinfo | grep 'model name' | awk '{print $6}' | uniq`Disk_size=`fdisk -l | grep "sda:" | awk '{print $3$4}'`redhat_version=`cat /etc/redhat-release | grep "release" | awk '{print $6}'`redhat_core=`cat /proc/version | grep "version" | awk '{print $3}'`tomcat_version=`cat /var/log/tomcat_version.log | grep "Server version" | awk '{print $4}'`tomcat_server=`systemctl status tomcat | grep "Active" | awk '{print $2}'`java_version=`cat /var/log/java_version.log | sed -e 's/"//g' | grep "java version" | awk '{print $3}'`curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=XXXX' \-H 'Content-Type: application/json' \-d '{"msgtype": "markdown","markdown": {"content": " **system check** <font color=\"info\"> complete </font>  \n> **Host IP Address** \n[http://'$host_IP'](http://'$host_IP') \n> **Hardware information** \nhostSN:<font color=\"info\"> '$host_ID' </font> \nCPU_Model:<font color=\"info\"> '$CPU_Model' </font> \nmemory_Size:<font color=\"info\"> '$memory_Size' </font> \nDisk_size:<font color=\"info\"> '$Disk_size' </font> \nSystem_version:<font color=\"info\"> '$redhat_version' </font> \nsystem_core:<font color=\"info\"> '$redhat_core' </font> \n> **tomcat install** \ntomcat_server:<font color=\"info\"> '$tomcat_server' </font> \ntomcat_version:<font color=\"info\"> '$tomcat_version' </font> \njava_server:<font color=\"info\"> '$java_version' </font> \n",}}'
}function main (){
install_java
install_tomcat
Deployment_completion_notification 
}main

执行安装

sh /tomcat_java_install.sh

企业微信机器人提醒 

访问 http://Ip:8082 

Server Status

  • 用户名密码admin/admin

Manager App  

  • 用户名密码admin/admin

Host Manager

  • 用户名密码admin/admin

相关文章:

Linux Shell 实现一键部署tomcat10+java13

tomcat 前言 Tomcat 服务器是一个免费的开放源代码的Web 应用服务器&#xff0c;属于轻量级应用服务器&#xff0c;在中小型系统和并发访问用户不是很多的场合下被普遍使用&#xff0c;是开发和调试JSP 程序的首选。对于一个初学者来说&#xff0c;可以这样认为&#xff0c;当…...

软硬皆施,WMS仓库管理系统+PDA,实现效率狂飙

人工经验Excel表格&#xff0c;是传统第三方仓储企业常用的管理模式。在这种管理模式下&#xff0c;对仓库员工的Excel操作能力、业务经验和工作素养要求极高。一旦员工的经验能力不足&#xff0c;就会导致仓库业务运行不顺畅&#xff0c;效率低下&#xff0c;而员工也会因长时…...

DJ3-2 传输层(第二节课)

目录 一、如何实现可靠数据传输 1. 需要解决地问题 2. 使用的描述方法 二、rdt1.0&#xff1a;完全可靠信道上的可靠数据传输 1. 前提条件 2. 有限状态机 FSM 三、rdt2.0&#xff1a;仅具有 bit 错误的信道上的可靠数据传输 1. 前提条件 2. 有限状态机 FSM 3. 停等协…...

FrIf-FrIf功能模块概述和与底层驱动的交互

总目录链接==>> AutoSAR入门和实战系列总目录 总目录链接==>> AutoSAR BSW高阶配置系列总目录 文章目录 1 FlexRay 接口模块概述2 与FlexRay底层驱动的交互1 FlexRay 接口模块概述 FlexRay 接口模块通过 FlexRay 驱动程序模块间接与 FlexRay 控制器通信。 它…...

【LeetCode】前 K 个高频元素(堆)

目录 1.题目要求&#xff1a; 给你一个整数数组 nums 和一个整数 k &#xff0c;请你返回其中出现频率前 k 高的元素。你可以按 任意顺序 返回答案。 2.解题思路&#xff1a; 代码展示&#xff1a; 1.题目要求&#xff1a; 给你一个整数数组 nums 和一个整数 k &#xff0…...

Java ---多态

&#xff08;一&#xff09;定义 官方&#xff1a;多态是同一个行为具有多个不同表现形式或形态的能力。多态就是同一个接口&#xff0c;使用不同的实例而执行不同操作。 生活中的多态&#xff0c;如图所示&#xff1a; 多态性是对象多种表现形式的体现。 现实中&#xff0c;…...

13个程序员常用开发工具用途推荐整理

作为一名刚入门的程序员&#xff0c;选择合适的开发工具可以提高工作效率&#xff0c;加快学习进度。在本文中&#xff0c;我将向您推荐10个常用的开发工具&#xff0c;并通过简单的例子和代码来介绍它们的主要用途。 1. Visual Studio Code Visual Studio Code&#xff08;V…...

TCP分包和粘包

文章目录TCP分包和粘包TCP分包TCP 粘包分包和粘包解决方案&#xff1a;TCP分包和粘包 TCP分包 场景&#xff1a;发送方发送字符串”helloworld”&#xff0c;接收方却分别接收到了两个数据包&#xff1a;字符串”hello”和”world”发送端发送了数量较多的数据&#xff0c;接…...

手撕深度学习中的优化器

深度学习中的优化算法采用的原理是梯度下降法&#xff0c;选取适当的初值params&#xff0c;不断迭代&#xff0c;进行目标函数的极小化&#xff0c;直到收敛。由于负梯度方向时使函数值下降最快的方向&#xff0c;在迭代的每一步&#xff0c;以负梯度方向更新params的值&#…...

英文打字小游戏

目录 1 实验目的 2 实验报告内容 3 实验题目 4 实验环境 5 实验分析和设计思路 6 流程分析和类图结构 ​编辑 7. 实验结果与测试分析 8. 总结 这周没有更新任何的文章&#xff0c;感到十分的抱歉。因为我们老师让我们做一个英文打字的小游戏&#xff0c;并要求撰写实验…...

PCB生产工艺流程三:生产PCB的内层线路有哪7步

PCB生产工艺流程三&#xff1a;生产PCB的内层线路有哪7步 在我们的PCB生产工艺流程的第一步就是内层线路&#xff0c;那么它的流程又有哪些步骤呢&#xff1f;接下来我们就以内层线路的流程为主题&#xff0c;进行详细的分析。 由半固化片和铜箔压合而成&#xff0c;用于…...

算法竞赛进阶指南0x61 最短路

对于一张有向图&#xff0c;我们一般有邻接矩阵和邻接表两种存储方式。对于无向图&#xff0c;可以把无向边看作两条方向相反的有向边&#xff0c;从而采用与有向图一样的存储方式。 $$ 邻接矩阵的空间复杂度为 O(n^2)&#xff0c;因此我们一般不采用这种方式 $$ 我们用数组模…...

[学习篇] Autoreleasepool

参考文章&#xff1a; https://www.jianshu.com/p/ec2c854b2efd https://suhou.github.io/2018/01/21/%E5%B8%A6%E7%9D%80%E9%97%AE%E9%A2%98%E7%9C%8B%E6%BA%90%E7%A0%81----%E5%AD%90%E7%BA%BF%E7%A8%8BAutoRelease%E5%AF%B9%E8%B1%A1%E4%BD%95%E6%97%B6%E9%87%8A%E6%94%BE/ …...

晶体基本知识

文章目录晶体基本知识基本概念晶胞&#xff1c;晶格&#xff1c;晶粒&#xff1c;晶体晶胞原子坐标(原子分数坐标)六方晶系与四轴定向七大晶系和十四种点阵结构学习资料吉林大学某实验室教程---知乎系列晶体与压敏器件晶体基本知识 基本概念 晶胞&#xff1c;晶格&#xff1c…...

免费CRM如何进行选择?

如今CRM领域成为炙手可热的赛道&#xff0c;很多CRM系统厂商甚至打出完全免费的口号&#xff0c;是否真的存在完全免费的crm系统&#xff1f;很多企业在免费使用过程中会出现被迫终止的问题&#xff0c;需要花费高价钱才能继续使用&#xff0c;那么&#xff0c;免费crm系统哪个…...

关于金融类iOS套壳上架,我帮你总结了这些经验

首先说明&#xff0c;本文中出现的案例的&#xff0c;没有特别的专门针对谁&#xff0c;只是用于分析&#xff0c;如有觉得不妥的&#xff0c;请及时联系我删除&#xff0c;鉴于本文发出之后&#xff0c;可能造成的一些影响&#xff0c;所以大家看看就好了&#xff0c;千万不要…...

4年功能测试月薪9.5K,3个月时间成功进阶自动化,跳槽涨薪6k后我的路还很长...

前言 其实最开始我并不是互联网从业者&#xff0c;是经历了一场六个月的培训才入的行&#xff0c;这个经历仿佛就是一个遮羞布&#xff0c;不能让任何人知道&#xff0c;就算有面试的时候被问到你是不是被培训的&#xff0c;我还是不能承认这段历史。我是为了生存&#xff0c;…...

python url解码详解

python url解码 url是数据的一个部分&#xff0c;一般会用来做什么呢&#xff1f;比如网站的 URL&#xff0c;比如搜索引擎中的 url&#xff0c;再比如网页中的图片等。 你也许不知道&#xff0c;在 Web页面中的图片、链接、超链接都是 URL&#xff0c;也就是 url。 而如果想要…...

leetcode102:二叉树的层序遍历

给你二叉树的根节点 root &#xff0c;返回其节点值的 层序遍历 。 &#xff08;即逐层地&#xff0c;从左到右访问所有节点&#xff09;。 示例 1&#xff1a; 输入&#xff1a;root [3,9,20,null,null,15,7] 输出&#xff1a;[[3],[9,20],[15,7]] 示例 2&#xff1a; 输入…...

深度学习openMMLab的介绍和使用

文章目录MMCV介绍MMCV的安装修改链接中的cu113修改链接中的torch1.10.0物体分类MMCLS源码下载配置参数解读配置文件的组成如何生成完整配置文件定义自己的数据集构建自己的数据集训练自己的任务物体检测MMDetection语义分割MMSegmentation姿态估计MMPose未完成&#xff0c;持续…...

挑战杯推荐项目

“人工智能”创意赛 - 智能艺术创作助手&#xff1a;借助大模型技术&#xff0c;开发能根据用户输入的主题、风格等要求&#xff0c;生成绘画、音乐、文学作品等多种形式艺术创作灵感或初稿的应用&#xff0c;帮助艺术家和创意爱好者激发创意、提高创作效率。 ​ - 个性化梦境…...

【C++从零实现Json-Rpc框架】第六弹 —— 服务端模块划分

一、项目背景回顾 前五弹完成了Json-Rpc协议解析、请求处理、客户端调用等基础模块搭建。 本弹重点聚焦于服务端的模块划分与架构设计&#xff0c;提升代码结构的可维护性与扩展性。 二、服务端模块设计目标 高内聚低耦合&#xff1a;各模块职责清晰&#xff0c;便于独立开发…...

JVM暂停(Stop-The-World,STW)的原因分类及对应排查方案

JVM暂停(Stop-The-World,STW)的完整原因分类及对应排查方案,结合JVM运行机制和常见故障场景整理而成: 一、GC相关暂停​​ 1. ​​安全点(Safepoint)阻塞​​ ​​现象​​:JVM暂停但无GC日志,日志显示No GCs detected。​​原因​​:JVM等待所有线程进入安全点(如…...

基于 TAPD 进行项目管理

起因 自己写了个小工具&#xff0c;仓库用的Github。之前在用markdown进行需求管理&#xff0c;现在随着功能的增加&#xff0c;感觉有点难以管理了&#xff0c;所以用TAPD这个工具进行需求、Bug管理。 操作流程 注册 TAPD&#xff0c;需要提供一个企业名新建一个项目&#…...

Python基于历史模拟方法实现投资组合风险管理的VaR与ES模型项目实战

说明&#xff1a;这是一个机器学习实战项目&#xff08;附带数据代码文档&#xff09;&#xff0c;如需数据代码文档可以直接到文章最后关注获取。 1.项目背景 在金融市场日益复杂和波动加剧的背景下&#xff0c;风险管理成为金融机构和个人投资者关注的核心议题之一。VaR&…...

接口自动化测试:HttpRunner基础

相关文档 HttpRunner V3.x中文文档 HttpRunner 用户指南 使用HttpRunner 3.x实现接口自动化测试 HttpRunner介绍 HttpRunner 是一个开源的 API 测试工具&#xff0c;支持 HTTP(S)/HTTP2/WebSocket/RPC 等网络协议&#xff0c;涵盖接口测试、性能测试、数字体验监测等测试类型…...

stm32wle5 lpuart DMA数据不接收

配置波特率9600时&#xff0c;需要使用外部低速晶振...

算术操作符与类型转换:从基础到精通

目录 前言&#xff1a;从基础到实践——探索运算符与类型转换的奥秘 算术操作符超级详解 算术操作符&#xff1a;、-、*、/、% 赋值操作符&#xff1a;和复合赋值 单⽬操作符&#xff1a;、--、、- 前言&#xff1a;从基础到实践——探索运算符与类型转换的奥秘 在先前的文…...

StarRocks 全面向量化执行引擎深度解析

StarRocks 全面向量化执行引擎深度解析 StarRocks 的向量化执行引擎是其高性能的核心设计&#xff0c;相比传统行式处理引擎&#xff08;如MySQL&#xff09;&#xff0c;性能可提升 5-10倍。以下是分层拆解&#xff1a; 1. 向量化 vs 传统行式处理 维度行式处理向量化处理数…...

基于Uniapp的HarmonyOS 5.0体育应用开发攻略

一、技术架构设计 1.混合开发框架选型 &#xff08;1&#xff09;使用Uniapp 3.8版本支持ArkTS编译 &#xff08;2&#xff09;通过uni-harmony插件调用原生能力 &#xff08;3&#xff09;分层架构设计&#xff1a; graph TDA[UI层] -->|Vue语法| B(Uniapp框架)B --&g…...