Tomcat安装JPress
上线代码有两种方式,第一种方式是直接将程序目录放在webapps目录下面,这种方式大家已经明白了,就不多说了。第二种方式是使用开发工具将程序打包成war包,然后上传到webapps目录下面。下面让我们见识一下这种方式。
系统环境
[root@tomcat ~]# getenforce
Disabled
[root@tomcat ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead) Jul 19 08:39:10 centos7 systemd[1]: Starting firewalld - dynamic firewall daemon...
Jul 19 08:39:11 centos7 systemd[1]: Started firewalld - dynamic firewall daemon.
Jul 19 11:20:50 git systemd[1]: Stopping firewalld - dynamic firewall daemon...
Jul 19 11:20:51 git systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@tomcat ~]# ip a|grep eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
inet 172.16.1.70/24 brd 172.16.1.255 scope global eth1
[root@tomcat ~]#
什么是JPress?
JPress是一款和WordPress类似的程序,WordPress支持PHP语言,JPress则支持Java语言,更多关于JPress的介绍可以去JPress的官方网站查看:http://jpress.io/。JPress的安装包也可以在GitHub中下载:https://github.com/JpressProjects/jpress。也可以使用我提供的安装包:https://pan.baidu.com/s/1o8wSOQI 密码:8co8。
安装JPress
[root@tomcat webapps]# cd /application/tools/
[root@tomcat tools]# ll
total 194204
-rw-r--r-- 1 root root 8491533 Jul 20 2017 apache-maven-3.3.9-bin.tar.gz
-rw-r--r-- 1 root root 9128610 Jul 20 2017 apache-tomcat-8.0.27.tar.gz
-rw-r--r-- 1 root root 181238643 Jul 20 2017 jdk-8u60-linux-x64.tar.gz
[root@tomcat tools]# tar xf apache-maven-3.3.9-bin.tar.gz -C /application/
[root@tomcat tools]# ln -s /application/apache-maven-3.3.9 /application/maven
[root@tomcat tools]# sed -i.ori2 '$a export MAVEN_HOME=/application/maven\nexport PATH="$MAVEN_HOME/bin:$PATH"' /etc/profile
[root@tomcat tools]# source /etc/profile
检查是否安装成功:
[root@tomcat tools]# mvn -vsrsion
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /application/maven
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: /application/jdk1.8.0_60/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-327.el7.x86_64", arch: "amd64", family: "unix"
[root@tomcat tools]#
上传JPress的war包:(在我提供的百度云盘链接中有),可以通过ftp或者rz等各种方式上传。
安装JPress:
[root@tomcat tools]# cd /application/tomcat/webapps/ROOT/
[root@tomcat ROOT]# mv index.jsp /tmp/
[root@tomcat ROOT]# jar xf /application/tools/jpress-web-newest.war
[root@tomcat ROOT]# ls
asf-logo.png bg-middle.png bg-upper.png meminfo.jsp robots.txt tomcat.css tomcat-power.gif
asf-logo-wide.gif bg-nav-item.png build.xml META-INF static tomcat.gif tomcat.svg
bg-button.png bg-nav.png favicon.ico RELEASE-NOTES.txt templates tomcat.png WEB-INF
[root@tomcat ROOT]#
开启一台mysql服务器,并创建对应的数据库和用户:
这里我开启一台ip为172.16.1.51的MySQL服务器作为JPress的数据库支持,也可以在当前服务器自行安装MySQL。
[root@mysql-db01 ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 112
Server version: 5.6.34-log Source distribution Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database jpress;
Query OK, 1 row affected (0.00 sec) mysql> show create database jpress;
+----------+-----------------------------------------------------------------+
| Database | Create Database |
+----------+-----------------------------------------------------------------+
| jpress | CREATE DATABASE `jpress` /*!40100 DEFAULT CHARACTER SET utf8 */ |
+----------+-----------------------------------------------------------------+
1 row in set (0.00 sec) mysql>
mysql> grant all on jpress.* to jpress@"172.16.1.%" identified by '';
Query OK, 0 rows affected (0.00 sec) mysql>
数据库和授权用户创建完毕。(这里我创建的数据库为jpress,用户名为jpress,密码为123456)。
网页上初始化JPress
浏览器打开地址http://10.0.0.70:8080

点击下一步:

填写完相关信息,点击下一步:

设置网站名称、管理员账号密码之后点击完成即可。如果等待一会儿,网页没有自动刷新,可以手动重启一次Tomcat即可。

JPress后台登陆地址:http://10.0.0.70:8080/admin

输入管理员账号密码即可跳转到后台管理界面:

其实JPress跟WordPress的界面和操作非常相似,而且JPress比WordPress更加简洁,没有广告。
Tomcat安装JPress的更多相关文章
- jpress-配合nginx与tomcat安装
目录 1. 前言 2. yum安装tomcat 2. yum安装MySQL 3. 下载JPress并安装 4. 配置tomcat使其可以部署多个网站 5. 安装nginx并配置 6. 将已经安装好的j ...
- Windows操作系统下tomcat安装版图文教程
下载tomcat安装文件,官方下载地址是:http://tomcat.apache.org/,本文以tomcat-7.0.26版本为例进行安装过程的说明: 1.双击apache-tomcat-7.0. ...
- JavaWeb——tomcat安装及目录介绍
一.web web可以说,就是一套 请求->处理->响应 的流程.客户端使用浏览器(IE.FireFox等),通过网络(Network)连接到服务器上,使用HTTP协议发起请求(Reque ...
- tomcat安装后,本地可以访问,远程不能访问
问题描述:tomcat安装后,在本地可以使用本地IP地址.localhost可以访问,但是在远程却不能访问. 使用工具:无. 解决方法:关闭服务器端的"公用网络防火墙"即可.
- Windows下Java环境配置,tomcat安装
问题描述:在Windows下面做Java web相关的项目的时候,Java和tomcat是基础,这里记载一下Java环境的配置以及tomcat的安装和配置. 使用工具:Windows.jdk安装包.t ...
- Linux搭建JDK、Tomcat安装及配置
一.JDK安装及配置 1.JKD下载地址:http://pan.baidu.com/s/1i5NpImx 2.查看安装: rpm -qa | grep jdk 3.卸载:rpm -e --nodeps ...
- Win2008R2+java+tomcat安装
Win2008R2+java+tomcat安装 准备软件: jdk-7u25-windows-x64.exe apache-tomcat-7.0.42-windows-x64.zip 一.安装java ...
- Tomcat安装配置
Tomcat安装配置 很久没有通过博客对学习所得进行记录了. 现在将使用Tomcat的一些经验和心得写到这里,作为记录和备忘.如果有朋友看到,也请不吝赐教. 1.首先是Tomcat的获取和安装. 获取 ...
- CentOS7 Tomcat安装
CentOS7 Tomcat安装 CentOS7 Tomcat安装 Download 从Tomcat下载apache-tomcat-8.0.18.tar.gz Install 安装 上传RPM文件到/ ...
随机推荐
- thymeleaf layout
摘自:https://tomoya92.github.io/2017/03/09/thymeleaf-layout/ thymeleaf的layout常用的有两种方式用法 第一种将页面里的每个 ...
- 使用Spring MVC创建 REST API
1.REST的基础知识 当谈论REST时,有一种常见的错误就是将其视为“基于URL的Web服务”——将REST作为另一种类型的远程过程调用(remote procedurecall,RPC)机制,就像 ...
- krpano资源下载及还原全景图
krpano资源下载及还原全景图 现在全景云平台有大量的全景图资源,就存在了如何下载的需求. 原理:1.云平台多数使用krpano内核,首先需要将全景云平台中被krpano切成的全景图碎片下载下来,并 ...
- TreeGrid
TreeGrid是树形表格,为了展示成树形,比数据表格主要增加了以下两点: 1.表格属性中设置 idField.treeField 两个属性:idField 表示用于区分上下级的主键,treeFiel ...
- Shiro异常处理总结
出自:https://blog.csdn.net/goodyuedandan/article/details/62420120 一.Spring MVC处理异常有3种方式: (1)使用Spring-M ...
- SqlServer数据压缩测试
SqlServer数据压缩测试 环境说明 操作系统:WIN SERVER 2012 R2 Standard 数据库系统: SQLSERVER 2016 SP1 Enterprise Evaluatio ...
- UNIX网络编程——客户/服务器心搏函数 (转)
下面是关于回送客户和服务器程序开发一些简单的心搏函数.这些函数可以发现对端主机或到对端的通信路径的过早失效. 在给出这些函数之前我们必须提出一些警告.首先,有人会想到使用TCP的保持存 ...
- 整理SSH框架的优缺点
Hibernate优点(1) 对象/关系数据库映射(ORM)它使用时只需要操纵对象,使开发更对象化,抛弃了数据库中心的思想,完全的面向对象思想(2) 透明持久化(persistent)带有持久化状态的 ...
- 深入理解Java线程池
我们使用线程的时候就去创建一个线程,这样实现起来非常简便,但是就会有一个问题: 如果并发的线程数量很多,并且每个线程都是执行一个时间很短的任务就结束了,这样频繁创建线程就会大大降低系统的效率,因为频繁 ...
- nexus3 搭建maven远程仓库
右上角 下载maven http://maven.apache.org/download.cgi 下载nexus https://www.sonatype.com/download-oss-sonat ...