Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is based entirely off of @BhargavRao's [answer](https://stackoverflow.com/c/sobotics/a/152/23), but meant to be a complete walk-through to those who want to set it up but are not techies.
- This is going to explain how to run a Natty instance, starting completely from scratch on a Ubuntu live boot. It should work for an installed version as well.
- You can **follow the instructions to [run a live boot](https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-windows#0)** from a USB stick/CD/what have you. This will take several hours to set up the live boot completely if you're a non-techie like me, in all likelihood, so make sure you have free time.
- After you've got the live boot up and running (which is no small task. At all), and made sure to connect it to the Internet, press the <kbd>super</kbd> key (AKA the Windows key if you're on a Windows computer), and type `terminal`. Then press <kbd>enter</kbd> to open it.
- You should see something like this:
- ubuntu@ubuntu:~$
- Congrats! You've gotten past the first stage, and you can now start to set things up.
- Since a live boot (running from the USB) has nothing on it yet, we're going to need to install pretty much everything.
- **Installing Java**
- For non-live-boot-running people, you can check if Java is installed by running this command:
- java -version
- That should look like this when you run it:
- ubuntu@ubuntu:~$ java -version
- The first "ubuntu" is the name of your user account, and the second is the name of the computer. So that could also be `mithrandir@barad-dur:~$ java -version`. The `ubuntu@ubuntu:~$` is what shows on a live boot.
- If it's installed, you'll should get something like this:
- openjdk version "1.8.0_151"
- OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
- OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
- The specifics will change depending on what version of Ubuntu it has, and whether it's 32-bit or 64-bit. My non-live-boot is running 64-bit Ubuntu 16.04, as you can see above.
- If it's not installed, you'll get something like this:
- The program 'java' can be found in the following packages:
- * default-jre
- * openjdk-8-jre-headless
- * gcj-4.8-jre-headless (You will have to enable component called 'universe')
- * gcj-4.9-jre-headless (You will have to enable component called 'universe')
- * gcj-5-jre-headless (You will have to enable component called 'universe')
- * gcj-6-jre-headless (You will have to enable component called 'universe')
- * openjdk-9-jre-headless (You will have to enable component called 'universe')
- Try: sudo apt install <selected package>
- We'll want to install either `openjdk-9-jre-headless` or `openjdk-8-jre-headless`. I've installed 8 in the following instructions.
- The terminal has just told us what to do to install it, so let's follow those instructions:
- sudo apt-install openjdk-8-jre-headless
- If you're running on a non-live-boot, you'll be prompted to put in the password, like this:
- [sudo] password for mithrandir:
- You type in your password and hit <kbd>enter</kbd>.
- If you're running it on the live boot, it should tell you packages will be installed. It will then ask you if you want to continue, with a message like this:
- After this operation, 99.9 MB of additional disk space will be used.
- Do you want to continue? [Y/n]
- Since we do want to continue, we'll type `y` and hit <kbd>enter</kbd>. That line should look like `Do you want to continue? [Y/n] y` after this.
- If all goes well, your screen will fill with gibberish and scroll down a lot. (A lot of `adding debian` lines should show up.)
- If you get an error "could not resolve 'archive.ubuntu.com'", then make sure you have an Internet connection. Make sure you're connected to WiFi (or Ethernet). Once your Internet is set up, run `sudo apt-install openjdk-8-jre-headless` again. If that still doesn't work, then check [this Ask Ubuntu post](https://askubuntu.com/q/29071/511730).
- When the gibberish is done scrolling past, your terminal should show
- done.
- done.
- at the end, and have `ubuntu@ubuntu:~$` waiting for a new command.
- To make sure it's installed, run
- java -version
- and it should show
- openjdk version "1.8.0_151"
- and a couple other lines.
- Good job, Java is installed!
- **Installing Maven**
- If you're not running on a live boot, you can check if maven is installed by running this command:
- mvn -v
- If it's installed, it'll show something like this:
- Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T18:41:47+02:00)
- Maven home: /opt/maven
- Java version: 1.8.0_151, vendor: Oracle Corporation
- Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
- Default locale: en_US, platform encoding: UTF-8
- OS name: "linux", version: "4.4.0-109-generic", arch: "amd64", family: "unix"
- If it's not installed, such on the live boot, you'll see something like this:
- The program 'mvn' is currently not installed. You can install it by typing:
- sudo apt install maven
- You will have to enable the component called 'universe'
- So, let's install it.
- To prevent errors, let's install those things that are needed so that we can install maven. Hat-tip to [this Ask Ubuntu answer](https://askubuntu.com/a/722994/511730).
- All of these commands will make text appear after you press enter. Unless there are errors, you shouldn't be worried.
- First, we run this command:
- sudo apt-get install software-properties-common
- (for more info on that, see [What is software-properties-common](https://askubuntu.com/q/1000118/511730) on Ask Ubuntu)
- Then we can install the universe:
- sudo add-apt-repository universe
- Then update:
- sudo apt-get update
- And then finally we can install maven:
- sudo apt-get install maven
- To check if it installed properly, you can run `mvn --version`. That should show this:
- Apache Maven 3.5.0
- Maven home: /usr/share/maven
- Java version: 1.8.0_151, vendor: Oracle Corporation
- Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
- Default locale: en_US, platform encoding: UTF-8
- OS name: "linux", version: "4.13.0-16-generic", arch: "amd64", family: "unix"
- Good! Maven is installed.
- **Installing Tomcat**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement