8000 [Release Candidate] v0.37 by nmelehan · Pull Request #3288 · linode/docs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Release Candidate] v0.37 #3288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 9E7A +18,6 @@ external_resources:
- '[SaltStack Git Fileserver Documentation](https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html#tutorial-gitfs)'
- '[SaltStack Salt Formulas Documentation](https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html)'
- '[GitHub Developer - Webhooks](https://developer.github.com/webhooks/)'
promo_code_amount: '20'
promo_code: 'Salt20'
---

This guide will walk through the deployment of a static site using [SaltStack](https://github.com/saltstack/salt), which is a flexible configuration management system. The configuration files created for Salt will be version controlled using Git. Updates to your static site's code will be automatically communicated to the production system using webhooks, an event notification system for the web.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ published: 2018-10-16
title: A Beginner's Guide to Salt
external_resources:
- '[SaltStack Documentation](https://docs.saltstack.com/)'
promo_code_amount: '20'
promo_code: 'Salt20'
---

[Salt](https://www.saltstack.com) (also referred to as *SaltStack*) is a Python-based configuration management and orchestration system. Salt uses a master/client model in which a dedicated Salt *master* server manages one or more Salt *minion* servers. Two of Salt's primary jobs are:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ modified_by:
title: 'Configure and Use Salt Cloud and Cloud Maps to Provision Systems'
contributor:
name: Sergey Bulavintsev
promo_code_amount: '20'
promo_code: 'Salt20'
---

![Salt Cloud](SaltCloud.jpg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ modified_by:
title: 'Configure and Use Salt SSH to Manage Your Linodes'
contributor:
name: Sergey Bulavintsev
promo_code_amount: '20'
promo_code: 'Salt20'
---

## Introduction to Salt SSH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ external_resources:
- '[Salt Apache_Conf State Module](https://docs.saltstack.com/en/latest/ref/states/all/salt.states.apache_conf.html)'
- '[Salt Apache_Site State Module](https://docs.saltstack.com/en/latest/ref/states/all/salt.states.apache_site.html)'
- '[Using Grains in SLS Modules](https://docs.saltstack.com/en/latest/topics/tutorials/states_pt3.html#using-grains-in-sls-modules)'
promo_code_amount: '20'
promo_code: 'Salt20'
---

Salt is a powerful configuration management tool. In this guide you will create Salt state files that are capable of installing and configuring Apache on Ubuntu 18.04, Debian 9, or CentOS 7.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ title: "Create a Salt Execution Module"
external_resources:
- '[Writing Execution Modules](https://docs.saltstack.com/en/latest/ref/modules/)'
- '[Execution of Salt Modules From Within States](https://docs.saltstack.com/en/latest/ref/states/all/salt.states.module.html#execution-of-salt-modules-from-within-states)'
promo_code_amount: '20'
promo_code: 'Salt20'
---

A Salt *execution module* is a Python module that runs on a Salt minion. It perform tasks and returns data to the Salt master. In this tutorial you will create and install an execution module that will call the [US National Weather Service API](https://forecast-v3.weather.gov/documentation) and return the current temperature at a specified weather station. This example could easily be adapted to access any API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ modified_by:
name: Linode
published: 2015-09-22
title: Getting Started with Salt - Basic Installation and Setup
promo_code_amount: '20'
promo_code: 'Salt20'
---

[Salt](https://saltstack.com/) is a Python-based configuration management platform designed to control a number of slave servers (called Minions in Salt terminology) from a single master server. This guide walks you through configuring a Salt Master and Minion, and is relevant to any supported Linux distribution.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ external_resources:
- '[Salt Best Practices](https://docs.saltstack.com/en/latest/topics/best_practices.html#modularity-within-states)'
- '[Salt States Tutorial](https://docs.saltstack.com/en/latest/topics/tutorials/states_pt1.html)'
- '[Jinja Template Designer Documentation](http://jinja.pocoo.org/docs/2.10/templates/#import)'
promo_code_amount: '20'
promo_code: 'Salt20'
---
## Introduction to Templating Languages

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ external_resources:
- '[Salt Beacons Documentation](https://docs.saltstack.com/en/latest/topics/beacons/)'
- '[Salt Beacon Modules](https://docs.saltstack.com/en/latest/ref/beacons/all/index.html)'
- '[Salt Reactors Documentation](https://docs.saltstack.com/en/latest/topics/reactor/)'
promo_code_amount: '20'
promo_code: 'Salt20'
---

Every action performed by Salt, such as applying a highstate or restarting a minion, generates an event. *Beacons* emit events for non-salt processes, such as system state changes or file changes. This guide will use Salt beacons to notify the Salt master of changes to minions, and Salt *reactors* to react to those changes.
Expand Down
10000
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ contributor:
external_resources:
- '[SaltStack Command Line Documentation](https://docs.saltstack.com/en/latest/ref/cli/index.html)'
- '[Linode Cloud Module](https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.linode.html)'
promo_code_amount: '20'
promo_code: 'Salt20'
---

[SaltStack](https://github.com/saltstack/salt) is a powerful configuration management tool. The following is a quick-reference guide for Salt's command line interface (CLI).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ external_resources:
- '[Salt GPG Renderer](https://docs.saltstack.com/en/latest/ref/renderers/all/salt.renderers.gpg.html)'
- '[Salt SDB Documentation](https://docs.saltstack.com/en/latest/topics/sdb/)'
- '[Salt SDB Modules](https://docs.saltstack.com/en/latest/ref/sdb/all/index.html)'
promo_code_amount: '20'
promo_code: 'Salt20'
---

Salt is a powerful configuration management tool which helps you manage your server deployments with configuration *state* files. These files are easily shared with others on your team and can be checked in to version control systems like Git.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ external_resources:
- '[Salt Formulas](https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html)'
- '[Writing a Test](https://kitchen.ci/docs/getting-started/writing-test/)'
- '[Sample Pytest tests](https://github.com/gtmanfred/wordpress-formula/tree/master/tests/integration)'
promo_code_amount: '20'
promo_code: 'Salt20'
---

KitchenSalt allows you to use Test Kitchen to test your Salt configurations locally without a Salt master or minions. In this guide you will install KitchenSalt and use Docker to test a Salt state. This guide was created using a system running Ubuntu 18.04.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ contributor:
external_resources:
- '[Salt Formulas](https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html)'
- '[Git Fileserver Backend Walkthrough](https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html)'
promo_code_amount: '20'
promo_code: 'Salt20'
---

## Salt State Files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ modified_by:
name: Linode
published: 2015-07-02
title: Use Salt States to Configure a LAMP Stack on a Minion
promo_code_amount: '20'
promo_code: 'Salt20'
---

This tutorial will configure a Minion's LAMP stack with further use of Salt States. This tutorial is written for Debian 8 but can easily be adjusted for other Linux Distributions. You will need a working Salt master and minion configuration before starting this guide. If you need to set up that prerequisite, see our [Salt installation guide](/docs/applications/configuration-management/getting-started-with-salt-basic-installation-and-setup/) to get started.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ modified_by:
name: Linode
published: 2015-07-02
title: Use Salt States to Create LAMP Stack and Fail2ban Across Salt minions
promo_code_amount: '20'
promo_code: 'Salt20'
---

Salt States can install and define a server setup on other servers. This tutorial demonstrates the use of Salt States to create a LAMP stack across all Salt Minions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ external_resources:
- '[Salt Masterless Walkthough](https://docs.saltstack.com/en/latest/topics/tutorials/quickstart.html)'
- '[Salt Fileserver Backend Walthrough](https://docs.saltstack.com/en/latest/topics/tutorials/gitfs.html)'
- '[Plex Media Server Quick State](https://support.plex.tv/articles/200264746-quick-start-step-by-step-guides/)'
promo_code_amount: '20'
promo_code: 'Salt20'
dedicated_cpu_link: true
---

Expand Down
12 changes: 12 additions & 0 deletions docs/development/frameworks/apache-tomcat/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
author:
name: Linode
email: docs@linode.com
description: 'Apache Tomcat is an open-source software implementation of the Java Servlet and Java Server Pages technologies. With these guides, you will run applications within Tomcat using the OpenJDK implementation of the Java development environment.'
keywords: ["web applications", "web frameworks", "Linode applications", "tomcat"]
license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)'
aliases: ['tomcat/']
published: 2020-04-15
title: Apache Tomcat
show_in_lists: true
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
author:
name: Rajakavitha Kodhandapani
email: docs@linode.com
description: 'Install the Apache Tomcat Java servlet engine on CentOS 8 by following this guide.'
og_description: 'Install the Apache Tomcat Java servlet engine on CentOS 8 by following this guide.'
keywords: ["apache tomcat centos 8", "tomcat java", "java centos 8", "tomcat ubuntu"]
license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)'
aliases: ['websites/frameworks/apache-tomcat-on-centos-8/','development/frameworks/apache-tomcat-on-centos-8/']
modified: 2020-03-25
modified_by:
name: Linode
published: 2020-03-25
title: 'How to Install Apache Tomcat on CentOS 8'
h1_title: 'Installing Apache Tomcat on CentOS 8'
external_resources:
- '[Tomcat Home Page](http://tomcat.apache.org/)'
- '[Tomcat FAQ](http://wiki.apache.org/tomcat/FAQ)'
audiences: ["beginner"]
concentrations: ["Web Applications"]
languages: ["java"]
---

Apache Tomcat is an open-source software implementation of the Java Servlet and Java Server Pages technologies. With this guide, you'll run applications within Tomcat using the OpenJDK implementation of the Java development environment.

## Before You Begin

1. Familiarize yourself with our [Getting Started](/docs/getting-started) guide and complete the steps for [setting your Linode's hostname](/docs/getting-started/#set-the-hostname) and [timezone](/docs/getting-started/#set-the-timezone).

1. Follow our [Securing Your Server](/docs/security/securing-your-server) guide to [create a standard user account](/docs/security/securing-your-server/#add-a-limited-user-account), [harden SSH access](/docs/security/securing-your-server/#harden-ssh-access), [remove unnecessary network services](/docs/security/securing-your-server/#remove-unused-network-facing-services) and [create firewall rules](/docs/security/securing-your-server/#configure-a-firewall) for your web server; you may need to make additional firewall exceptions for your specific application.

{{< content "limited-user-note-shortguide" >}}

1. Install the Java Development Kit.

sudo yum install java-1.8.0-openjdk-headless

1. Run the following commands to check the version of java that is installed.

java -version
javac -version

1. Install the `wget` and `tar` utilities. You will need these in a later section to install the Apache Tomcat 9.

sudo yum install wget -y && sudo yum install tar

## Download and Install Apache Tomcat

1. Create a directory to download Apache Tomcat 9:

sudo mkdir /usr/local/tomcat

1. Change to `/usr/local/tomcat` and download Apache Tomcat 9. As of writing this guide, Tomcat 9.0.33 is the latest version. See [Apache Tomcat's download page](https://tomcat.apache.org/download-90.cgi) for their latest core tarball:

sudo wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.33/bin/apache-tomcat-9.0.33.tar.gz

{{< caution >}}
Ensure that the version number matches the Tomcat 9 version you wish to download.
{{< /caution >}}

1. Extract the downloaded tarball's contents into `/usr/local/tomcat` directory:

sudo tar xvf apache-tomcat-9.0.33.tar.gz --strip-components=1 -C /usr/local/tomcat

1. Create a symbolic link to the latest version of Tomcat, that points to the Tomcat installation directory:

sudo ln -s /usr/local/tomcat/apache-tomcat-9.0.33 /usr/local/tomcat/tomcat

1. Create a `tomcat` user and change the directory ownership to `tomcat`:

sudo useradd -r tomcat
sudo chown -R tomcat:tomcat /usr/local/tomcat

1. Create a new `systemd` service file, `/etc/systemd/system/tomcat.service`, in the text editor of your choice with the following details:

{{< file "/etc/systemd/system/tomcat.service" service >}}
[Unit]
Description=Tomcat Server
After=syslog.target network.target

[Service]
Type=forking
User=tomcat
Group=tomcat

Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment='JAVA_OPTS=-Djava.awt.headless=true'
Environment=CATALINA_HOME=/usr/local/tomcat
Environment=CATALINA_BASE=/usr/local/tomcat
Environment=CATALINA_PID=/usr/local/tomcat/temp/tomcat.pid
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M'
ExecStart=/usr/local/tomcat/bin/catalina.sh start
ExecStop=/usr/local/tomcat/bin/catalina.sh stop

[Install]
WantedBy=multi-user.target
{{< /file >}}

1. Reload the `systemd` daemon to let it know about the `tomcat.service` that you created:

sudo systemctl daemon-reload

1. Start and enable the Tomcat server:

sudo systemctl enable tomcat
sudo systemctl start tomcat

1. Configure your firewall to access the Tomcat server on port 8080:

sudo firewall-cmd --permanent --zone=public --add-port=8080/tcp
sudo firewall-cmd --reload

## Test and Use Tomcat

You can test your Tomcat installation by pointing your browser at your domain name specifying port `8080`. For example, you might use `http://example.com:8080/`, replacing `example.com` with your domain name. Note that Tomcat listens on network port 8080 and does not accept forced HTTPS connections by default. By default, Tomcat configuration files are located in the `/usr/local/tomcat/conf` directory.

### Configure tomcat9-admin (optional)

1. To use the `tomcat9-admin` web application, add the following lines to the end of your `/usr/local/tomcat/conf/tomcat-users.xml` file before the `</tomcat-users>` line, substituting your own username and secure password. If using Tomcat Admin, include both the "manager-gui" role for the manager and the "admin-gui" role for the host-manager application.

{{< file "/usr/local/tomcat/conf/tomcat-users.xml" xml >}}
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="username" password="password" roles="manager-gui,admin-gui"/>

{{< /file >}}

{{< note >}}
If you are not using the web application and plan to manage your application(s) from the command line only, you should not enter these lines, because doing so may expose your server to unauthorized login attempts.
{{</ note >}}

1. For Tomcat versions 8+ the managers have been pre-configured to only allow access from the same IP of the server where it's installed. If you're trying to access it from a browser remotely, you'll need to comment out this configuration in the file `/usr/local/tomcat/webapps/manager/META-INF/context.xml`.

{{< file "/usr/local/tomcat/webapps/manager/META-INF/context.xml" xml >}}
...
<!--
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
-->
...
{{</ file >}}

1. Restart the Tomcat server, which will allow these changes to take effect:

sudo systemctl restart tomcat
Loading
0