Introduced knowledge (wiki) on Ubuntu

Overview

As an information sharing Wiki, I wanted to run Knowledge on a PC with Ubuntu 14.04. In order to test the execution in the local environment, I put Vagrant in Mac Book Pro and built a disguise environment.

The OS installed in the virtual machine this time is Ubuntu 14.04. I will post a memo from zero to moving Knowledge. Click here for the figure after moving. It's a pretty modern UI! スクリーンショット 2020-05-02 1.25.53.png

Install Java

Proceed to access vagrant with ssh. Proceed to java installation.

Check the installable java version

It is different for users (jre) and developers (jdk).

If you want to install jre sudo apt search openjdk-\(\.\)\+-jre$

If you want to install jdk sudo apt search openjdk-\(\.\)\+-jdk$

スクリーンショット 2020-05-02 1.12.53.png

Install by specifying the version

This time, install ** openjdk-8 **. As of 2020/04, it seems better to run knowledge with openjdk-8 because there were times when it could be executed.

If you want to install jre sudo apt install openjdk-8-jre

If you want to install jdk sudo apt install openjdk-8-jdk

Install tomcat

What is Tomcat in the first place?

This explanation is easy to understand. Simply put, it is good to recognize that it is "environment construction software for a program (Java Servlet) written in Java that you want to run on a web server". Since it is an environment construction software for Java programs, software (Apache, etc.) that processes HTTP requests from the browser is also required separately.

However, this Tomcat, 8080 port is free, and it also has a simple web server function to process http requests. This allows you to test the java Servlet with tomcat alone.

Install tomcat

Let's install Tomcat 9 this time. Normally, I prepare a user to run tomcat, but since it is vagrant, it is a little troublesome. I think the nice thing about virtual machines is that build & scrap is easy, so let's proceed as a vagrant user. Select the version from the tomcat download page. Alternatively, you can find the file by going to this path.

cd /opt curl -O https://downloads.apache.org/tomcat/tomcat-9/v9.0.34/bin/apache-tomcat-9.0.34.tar.gz tar -xzvf ./apache-tomcat-9.0.34.tar.gz sudo chown -R vagrant:vagrant /opt/apache-tomcat-9.0.34

Register with Ubuntu systemctl

You need to make ubuntu's systemctl management target recognize the tomcat downloaded this time. sudo vim /etc/systemd/system/tomcat.service Write the following code in.

[Unit]
Description=Apache Tomcat 9
After=network.target

[Service]
User=vagrant
Group=vagrant
Type=oneshot
PIDFile=/opt/apache-tomcat-9.0.34/tomcat.pid
RemainAfterExit=yes

ExecStart=/opt/apache-tomcat-9.0.34/bin/startup.sh
ExecStop=/opt/apache-tomcat-9.0.34/bin/shutdown.sh
ExecReStart=/opt/apache-tomcat-9.0.34/bin/shutdown.sh;/opt/apache-tomcat-9.0.34/bin/startup.sh

[Install]
WantedBy=multi-user.target

Gives read permission. sudo chmod 755 /etc/systemd/system/tomcat.service

Make the service executable. sudo systemctl enable tomcat

After that, you can run / stop / restart with the following code. sudo systemctl start[/stop/restart] tomcat

Try accessing ** http: // [vagrant machine IP]: 8080 ** to open the default Tomcat screen. スクリーンショット 2020-05-02 1.49.04.png

Place Knowledge

Knowledge installation

See Knowledge setup method. In short, you can download the knowledge war file and put it in the tomcat webapps folder.

In this procedure, you will put the war file in * / opt / apache-tomcat-9.0.34 / webapps *. Then restart Tomcat. sudo systemctl restart tomcat

This will unzip the war file. At this time, below the home of the user who runs tomcat The * .knowledge * file should have been created. if

--It doesn't work --I get a 404 error

If that happens, look at * knowledge / logs / app.log * and you will see the details of the error. ** When you access http: // [IP of vagrant machine]: 8080 / knowledge / **, you can open it safely. スクリーンショット 2020-05-02 1.25.53.png

At the end

I think that there are situations where Tomcat is used mainly when operating web UI business software. As mentioned in the explanation of Tomcat, the part that processes http requests is an extra function, so it should be used in combination with apache etc. I would like people who have spare capacity to do it.

Recommended Posts

Introduced knowledge (wiki) on Ubuntu
tmux on Ubuntu
Screen recording on Ubuntu 20.04
Web Bluetooth on Ubuntu20.04
Try DisplayLink on Ubuntu 20.04
Reinstall Kubernetes on Ubuntu 19.10
Use Flutter on Ubuntu
Install Ruby on Ubuntu 20.04
Setting JAVA_HOME on Ubuntu
Install Autoware on Ubuntu 18.04.5
Put JetBrains on Ubuntu
Use mkdir on ubuntu
Apache2 on Ubuntu20.04 LTS
Use cpplapack on ubuntu
ubuntu on wsl part 10
Install Homebrew on Ubuntu 20.04
Run tiscamera on Ubuntu 18.04
Build Zabbix on Ubuntu 20.04
Using Flutter on Ubuntu (Part 2)
Building WebGIS on Ubuntu20.04 LTS
Install OpenJDK7 (JAVA) on ubuntu 14.04
Put Ubuntu 20.04.1 on Raspberry Pi 4
Build VNC Server on Ubuntu 20.04
Install Cybozu Office 10 on Ubuntu 20.4
Extend swap area on Ubuntu 18.04
Install Docker on Ubuntu Server 20.04
Japanese input on Ubuntu20.04 Desktop
Oracle Java 8 on Docker Ubuntu
Install zabbix agent (5.0) on Ubuntu 18.04
Install MAV Proxy on Ubuntu 18.04
Record video on ubuntu18.04 LTS
Installing OpenMX on Ubuntu 18.04.5 LTS
Install Java on WSL Ubuntu 18.04
Ruby installation on WSL2 + Ubuntu 20.04
Install Ubuntu Desktop 20.10 on RaspberryPi4
Run chromium-mir-kiosk on Ubuntu Core
Install Arduino IDE on Ubuntu 20.04
Ubuntu on Windows build speed
Run java applet on ubuntu
Install raspi-config on Ubuntu 20.04 (LTS)
Install WordPress 5.5 on Ubuntu 20.04 LTS
Run Eclipse CDT on Ubuntu
Set up ansible-playbook on Ubuntu 20.04
Install PlantUML on Intellij on Ubuntu
Install Ubuntu Server 20.04 on Btrfs
Note: Install PostgreSQL 9.5 on Ubuntu 18.04
Install AWS IoT Greengrass on Ubuntu
Using Azure IOT Hub on Ubuntu 20.10.
Installing Ruby + Rails on Ubuntu 18.04 (rbenv)
Install JDK and JRE on Ubuntu 16.10
[Ruby on Rails] Introduced paging function
Install ngrok on ubuntu16.04 using Vagrant
Basic knowledge of Ruby on Rails
How to use Bio-Formats on Ubuntu 20.04
Build a XAMPP environment on Ubuntu
Wake on Lan settings on Ubuntu 20.04.1 LTS
How to install WildFly on Ubuntu 18.04
Preparing to use electron-react-boilerplate on Ubuntu 20.4
Install MQTT broker Mosquitto on Ubuntu 18.04
Enable Java 8 and Java 11 SDKs on Ubuntu
Install SonarQube on ECS instance on Ubuntu 16.04