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

汽车展示网站wordpress 关闭插件更新

汽车展示网站,wordpress 关闭插件更新,semifinal,网站开发还是软件开发注意#xff1a;建议使用3.6.0#xff0c;我升级到3.7.1#xff0c;并没有多什么新功能#xff0c;反而电表的实时数据只能看到累计电能了#xff0c;我回退了就正常#xff0c;数据库是兼容的#xff0c;java版本换位java11#xff0c;其他不变就好 背景#xff1a;…注意建议使用3.6.0我升级到3.7.1并没有多什么新功能反而电表的实时数据只能看到累计电能了我回退了就正常数据库是兼容的java版本换位java11其他不变就好 背景 国外欧标充电桩开发中服务器对接是很重要的一环出国外的基本都是需要支持OCPP功能基本要求是OCPP1.6还有些客户已经开始要2.0了OCPP测试至关重要目前有两种测试方法1使用Monta服务器去注册一个账号然后链接调试即可2.自己在云端搭建一个自己的OCPP平台SteVe。 两个平台我都有使用用得多并且顺手的是SteVe平台。以下是简单总结一下使用后的感受。 Monta平台界面比较单一下发的命令的应答只能看log里面找到对应的应答数据json优点是有认证测试功能可以免费自己注册一个账号就能使用免费https://ocpp-toolkit.monta.app/ SteVe平台界面丰富可以管理ocpp tags充电卡或者get configration的时候预设很多系统的key使用应答命令会帮你解析在页面显示出来目前SteVe平台是最完善的并且是开源免费的。 综上所述自己搭建一个服务器就很有必要了。 SteVe平台搭建主要流程 1.先准备一个云服务器如果没有云服务器可以考虑用虚拟机安装一个centos7然后把这个机器映射到外网临时用也行。2.下载SteVe官方源码包我这里就用3.17.1举例。官方源码在GitHub https://github.com/steve-community/steve。3.数据库MYSQL8的安装与配置因为CentOS使用的是mariadb但你去编译SteVe的时候你会发现提示非长期支持版会报错。4.安装Java17Centos内置了Java工具但查看版本发现是1.8的SteVe3.7.1要求是Java17删除Java1.8再安装Java17.5.编译SteVe源码。6.运行测试7.制作开机自启。 详细步骤 1.下载SteVe源码。并阅读README.md了解这个平台需要用到的环境先配置好这些环境然后了解编译工具和编译运行。经过阅读发现需要使用mysql8java17Maven 2.首先来安装数据库数据库MYSQL8的安装与配置查看当前mariadb版本信息。 rpm -e --nodeps 上一条命令列出的文件名。 rpm -qa|grep mariadb 用于检查是否卸载干净。 让AI帮忙写了一个centos7安装mysql8的脚步这样比传统的下载安装更省事 #!/bin/bash# Exit script on any error set -e# Fixed password to be used fixed_passwordMsb666666# 1. Add the MySQL Yum repository echo Adding the MySQL Yum repository... wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpmecho Checking the integrity of the downloaded package... rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysqlecho Installing the MySQL Yum repository... yum localinstall mysql80-community-release-el7-3.noarch.rpm -y# 2. Install the MySQL server echo Installing the MySQL server... yum install mysql-community-server -y# 3. Start the MySQL service echo Starting the MySQL service... systemctl start mysqld systemctl enable mysqld# 4. Get the temporary password generated for the root user echo Retrieving the temporary password... temp_password$(grep temporary password /var/log/mysqld.log | tail -1 | rev | cut -d -f1 | rev)echo The temporary MySQL root password is: $temp_password# 5. Change the root users password to the desired fixed password echo Changing the root users password...mysql --connect-expired-password -uroot -p$temp_password -EOF ALTER USER rootlocalhost IDENTIFIED BY $fixed_password; FLUSH PRIVILEGES; EOFecho The root password has been successfully changed to the fixed password.# Optionally, you can run the mysql_secure_installation steps here if you want to automate it further.echo MySQL 8 installation is complete.还有mysql运行脚本 #!/bin/bash# This script starts the MySQL service and sets it to launch on boot# Exit script on any error set -e# Start the MySQL service echo Starting the MySQL service... systemctl start mysqld# Enable the MySQL service to start on boot echo Setting the MySQL service to start on boot... systemctl enable mysqld# Confirmation message echo MySQL service has been started and set to launch on boot.安装好了之后通过ssh命令行登陆数据库 mysql -u root接下来为steve创建相关数据 steve 数据库mysql8 用户名root 密码Msb666666, Steve数据库用户名steve 密码changeme 脚本安装后需要更新默认的随机密码密码不能太简单需要带点符合否则会失败 ALTER USER rootlocalhost IDENTIFIED BY Msb666666,; FLUSH PRIVILEGES;创建SteVe需要用到的数据库stevedb CREATE DATABASE stevedb CHARACTER SET utf8 COLLATE utf8_unicode_ci;创建完毕后可以使用命令查看一下可以看到Stevedb mysql show databases; -------------------- | Database | -------------------- | information_schema | | mysql | | performance_schema | | stevedb | | sys | -------------------- 5 rows in set (0.00 sec)再为这个数据创建一个数据库用户steve这个和SteVe平台README.md默认用户名和密码保持一致否则两边一起改。 CREATE USER stevelocalhost IDENTIFIED BY changeme; GRANT ALL PRIVILEGES ON stevedb.* TO stevelocalhost; GRANT SUPER ON *.* TO stevelocalhost;然后退出数据库尝试使用新数据库用户登陆 mysql -u steve -pType help; or \h for help. Type \c to clear the current input statement.mysql show databases; -------------------- | Database | -------------------- | information_schema | | performance_schema | | stevedb | -------------------- 3 rows in set (0.00 sec)mysql 这样就完成了不需要建表这个SteVe在打包编译和运行的时候都会自动建表。 编译之前还需要改一下数据库默认时区解决java编译的时候时区问题。 vi /etc/my.cnf增加default-time-zone‘08:00’ 重启数据库 systemctl restart mysqld数据库好了还需要Java运行环境 yum install java-17-openjdk-devel如果系统里有多个java版本可以使用alternatives来切换 CentOS 支持通过 alternatives 命令来管理多个版本的 Java。您可以按照以下步骤进行设置 alternatives --install /usr/bin/javac java /usr/lib/jvm/temurin-17-jdk/bin/java 1 alternatives --install /usr/bin/javac javac /usr/lib/jvm/temurin-17-jdk/bin/javac 1sudo alternatives --config java选择Java17即可 修改Steve代码 修改Java代码改到上海时区东八区方便测试使用 public class Application implements ApplicationStarter, AutoCloseable {private final ApplicationStarter delegate;public Application() {// For Hibernate validatorSystem.setProperty(org.jboss.logging.provider, slf4j);SteveConfiguration sc SteveConfiguration.CONFIG;log.info(Loaded the properties. Starting with the {} profile, sc.getProfile());// 设置java.util.TimeZone的默认时区为东八区TimeZone.setDefault(TimeZone.getTimeZone(Asia/Shanghai)); DateTimeZone.setDefault(DateTimeZone.forID(Asia/Shanghai));//TimeZone.setDefault(TimeZone.getTimeZone(sc.getTimeZoneId()));//DateTimeZone.setDefault(DateTimeZone.forID(sc.getTimeZoneId()));log.info(Date/time zone of the application is set to {}. Current date/time: {}, sc.getTimeZoneId(), DateTime.now());switch (sc.getProfile()) {case DEV:默认的配置部署到服务器是无法正常访问的需要修改一下配置数据库部分一定要和前面配置的数据库的鞥冷信息和端口一样网页登录信息建议改为自己的密码最好还是随机密码修改的java配置文件在src\main\resources\config\prod\main.properties # Just to be backwards compatible with previous versions, this is set to steve, # since there might be already configured chargepoints expecting the older path. # Otherwise, might as well be changed to something else or be left empty. # context.path steve# Database configuration # db.ip 127.0.0.1 db.port 3306 db.schema stevedb db.user steve db.password changeme# Credentials for Web interface access # auth.user admin auth.password 写上你的密码# The header key and value for Web API access using API key authorization. # Both must be set for Web APIs to be enabled. Otherwise, we will block all calls. # webapi.key STEVE-API-KEY webapi.value # Jetty configuration # server.host 0.0.0.0 server.gzip.enabled true# Jetty HTTP configuration # http.enabled true http.port 8080# Jetty HTTPS configuration # https.enabled false https.port 8443 keystore.path keystore.password # When the WebSocket/Json charge point opens more than one WebSocket connection, # we need a mechanism/strategy to select one of them for outgoing requests. # For allowed values see de.rwth.idsg.steve.ocpp.ws.custom.WsSessionSelectStrategyEnum. # ws.session.select.strategy ALWAYS_LAST# if BootNotification messages arrive (SOAP) or WebSocket connection attempts are made (JSON) from unknown charging # stations, we reject these charging stations, because stations with these chargeBoxIds were NOT inserted into database # beforehand. by setting this property to true, this behaviour can be modified to automatically insert unknown # stations into database and accept their requests. # # CAUTION: setting this property to true is very dangerous, because we will accept EVERY BootNotification or WebSocket # connection attempt from ANY sender as long as the sender knows the URL and sends a valid message. # auto.register.unknown.stations false# if this field is set, it will take precedence over the default regex we are using in # de.rwth.idsg.steve.web.validation.ChargeBoxIdValidator.REGEX to validate the format of the chargeBoxId values # charge-box-id.validation.regex ### DO NOT MODIFY ### steve.version ${project.version} git.describe ${git.commit.id.describe} db.sql.logging false profile prod安装Maven工具这个是编译这个项目必不可少的工具 wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repoyum install -y apache-maven[rootiZj6cagyhi0qjy83boeqcyZ ~]# mvn -version Apache Maven 3.0.5 (Red Hat 3.0.5-17) Maven home: /usr/share/maven Java version: 17.0.13, vendor: Eclipse Adoptium Java home: /usr/lib/jvm/temurin-17-jdk Default locale: en_US, platform encoding: UTF-8 OS name: linux, version: 3.10.0-1160.114.2.el7.x86_64, arch: amd64, family: unix编译代码生成Java应用程序 ./mvnw package执行并测试 /usr/bin/java -jar /home/steve3.7.1/target/steve.jar打开网页 能打开基本就成功了登陆用户名和密码是src\main\resources\config\prod\main.properties里面的 # Credentials for Web interface access # auth.user admin auth.password 写上你的密码手工执行通过后可以制作自启动Steve服务器 vi /etc/systemd/system/steve.service[Unit] DescriptionSteve Java Application[Service] Userroot# 替换为实际运行该服务的系统用户名 ExecStart/usr/bin/java -jar /home/steve3.7.1/target/steve.jar WorkingDirectory/home/steve3.7.1/target # 确保这是jar文件所在的目录 SuccessExitStatus143 # java进程退出码为143表示正常退出 TimeoutStopSec10 Restarton-failure # 服务失败时进行重启 RestartSec5 # 重启间隔时间[Install] WantedBymulti-user.targetsystemctl daemon-reload systemctl enable steve.service systemctl start steve.service systemctl status steve.service//重启服务用户修改了服务源码重启服务生效。 systemctl restart steve.service
http://www.sczhlp.com/news/264637/

