写在前面
如果是通过docker安装,不能同步到Google Drive,OneDrive等等,我也不知道为什么~~~
- 安装 jdk8
- oracle官网下载最新版jdk8:https://www.oracle.com/java/technologies/downloads/
- 新建目录:
sudo mkdir /usr/local/oracle-java-8
- 解压文件到目标文件夹:
sudo tar -zxvf jdk-8u341-linux-x64.tar.gz -C /usr/local/oracle-java-8
- 配置环境:
vi /etc/profile
export JAVA_HOME=/usr/local/oracle-java-8/jdk1.8.0_341 # 这里要注意目录要换成自己解压的jdk 目录
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
- 配置生效:
source /etc/profile
- 验证安装:
java -version
,输出以下表示成功
Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)
- 安装 ant
- apache官网下载最新版ant
- 新建目录: sudo mkdir /usr/local/ant
- 解压文件到目标文件夹: sudo tar -zxvf apache-ant-1.10.12-bin.tar.gz -C /usr/local/ant
- 配置环境: vi /etc/profile
export ANT_HOME=/usr/local/ant/apache-ant-1.10.12
export PATH=:$ANT_HOME/bin
- 配置生效: source /etc/profile
- 验证安装: ant -version
,龟龟,提示
The command could not be located because'/usr/bin' is not included in the PATH environment variable
- 重复安装也是上述问题,只能: export PATH=/usr/bin:$PATH
接着 source /etc/profile
才能解决当前环境变量失效问题
- 偷懒安装:
apt search ant
- 执行:
apt-get install ant/oldstable
,安装的是1.10.5,最新版是1.10.12 - 验证安装:
ant -version
Apache Ant(TM) version 1.10.5 compiled on August 27 2018
- 安装 Tomcat9
- 执行:
sudo apt install tomcat9 tomcat9-admin
- 验证安装:
systemctl status tomcat9
- 在Tomcat中为web应用程序创建管理员用户:
sudo vim /usr/share/tomcat9/etc/tomcat-users.xml
sudo vim /etc/tomcat9/tomcat-users.xml
- 添加配置
<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
<user username="name1" password="123" roles="admin-gui,manager-gui"/>
- 注释掉Value语句:
sudo vim /usr/share/tomcat9-admin/host-manager/META-INF/context.xml
sudo vim /usr/share/tomcat9-admin/manager/META-INF/context.xml
- 重启服务:systemctl restart tomcat9
- 验证安装:浏览器访问:
http://ip:8080
- 安装 drawio
- 下载:
git clone https://github.com/jgraph/drawio.git
- 执行:
cd drawio/etc/build
- 打包应用:
ant war
,会在/root/drawio/build/
下生成draw.war
- 移动到tomcat的
webapps
文件夹:mv /root/drawio/build/draw.war /var/lib/tomcat9/webapps
- 验证安装:浏览器访问:
http://ip/8080/draw
- Nginx Proxy Manager 反代实现ssl访问
- 修改tomcat端口:tomact占用了8080,8443端口,tomcat有两个重要目录,主目录
/usr/share/tomcat9-admin
,基目录/var/lib/tomcat9
,修改端口的配置文件在:/var/lib/tomcat9/conf/server.xml
- 安装Nginx Proxy Manager:叫啥名好的博客-Nginx Proxy Manager(docker代理神器)