mirror of
https://github.com/clearlinux/clear-linux-documentation.git
synced 2026-08-26 18:36:02 +00:00
- Revise tutorials landing page text per discussion with @mvincerx
- Hide tutorials landing page toctree - Revise titles and intro for tutorial pages per discussion with @mvincerx - web-server-install: Update to use contents:: local with some minor supporting reorg of content; add link to stateless feature in text - wp-install: Removed note re update with swupd as not relevant to the content of the tutorial Signed-off-by: Kristal Dale <kristal.dale@intel.com>
This commit is contained in:
@@ -3,17 +3,17 @@
|
||||
Tutorials
|
||||
#########
|
||||
|
||||
Our Tutorials:
|
||||
This section offers a range of tutorials that demonstrate:
|
||||
|
||||
* demonstrate how to use |CL-ATTR| features for cloud, client, distributed
|
||||
processing, and virtual environments.
|
||||
* involve specific application of |CL| that often use third-party tools.
|
||||
* extend the development possibilities of |CL| with specific use cases.
|
||||
* |CL-ATTR| features for cloud, client, distributed processing, and virtual environments
|
||||
* Use of |CL| with third-party tools
|
||||
* Development possibilities of |CL| with specific use cases
|
||||
|
||||
Explore our tutorials to discover what you can do with |CL|!
|
||||
|
||||
This section provides detailed instructions to guide you through completing
|
||||
specific |CL| use cases.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
:maxdepth: 2
|
||||
|
||||
wordpress/wordpress
|
||||
|
||||
@@ -1,35 +1,21 @@
|
||||
.. _web-server-install:
|
||||
|
||||
Create a |CL-ATTR| based web server
|
||||
###################################
|
||||
Set up a LAMP web server on |CL-ATTR|
|
||||
#####################################
|
||||
|
||||
This tutorial shows you how to create a :abbr:`LAMP (Linux, Apache, MySQL, PHP)` server
|
||||
using |CL-ATTR| and how to use phpMyAdmin\* to manage an associated database.
|
||||
This tutorial provides instructions on how to set up a
|
||||
:abbr:`LAMP (Linux, Apache, MySQL, PHP)` web server on |CL-ATTR| and how
|
||||
to use phpMyAdmin\* to manage an associated database. Note that this
|
||||
tutorial installs MariaDB\*, which is a drop-in replacement for MySQL\*.
|
||||
|
||||
In order to create a web server using |CL| as the host OS, your host system
|
||||
must be running |CL|. This tutorial assumes you have successfully installed
|
||||
:ref:`Clear Linux on bare metal<bare-metal-install>`.
|
||||
|
||||
Before you install new packages, update the |CL| with the following console command:
|
||||
This tutorial covers:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo swupd update
|
||||
|
||||
Create a LAMP Server
|
||||
********************
|
||||
|
||||
A LAMP server uses Linux\*, Apache\*, MySQL\*, and PHP\* to set up a fully functional web
|
||||
server and host a website. Note that this tutorial installs MariaDB\*, which is a drop-in
|
||||
replacement for MySQL.
|
||||
|
||||
This tutorial follows these steps:
|
||||
|
||||
* Install Apache.
|
||||
* Change the default configuration and data directory.
|
||||
* Install PHP.
|
||||
* Install MariaDB.
|
||||
* Install phpMyAdmin and create a database.
|
||||
.. contents:: :local:
|
||||
:depth: 1
|
||||
|
||||
Install Apache
|
||||
**************
|
||||
@@ -41,9 +27,18 @@ for more information.
|
||||
Install the web-server-basic bundle
|
||||
===================================
|
||||
|
||||
The web-server-basic bundle contains the packages needed to install the
|
||||
The **web-server-basic** bundle contains the packages needed to install the
|
||||
Apache software bundle on |CL|.
|
||||
|
||||
.. note::
|
||||
|
||||
Before you install new packages, update the |CL| with the following
|
||||
console command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo swupd update
|
||||
|
||||
#. To install the bundle, enter the following command:
|
||||
|
||||
.. code-block:: bash
|
||||
@@ -58,7 +53,6 @@ Apache software bundle on |CL|.
|
||||
sudo systemctl enable httpd.service
|
||||
sudo systemctl start httpd.service
|
||||
|
||||
|
||||
#. To verify that the Apache server application is running, open a web
|
||||
browser and navigate to: http://localhost.
|
||||
|
||||
@@ -72,12 +66,14 @@ Apache software bundle on |CL|.
|
||||
|
||||
.. note::
|
||||
|
||||
The :file:`index.html` file is located in the :file:`/var/www/html` directory of your host system. You will copy this file into a new location after you modify the configuration in the next step.
|
||||
The :file:`index.html` file is located in the :file:`/var/www/html` directory
|
||||
of your host system. You will copy this file into a new location after you
|
||||
modify the configuration in the next step.
|
||||
|
||||
Change the default configuration and data directory
|
||||
***************************************************
|
||||
|
||||
|CL| is designed to be a stateless operating system which means that you
|
||||
|CL| is designed to be a `stateless`_ operating system which means that you
|
||||
must create an optional configuration file to make changes over the default
|
||||
values. The default location of the Apache configuration file,
|
||||
:file:`httpd.conf`, is located in the :file:`/usr/share/defaults/httpd`
|
||||
@@ -243,7 +239,7 @@ and is available in the database-basic |CL| bundle.
|
||||
|
||||
sudo systemctl status mariadb
|
||||
|
||||
Security Hardening
|
||||
Security hardening
|
||||
==================
|
||||
|
||||
With the MariaDB service running, we can perform some basic security
|
||||
@@ -310,14 +306,18 @@ hardening.
|
||||
... Success!
|
||||
Disallow root login remotely? [Y/n]
|
||||
|
||||
Normally, root should only be allowed to connect from the 'localhost'. This ensures that someone cannot guess the root password from the network. To block any remote root login, type 'y'.
|
||||
Normally, root should only be allowed to connect from the 'localhost'. This
|
||||
ensures that someone cannot guess the root password from the network. To
|
||||
block any remote root login, type 'y'.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
... Success!
|
||||
Remove test database and access to it? [Y/n]
|
||||
|
||||
By default, MariaDB includes a database named 'test' which anyone can access. This database is also intended only for testing and should be removed. To remove the test database, type 'y'.
|
||||
By default, MariaDB includes a database named 'test' which anyone can access.
|
||||
This database is also intended only for testing and should be removed. To
|
||||
remove the test database, type 'y'.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -380,10 +380,11 @@ our |CL| host system.
|
||||
|
||||
sudo mv phpMyAdmin-4.6.4-english phpMyAdmin
|
||||
|
||||
Use phpMyAdmin to Manage Databases
|
||||
Use phpMyAdmin to manage databases
|
||||
==================================
|
||||
|
||||
You can use the phpMyAdmin web-based tool to manage your databases. Follow the steps below for setting up a database called "WordPress".
|
||||
You can use the phpMyAdmin web-based tool to manage your databases. Follow the
|
||||
steps below for setting up a database called "WordPress".
|
||||
|
||||
#. Verify that a successful installation of all LAMP server components by
|
||||
going to http://localhost/phpMyAdmin. See figure 3.
|
||||
@@ -478,8 +479,8 @@ WordPress\*-ready database using |CL|.
|
||||
Next steps
|
||||
**********
|
||||
|
||||
As a next step, you could :ref:`create a WordPress server <wp-install>` and
|
||||
present it to the world.
|
||||
Next, add the WordPress components needed to host a WordPress website with :ref:`wp-install`.
|
||||
|
||||
.. _Apache HTTP Server Project: https://httpd.apache.org/
|
||||
.. _phpMyAdmin: https://www.phpmyadmin.net/
|
||||
.. _phpMyAdmin: https://www.phpmyadmin.net/
|
||||
.. _`stateless`: https://clearlinux.org/features/stateless
|
||||
@@ -1,14 +1,14 @@
|
||||
.. _wordpress:
|
||||
|
||||
WordPress\* use case tutorial
|
||||
#############################
|
||||
WordPress\* on |CL-ATTR|
|
||||
########################
|
||||
|
||||
This tutorial describes how to setup a webserver to host a WordPress site using
|
||||
|CL-ATTR|. The tutorial is split into two sections:
|
||||
This tutorial describes how to setup a web server to host a WordPress\* site on a
|
||||
|CL-ATTR| system. The tutorial is split into two sections:
|
||||
|
||||
#. Setting up a LAMP webserver with :ref:`web-server-install`.
|
||||
#. :ref:`web-server-install`
|
||||
|
||||
#. Setting up Wordpress on a LAMP webserver with :ref:`wp-install`.
|
||||
#. :ref:`wp-install`
|
||||
|
||||
If you already have a |CL| based :abbr:`LAMP (Linux, Apache, MySQL, PHP)` web server,
|
||||
you can skip ahead to the second section of this tutorial.
|
||||
@@ -20,8 +20,8 @@ you can skip ahead to the second section of this tutorial.
|
||||
of this tutorial.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:hidden:
|
||||
:maxdepth: 1
|
||||
:hidden:
|
||||
|
||||
web-server-install.rst
|
||||
wp-install.rst
|
||||
web-server-install.rst
|
||||
wp-install.rst
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _wp-install:
|
||||
|
||||
Create a |CL-ATTR| WordPress\* server
|
||||
#####################################
|
||||
Set up WordPress\* on a LAMP web server
|
||||
#######################################
|
||||
|
||||
This tutorial shows you how to install the WordPress\* components on your |CL|
|
||||
:abbr:`LAMP (Linux, Apache, MySQL, PHP)` server. At the end of
|
||||
@@ -12,16 +12,8 @@ can add the WordPress components needed to host a WordPress website on your syst
|
||||
Before you begin
|
||||
****************
|
||||
|
||||
This tutorial assumes you have successfully installed :ref:`Clear Linux on bare metal<bare-metal-install>`
|
||||
and that you have :ref:`set up a LAMP web server <web-server-install>`.
|
||||
|
||||
|
||||
Before you install new packages, update the |CL| OS with the following command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo swupd update
|
||||
|
||||
This tutorial assumes you have successfully completed :ref:`bare-metal-install`
|
||||
and that you have :ref:`web-server-install`.
|
||||
|
||||
Create a WordPress server
|
||||
*************************
|
||||
@@ -88,7 +80,7 @@ Follow these steps:
|
||||
|
||||
sudo rm latest.tar.gz
|
||||
|
||||
Set up WordPress with Web-based GUI
|
||||
Set up WordPress with web-based GUI
|
||||
===================================
|
||||
|
||||
Recall that you created a database and user when you installed phpMyAdmin during
|
||||
@@ -101,20 +93,20 @@ The WordPress language option screen appears, as shown in figure 1.
|
||||
#. Select :guilabel:`English` and click :guilabel:`Continue`.
|
||||
|
||||
.. figure:: figures/wp-install-1.png
|
||||
:alt: WordPress language selection
|
||||
:width: 600
|
||||
:alt: WordPress language selection
|
||||
:width: 600
|
||||
|
||||
`Figure 1: WordPress language selection screen.`
|
||||
`Figure 1: WordPress language selection screen.`
|
||||
|
||||
|
||||
The WordPress installation continues until the Welcome screen appears, as shown in
|
||||
figure 2:
|
||||
|
||||
.. figure:: figures/wp-install-2.png
|
||||
:alt: WordPress welcome screen
|
||||
:width: 600
|
||||
:alt: WordPress welcome screen
|
||||
:width: 600
|
||||
|
||||
`Figure 2: WordPress Welcome screen.`
|
||||
`Figure 2: WordPress Welcome screen.`
|
||||
|
||||
#. Click :guilabel:`Let’s go!`.
|
||||
|
||||
@@ -139,10 +131,10 @@ The WordPress language option screen appears, as shown in figure 1.
|
||||
is connected to the MariaDB database.
|
||||
|
||||
.. figure:: figures/wp-install-4.png
|
||||
:alt: Successful database connection.
|
||||
:width: 600
|
||||
:alt: Successful database connection.
|
||||
:width: 600
|
||||
|
||||
`Figure 4: Successful WordPress connection.`
|
||||
`Figure 4: Successful WordPress connection.`
|
||||
|
||||
#. Click :guilabel:`Run the install`.
|
||||
The installer runs until WordPress is fully installed on your system.
|
||||
@@ -150,14 +142,14 @@ The WordPress language option screen appears, as shown in figure 1.
|
||||
Complete successful login
|
||||
=========================
|
||||
|
||||
Once the installation is complete, you can name your blog and create a Wordpress username
|
||||
Once the installation is complete, you can name your blog and create a WordPress username
|
||||
and password. See figure 5.
|
||||
|
||||
.. figure:: figures/wp-install-5.png
|
||||
:alt: WordPress user creation
|
||||
:width: 600
|
||||
:alt: WordPress user creation
|
||||
:width: 600
|
||||
|
||||
`Figure 5: WordPress site information screen.`
|
||||
`Figure 5: WordPress site information screen.`
|
||||
|
||||
|
||||
#. Enter all required information.
|
||||
@@ -165,10 +157,10 @@ and password. See figure 5.
|
||||
#. Verify that the initial login screen appears once the installation is complete. See figure 6:
|
||||
|
||||
.. figure:: figures/wp-install-6.png
|
||||
:alt: WordPress login
|
||||
:width: 600
|
||||
:alt: WordPress login
|
||||
:width: 600
|
||||
|
||||
`Figure 6: The WordPress login screen.`
|
||||
`Figure 6: The WordPress login screen.`
|
||||
|
||||
#. Enter your WordPress username and password.
|
||||
#. Check :guilabel:`Remember me` to save your credentials.
|
||||
@@ -177,10 +169,10 @@ and password. See figure 5.
|
||||
Figure 7 shows the WordPress dashboard after a successful login:
|
||||
|
||||
.. figure:: figures/wp-install-7.png
|
||||
:alt: WordPress Dashboard
|
||||
:width: 600
|
||||
:alt: WordPress Dashboard
|
||||
:width: 600
|
||||
|
||||
`Figure 7: The WordPress dashboard.`
|
||||
`Figure 7: The WordPress dashboard.`
|
||||
|
||||
You are ready to go!
|
||||
|
||||
@@ -188,10 +180,10 @@ To check out your blog as it is seen by the outside world, enter:
|
||||
http://<your_website>/blog on your browser. Figure 8 shows the result:
|
||||
|
||||
.. figure:: figures/wp-install-8.png
|
||||
:alt: WordPress blog
|
||||
:width: 600
|
||||
:alt: WordPress blog
|
||||
:width: 600
|
||||
|
||||
`Figure 8: Your WordPress blog.`
|
||||
`Figure 8: Your WordPress blog.`
|
||||
|
||||
**Congratulations, your WordPress blog is up and running!**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user