相关文章:

  • wordpress 双陈沧州市网站优化排名
  • 北京网站制作外包腾讯云做视频网站
  • 自学做网站一般要多久部门网站建设的工作汇报
  • 做网站的用处简单网站制作实验报告
  • 怎么弄公司网站页面设计怎么样
  • wordpress老网站重装法vps 网站能打开
  • 网络推广策略概念seo sem论坛
  • 为客户创建网站必须做网站公司在哪
  • 青岛博海建设集团有限公司网站编辑器wordpress
  • 重庆平台网站建设文创产品设计图片
  • wordpress做网站怎么样网站建设的软件是哪个
  • 国内响应式网站教育培训 营销型网站系统
  • iis网站属性在哪温州外贸企业网站建设
  • 做一个中文域名购物网站要多少钱精美网站建设公司
  • 九江集团网站建设电商网站设计思维导图
  • 网站建站流程有哪些免备案网站空间购买
  • 在百度上建网站搜素引擎排名优化计费方式
  • 网站系统参数设置花都网站建设公司天蝎信息
  • 青岛网站设计微动力做网站带来好处
  • 厦门网站流量优化价格小程序开发价格
  • 凡科平台网站怎么建设郴州新网最新招聘信息
  • 网站建设和网袷宣传哈尔滨 做网站公司哪家好
  • 网站流量超新乡搜狗网站推广工具
  • 企业网站建设分工wordpress怎么加地图吗
  • 网站开发项目流程图域名销售网站
  • 网站建设都需要深圳宝安区西乡街道
  • 山东企业建站系统信息网站建站推广是啥意思
  • 自己建设手机网站WordPress有哪些工具
  • 济南网站建设网站电商企业门户网站建设方案
  • 小说类型网站怎么做网站规划流程