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文件到/ ...
随机推荐
- 前端基础——jQuery
一 jQuery 1 简介 jQuery是一个“写得更少,但做得更多”的轻量级JavaScript库.jQuery极大地简化了JavaScript编程. 它是轻量级的js库(压缩后只有21k) ,这是 ...
- 六、配置github的pull request触发jenkins自动构建
之前的配置,都是向master分支push操作触发jenkins进行构建,但是在一般的正常工作中,不会允许程序员直接向主分支推送代码:正常都是fork一个本地的分支,在本地分支调试完后,向主干分支提交 ...
- redmineBUG系统
bitnami-redmine-2.6.3-0-linux-x64-installer.run 我的是linux 64位 官网下载bitnami-redmine http://bitnami.com/ ...
- Foglight 5.6.7 控制台jboss报404
Foglight 5.6.7 控制台jboss报404 [终极问题原来就一数据库权限问题!下文是由问题源找到的类似的dell support的相关文章,但却是关于sql server error的,感 ...
- Python if判断语句
a=input('输入你的用户名:') if a == "lilei": print('李磊,等你好久了') elif a == "wanghui": prin ...
- Nodejs&Express
http://www.expressjs.comhttp://github.com/lelandtseng/form-datahttp://github.com/lelandtseng/mongo-m ...
- mybatis 用法分享
主题 这篇文章主要是记录这2个月我对mybatis的学习以后的一些感触和一些如果我是架构师会怎么在项目里使用mybatis的一些大胆的想法. 感想 1.首先根据之前的学习我已经知道了mybatis g ...
- php yii 学习笔记
yii 归档安装 1,下载 yii Yii2的高级应用程序模板 2,解压模板到目录,进入控制台进入目录 运行 php init 安装YII 3,进入 http://localhost/phpmyad ...
- Mysql事务及行级锁
事务隔离级别 数据库事务隔离级别,只是针对一个事务能不能读取其它事务的中间结果. Read Uncommitted (读取未提交内容) 在该隔离级别,所有事务都可以看到其他未提交事务的执行结果.本隔离 ...
- MD5类库(hex_md5)
/* * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message * Digest Algorithm, as ...