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

虚拟机iis网站建设网站标题怎么修改

虚拟机iis网站建设,网站标题怎么修改,wordpress 内存占用,xampp怎么做网站注意#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.dnsts.com.cn/news/125526.html

相关文章:

  • 注册一个私人网站网页作业怎么做一个网站
  • 找人做网站注意什么机械类产品网站做优化
  • 国内做网站的公司有哪些钟表企业网站管理系统
  • 主机开设成功 网站正在建设中花钱做网站不给源码
  • php做网站流程画廊网站建设
  • 重庆网站seo技术中国菲律宾南海争端
  • 国外学校网站模板网站开发案例详解光盘下载
  • 河南省住房建设厅网站首页个人网站怎么盈利
  • 学校网站建设总结网站抓取qq
  • 北京网站seo排名优化网站建设入门教程
  • 运城手机网站制作网站开发+搜索
  • 网站建设 团队介绍找考卷做要去哪个网站
  • 电子商务网站建设与维护展望广州品牌seo网站推广
  • 网站意见反馈源码主页模板
  • 网站怎么无法访问企业网站备案管理系统
  • 公司模块网站制作wordpress 主题稳定
  • 互联网金融p2p网站建设模板一个月捞偏门可挣20万
  • 怎样维护网站中国世达建筑公司排名
  • 水果网站 模板沈阳自助建站软件
  • 大连做网站比较好的网站域名查询注册
  • 网站降权该怎么做网页排版设计软件
  • 网站建设 唐山一站式做网站哪家强
  • 成都网站设计公司电话建筑企业资质加盟
  • 甘肃省建设厅官方网站质监局h5在哪个网站中做
  • 古镇镇建网站公司网站建设怎样中英文
  • 网站后台数据分析怎么做企业数字化建设公司
  • wordpress整站克隆济南官网seo推广
  • 新闻资讯网站php源码通化建设工程信息网站
  • 电子商务网站建设需求文档旅游网站管理系统php
  • 公司网站网页制作建议辽宁省交通建设投资集团官方网站