linux上搭建jpress

 

安装maven

如果是centos的话,直接yum install maven -y

如果是其他的话,上传源码编译安装也可以。可能apt install maven -y也是可以的

安装java1.8

yum install java-1.8.0-openjdk

或者看我的文章里面有另一种方法

https://www.cnblogs.com/dragonmax/p/UbuntuHadoop.html

 

编译jpress

进入项目根目录下

mvn clean package

编译报错1:

Failed to execute goal on project codegen: Could not resolve dependencies for project io.jpress:codegen:jar:4.0: Failure to find io.jboot:jboot:jar:3.14.3 in https://maven.aliyun.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

解决办法:

强制更新

mvn clean package -U

 

编译报错2:

[INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-c lean-plugin:pom:2.5 from/to mirrorId (http://repo1.maven.org/maven2/): Failed to transfer file: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

 

解决办法:

将maven配置文件中官方的镜像删除,换成阿里云的

<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>alimaven</id>
<!-- <mirrorOf>central</mirrorOf>-->
<mirrorOf>*,!jeecg,!jeecg-snapshots,!getui-nexus</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>

<!-- 又一个镜像 -->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://central.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>


<!-- junit镜像地址 -->
<mirror>
<id>junit</id>
<name>junit Address/</name>
<url>http://jcenter.bintray.com/</url>
<mirrorOf>central</mirrorOf>
</mirror>

 

错误

image-20220401115252963

刚刚在六分钟前更新这个版本

image-20220401135050055

重新下载编译即可

后台运行

进入starter/target,解压starter.zip

进入解压后的文件

使用nohub将程序挂起到后台并且将输出定位到当前文件下的jpress.log文件

nohup ./jpress.sh start > jpress.log 2>&1 &

image-20220401143106956

posted @ 2022-04-01 14:33  大头卒  阅读(212)  评论(0)    收藏  举报