From 16354e3872d1aef2deff448154a789df50d6640e Mon Sep 17 00:00:00 2001 From: Kristal Dale Date: Mon, 24 Sep 2018 15:21:42 -0700 Subject: [PATCH 1/4] Reorg of WordPress tutorial (and related) files, to correct their placement in the tutorials nav section. Changes include: - Move all WordPress tutorial files into WordPress folder (landing page, web server install, wp-install, and related images) - Update WP landing page to more clearly indicate child pages of tutorial, hide toctree - All files related to WordPress tutorial: replace CLOSIA with CL-ATTRs, correct attributions - grammar Signed-off-by: Kristal Dale --- source/clear-linux/tutorials/tutorials.rst | 12 ++-- source/clear-linux/tutorials/wordpress.rst | 27 --------- .../figures/web-server-install-1.png | Bin .../figures/web-server-install-2.png | Bin .../figures/web-server-install-3.png | Bin .../figures/web-server-install-4.png | Bin .../figures/web-server-install-5.png | Bin .../figures/web-server-install-6.png | Bin .../figures/web-server-install-7.png | Bin .../figures/web-server-install-8.png | Bin .../figures/wp-install-1.png | Bin .../figures/wp-install-2.png | Bin .../figures/wp-install-3.png | Bin .../figures/wp-install-4.png | Bin .../figures/wp-install-5.png | Bin .../figures/wp-install-6.png | Bin .../figures/wp-install-7.png | Bin .../figures/wp-install-8.png | Bin .../web-server-install.rst | 13 +++-- .../tutorials/wordpress/wordpress.rst | 32 +++++++++++ .../{wp-install => wordpress}/wp-install.rst | 54 +++++++++++++----- 21 files changed, 85 insertions(+), 53 deletions(-) delete mode 100644 source/clear-linux/tutorials/wordpress.rst rename source/clear-linux/tutorials/{web-server-install => wordpress}/figures/web-server-install-1.png (100%) rename source/clear-linux/tutorials/{web-server-install => wordpress}/figures/web-server-install-2.png (100%) rename source/clear-linux/tutorials/{web-server-install => wordpress}/figures/web-server-install-3.png (100%) rename source/clear-linux/tutorials/{web-server-install => wordpress}/figures/web-server-install-4.png (100%) rename source/clear-linux/tutorials/{web-server-install => wordpress}/figures/web-server-install-5.png (100%) rename source/clear-linux/tutorials/{web-server-install => wordpress}/figures/web-server-install-6.png (100%) rename source/clear-linux/tutorials/{web-server-install => wordpress}/figures/web-server-install-7.png (100%) rename source/clear-linux/tutorials/{web-server-install => wordpress}/figures/web-server-install-8.png (100%) rename source/clear-linux/tutorials/{wp-install => wordpress}/figures/wp-install-1.png (100%) rename source/clear-linux/tutorials/{wp-install => wordpress}/figures/wp-install-2.png (100%) rename source/clear-linux/tutorials/{wp-install => wordpress}/figures/wp-install-3.png (100%) rename source/clear-linux/tutorials/{wp-install => wordpress}/figures/wp-install-4.png (100%) rename source/clear-linux/tutorials/{wp-install => wordpress}/figures/wp-install-5.png (100%) rename source/clear-linux/tutorials/{wp-install => wordpress}/figures/wp-install-6.png (100%) rename source/clear-linux/tutorials/{wp-install => wordpress}/figures/wp-install-7.png (100%) rename source/clear-linux/tutorials/{wp-install => wordpress}/figures/wp-install-8.png (100%) rename source/clear-linux/tutorials/{web-server-install => wordpress}/web-server-install.rst (96%) create mode 100644 source/clear-linux/tutorials/wordpress/wordpress.rst rename source/clear-linux/tutorials/{wp-install => wordpress}/wp-install.rst (72%) diff --git a/source/clear-linux/tutorials/tutorials.rst b/source/clear-linux/tutorials/tutorials.rst index c312c8ad..91dbdb4d 100644 --- a/source/clear-linux/tutorials/tutorials.rst +++ b/source/clear-linux/tutorials/tutorials.rst @@ -5,18 +5,18 @@ Tutorials Our Tutorials: -* Demonstrate how to use |CL| 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 +* 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. This section provides detailed instructions to guide you through completing -specific |CLOSIA| use cases. +specific |CL| use cases. .. toctree:: :maxdepth: 2 - wordpress + wordpress/wordpress flatpak/flatpak machine-learning/machine-learning docker/docker diff --git a/source/clear-linux/tutorials/wordpress.rst b/source/clear-linux/tutorials/wordpress.rst deleted file mode 100644 index f66bb1f6..00000000 --- a/source/clear-linux/tutorials/wordpress.rst +++ /dev/null @@ -1,27 +0,0 @@ -.. _wordpress: - -WordPress\* use case tutorial -############################# - -Welcome to our WordPress use case tutorial. The objective of the tutorial is -to guide you to a fully realized WordPress website using |CLOSIA|. - -In this tutorial we assume your system is already running |CL|. For -instructions on how to install |CL| on bare metal, see the -:ref:`bare metal install` page from our -:ref:`get-started` guide. For your convenience, we have -split this tutorial in two different sections. If you already have a |CL| -based :abbr:`LAMP (Linux, Apache, MySQL, PHP)` web server you can skip ahead -to the WordPress tutorial. - -.. toctree:: - :maxdepth: 1 - - web-server-install/web-server-install.rst - wp-install/wp-install.rst - -.. note:: - - This tutorial is for development and testing purposes only. Additional - steps are required to secure production systems. - Those steps are beyond the scope of this tutorial. diff --git a/source/clear-linux/tutorials/web-server-install/figures/web-server-install-1.png b/source/clear-linux/tutorials/wordpress/figures/web-server-install-1.png similarity index 100% rename from source/clear-linux/tutorials/web-server-install/figures/web-server-install-1.png rename to source/clear-linux/tutorials/wordpress/figures/web-server-install-1.png diff --git a/source/clear-linux/tutorials/web-server-install/figures/web-server-install-2.png b/source/clear-linux/tutorials/wordpress/figures/web-server-install-2.png similarity index 100% rename from source/clear-linux/tutorials/web-server-install/figures/web-server-install-2.png rename to source/clear-linux/tutorials/wordpress/figures/web-server-install-2.png diff --git a/source/clear-linux/tutorials/web-server-install/figures/web-server-install-3.png b/source/clear-linux/tutorials/wordpress/figures/web-server-install-3.png similarity index 100% rename from source/clear-linux/tutorials/web-server-install/figures/web-server-install-3.png rename to source/clear-linux/tutorials/wordpress/figures/web-server-install-3.png diff --git a/source/clear-linux/tutorials/web-server-install/figures/web-server-install-4.png b/source/clear-linux/tutorials/wordpress/figures/web-server-install-4.png similarity index 100% rename from source/clear-linux/tutorials/web-server-install/figures/web-server-install-4.png rename to source/clear-linux/tutorials/wordpress/figures/web-server-install-4.png diff --git a/source/clear-linux/tutorials/web-server-install/figures/web-server-install-5.png b/source/clear-linux/tutorials/wordpress/figures/web-server-install-5.png similarity index 100% rename from source/clear-linux/tutorials/web-server-install/figures/web-server-install-5.png rename to source/clear-linux/tutorials/wordpress/figures/web-server-install-5.png diff --git a/source/clear-linux/tutorials/web-server-install/figures/web-server-install-6.png b/source/clear-linux/tutorials/wordpress/figures/web-server-install-6.png similarity index 100% rename from source/clear-linux/tutorials/web-server-install/figures/web-server-install-6.png rename to source/clear-linux/tutorials/wordpress/figures/web-server-install-6.png diff --git a/source/clear-linux/tutorials/web-server-install/figures/web-server-install-7.png b/source/clear-linux/tutorials/wordpress/figures/web-server-install-7.png similarity index 100% rename from source/clear-linux/tutorials/web-server-install/figures/web-server-install-7.png rename to source/clear-linux/tutorials/wordpress/figures/web-server-install-7.png diff --git a/source/clear-linux/tutorials/web-server-install/figures/web-server-install-8.png b/source/clear-linux/tutorials/wordpress/figures/web-server-install-8.png similarity index 100% rename from source/clear-linux/tutorials/web-server-install/figures/web-server-install-8.png rename to source/clear-linux/tutorials/wordpress/figures/web-server-install-8.png diff --git a/source/clear-linux/tutorials/wp-install/figures/wp-install-1.png b/source/clear-linux/tutorials/wordpress/figures/wp-install-1.png similarity index 100% rename from source/clear-linux/tutorials/wp-install/figures/wp-install-1.png rename to source/clear-linux/tutorials/wordpress/figures/wp-install-1.png diff --git a/source/clear-linux/tutorials/wp-install/figures/wp-install-2.png b/source/clear-linux/tutorials/wordpress/figures/wp-install-2.png similarity index 100% rename from source/clear-linux/tutorials/wp-install/figures/wp-install-2.png rename to source/clear-linux/tutorials/wordpress/figures/wp-install-2.png diff --git a/source/clear-linux/tutorials/wp-install/figures/wp-install-3.png b/source/clear-linux/tutorials/wordpress/figures/wp-install-3.png similarity index 100% rename from source/clear-linux/tutorials/wp-install/figures/wp-install-3.png rename to source/clear-linux/tutorials/wordpress/figures/wp-install-3.png diff --git a/source/clear-linux/tutorials/wp-install/figures/wp-install-4.png b/source/clear-linux/tutorials/wordpress/figures/wp-install-4.png similarity index 100% rename from source/clear-linux/tutorials/wp-install/figures/wp-install-4.png rename to source/clear-linux/tutorials/wordpress/figures/wp-install-4.png diff --git a/source/clear-linux/tutorials/wp-install/figures/wp-install-5.png b/source/clear-linux/tutorials/wordpress/figures/wp-install-5.png similarity index 100% rename from source/clear-linux/tutorials/wp-install/figures/wp-install-5.png rename to source/clear-linux/tutorials/wordpress/figures/wp-install-5.png diff --git a/source/clear-linux/tutorials/wp-install/figures/wp-install-6.png b/source/clear-linux/tutorials/wordpress/figures/wp-install-6.png similarity index 100% rename from source/clear-linux/tutorials/wp-install/figures/wp-install-6.png rename to source/clear-linux/tutorials/wordpress/figures/wp-install-6.png diff --git a/source/clear-linux/tutorials/wp-install/figures/wp-install-7.png b/source/clear-linux/tutorials/wordpress/figures/wp-install-7.png similarity index 100% rename from source/clear-linux/tutorials/wp-install/figures/wp-install-7.png rename to source/clear-linux/tutorials/wordpress/figures/wp-install-7.png diff --git a/source/clear-linux/tutorials/wp-install/figures/wp-install-8.png b/source/clear-linux/tutorials/wordpress/figures/wp-install-8.png similarity index 100% rename from source/clear-linux/tutorials/wp-install/figures/wp-install-8.png rename to source/clear-linux/tutorials/wordpress/figures/wp-install-8.png diff --git a/source/clear-linux/tutorials/web-server-install/web-server-install.rst b/source/clear-linux/tutorials/wordpress/web-server-install.rst similarity index 96% rename from source/clear-linux/tutorials/web-server-install/web-server-install.rst rename to source/clear-linux/tutorials/wordpress/web-server-install.rst index 3c526468..864ecda1 100644 --- a/source/clear-linux/tutorials/web-server-install/web-server-install.rst +++ b/source/clear-linux/tutorials/wordpress/web-server-install.rst @@ -1,9 +1,10 @@ .. _web-server-install: -Create a Clear Linux\* based web server +Create a |CL-ATTR| based web server ####################################### -This tutorial shows you how to create a LAMP server using |CLOSIA| and how to use phpMyAdmin\* to manage an associated database. +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. 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 @@ -18,7 +19,9 @@ Before you install new packages, update the |CL| OS with the following console c 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. +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: @@ -380,7 +383,7 @@ our |CL| host system. 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. @@ -470,7 +473,7 @@ If successful, you should see the screen shown in figure 8: **Congratulations!** You have now created a fully functional LAMP server along with a -WordPress-ready database using |CL|. +WordPress\*-ready database using |CL|. As a next step, you could :ref:`create a WordPress server ` and present it to the world. diff --git a/source/clear-linux/tutorials/wordpress/wordpress.rst b/source/clear-linux/tutorials/wordpress/wordpress.rst new file mode 100644 index 00000000..27768e32 --- /dev/null +++ b/source/clear-linux/tutorials/wordpress/wordpress.rst @@ -0,0 +1,32 @@ +.. _wordpress: + +WordPress\* use case tutorial +############################# + +Welcome to our WordPress\* use case tutorial. This tutorial describes the steps to +setup a webserver to host a WordPress site using |CL-ATTR|. + +In this tutorial we assume your system is already running |CL|. For instructions +on how to install |CL| on bare metal, see the :ref:`bare metal install` +page from our :ref:`get-started` guide. For your convenience, we have split this +tutorial into two sections: + +#. Setting up a LAMP webserver with :ref:`web-server-install`. + +#. Setting up Wordpress on a LAMP webserver with :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. + +.. note:: + + This tutorial is for development and testing purposes only. Additional steps + are required to secure production systems. Those steps are beyond the scope + of this tutorial. + +.. toctree:: + :maxdepth: 1 + :hidden: + + web-server-install.rst + wp-install.rst diff --git a/source/clear-linux/tutorials/wp-install/wp-install.rst b/source/clear-linux/tutorials/wordpress/wp-install.rst similarity index 72% rename from source/clear-linux/tutorials/wp-install/wp-install.rst rename to source/clear-linux/tutorials/wordpress/wp-install.rst index b5eda738..831acfd0 100644 --- a/source/clear-linux/tutorials/wp-install/wp-install.rst +++ b/source/clear-linux/tutorials/wordpress/wp-install.rst @@ -1,14 +1,19 @@ .. _wp-install: -Create a Clear Linux WordPress server +Create a |CL-ATTR| WordPress\* server ####################################### -This tutorial shows you how to install the WordPress components on your |CL| LAMP server. At the end of :ref:`web-server-install`, you created a WordPress\*-ready database using phpMyAdmin\* and MariaDB\*. Now that the LAMP server is up and running, you can add the WordPress components needed to host a WordPress website on your system. +This tutorial shows you how to install the WordPress\* components on your |CL| +:abbr:`LAMP (Linux, Apache, MySQL, PHP)` server. At the end of +:ref:`web-server-install`, you created a WordPress-ready database using +phpMyAdmin\* and MariaDB\*. Now that the LAMP server is up and running, you +can add the WordPress components needed to host a WordPress website on your system. Before you begin ================= -This tutorial assumes you have successfully installed :ref:`Clear Linux on bare metal` and that you have :ref:`set up a LAMP web server `. +This tutorial assumes you have successfully installed :ref:`Clear Linux on bare metal` +and that you have :ref:`set up a LAMP web server `. Before you install new packages, update the |CL| OS with the following command: @@ -21,11 +26,20 @@ Before you install new packages, update the |CL| OS with the following command: Create a WordPress server =========================== -WordPress can be installed in a variety of ways. These instructions are written for users who have followed our instructions for installing phpMyAdmin when they :ref:`set up a LAMP web server `. Note that all steps in this tutorial have been tested using a NUC6i5SYH Intel® NUC. Visit the `NUC6i5SYH product page`_ for detailed information. +WordPress can be installed in a variety of ways. These instructions are +written for users who have followed our instructions for installing phpMyAdmin +when they :ref:`set up a LAMP web server `. Note that +all steps in this tutorial have been tested using a NUC6i5SYH Intel® NUC. +Visit the `NUC6i5SYH product page`_ for detailed information. -Numerous online articles are available to help you name your website and acquire the necessary certificates. Those tasks are beyond the scope of this tutorial. +Numerous online articles are available to help you name your website and +acquire the necessary certificates. Those tasks are beyond the scope of this tutorial. -You can take several actions to harden your website from attacks. The security of your website and the data it contains are complex and ever-evolving tasks. Prioritize security if you plan to expose your website to the outside world. This tutorial does not address security measures that you can take to harden your site but we strongly encourage you to take action. +You can take several actions to harden your website from attacks. The security +of your website and the data it contains are complex and ever-evolving tasks. +Prioritize security if you plan to expose your website to the outside world. +This tutorial does not address security measures that you can take to harden +your site but we strongly encourage you to take action. .. note:: @@ -35,9 +49,11 @@ You can take several actions to harden your website from attacks. The security o Download WordPress and manage directories ------------------------------------------ -For this tutorial, you will create a WordPress blog that can be accessed at: http:///blog. +For this tutorial, you will create a WordPress blog that can be accessed at: +http:///blog. -To accomplish this setup, you must add WordPress components to the :file:`/var/www/html/blog` directory. +To accomplish this setup, you must add WordPress components to the :file:`/var/www/html/blog` +directory. Follow these steps: @@ -75,9 +91,12 @@ Follow these steps: Set up WordPress with Web-based GUI ----------------------------------- -Recall that you created a database and user when you installed phpMyAdmin during :ref:`Creating a Clear Linux based web server `. Next, you must connect WordPress to the database and install WordPress. +Recall that you created a database and user when you installed phpMyAdmin during +:ref:`Creating a Clear Linux based web server `. Next, you must +connect WordPress to the database and install WordPress. -To continue with the setup, go to: http:///blog/wp-admin/install.php. The WordPress language option screen appears, as shown in figure 1. +To continue with the setup, go to: http:///blog/wp-admin/install.php. +The WordPress language option screen appears, as shown in figure 1. #. Select :guilabel:`English` and click :guilabel:`Continue`. @@ -88,7 +107,8 @@ To continue with the setup, go to: http:///blog/wp-admin/install.p `Figure 1: WordPress language selection screen.` - The WordPress installation continues until the Welcome screen appears, as shown in figure 2: + The WordPress installation continues until the Welcome screen appears, as shown in + figure 2: .. figure:: figures/wp-install-2.png :alt: WordPress welcome screen @@ -97,7 +117,9 @@ To continue with the setup, go to: http:///blog/wp-admin/install.p `Figure 2: WordPress Welcome screen.` #. Click :guilabel:`Let’s go!`. -#. Enter database connection specifics in the screen that appears as shown in Figure 3 below. + +#. Enter database connection specifics in the screen that appears as shown in figure 3 +below. * Database name: WordPress @@ -119,7 +141,8 @@ To continue with the setup, go to: http:///blog/wp-admin/install.p #. Click :guilabel:`Submit` to complete the setup. - Figure 4 shows the confirmation screen that verifies a successful setup. WordPress is connected to the MariaDB database. + Figure 4 shows the confirmation screen that verifies a successful setup. WordPress + is connected to the MariaDB database. .. figure:: figures/wp-install-4.png :alt: Successful database connection. @@ -133,7 +156,8 @@ To continue with the setup, go to: http:///blog/wp-admin/install.p Complete successful login --------------------------- -Once the installation is complete, you can name your blog and create a Wordpress username and password. See figure 5. +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 @@ -179,7 +203,7 @@ http:///blog on your browser. Figure 8 shows the result: You have successfully installed WordPress on a host system. -Add new entries to your blog and share them with the world using |CLOSIA|! +Add new entries to your blog and share them with the world using |CL|! .. _`step-by-step guide`: https://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Install From e884735a7347c4437e5c351c1d5f3ca763868ef3 Mon Sep 17 00:00:00 2001 From: Kristal Dale Date: Thu, 27 Sep 2018 13:50:19 -0700 Subject: [PATCH 2/4] - Clean up reST formatting - Clean up section headers - Add Next steps section, for consistency Signed-off-by: Kristal Dale --- .../wordpress/web-server-install.rst | 19 +++++++----- .../tutorials/wordpress/wp-install.rst | 30 ++++++++----------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/source/clear-linux/tutorials/wordpress/web-server-install.rst b/source/clear-linux/tutorials/wordpress/web-server-install.rst index 864ecda1..e3e6aa56 100644 --- a/source/clear-linux/tutorials/wordpress/web-server-install.rst +++ b/source/clear-linux/tutorials/wordpress/web-server-install.rst @@ -1,10 +1,10 @@ .. _web-server-install: Create a |CL-ATTR| based web server -####################################### +################################### -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 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. 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 @@ -32,7 +32,7 @@ This tutorial follows these steps: * Install phpMyAdmin and create a database. Install Apache -***************** +************** Apache is an open source HTTP web server application that can run on several operating systems, including |CL|. Go to the `Apache HTTP Server Project`_ @@ -85,7 +85,7 @@ directory. |CL| can overwrite this directory as part of the stateless paradigm. This default :file:`.conf` file includes the following directives that allow for additional locations of configuration definitions: -.. code-block:: bash +.. code-block:: console # Virtual hosts IncludeOptional /usr/share/defaults/httpd/conf.d/*.conf @@ -106,7 +106,7 @@ Open a text editor and perform the following: #. Copy the content listed below into the new file :file:`/etc/httpd/conf.d/httpd.conf`. - .. code-block:: bash + .. code-block:: console # # Set a new location for DocumentRoot @@ -219,7 +219,7 @@ the PHP components and are now ready to add your database application to complete your LAMP server implementation. Install MariaDB -****************** +*************** Install MariaDB to store content. MariaDB is a drop-in replacement for MySQL and is available in the database-basic |CL| bundle. @@ -381,7 +381,7 @@ our |CL| host system. sudo mv phpMyAdmin-4.6.4-english phpMyAdmin 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". @@ -475,6 +475,9 @@ If successful, you should see the screen shown in figure 8: You have now created a fully functional LAMP server along with a WordPress\*-ready database using |CL|. +Next steps +********** + As a next step, you could :ref:`create a WordPress server ` and present it to the world. diff --git a/source/clear-linux/tutorials/wordpress/wp-install.rst b/source/clear-linux/tutorials/wordpress/wp-install.rst index 831acfd0..2f6a939e 100644 --- a/source/clear-linux/tutorials/wordpress/wp-install.rst +++ b/source/clear-linux/tutorials/wordpress/wp-install.rst @@ -1,7 +1,7 @@ .. _wp-install: Create a |CL-ATTR| WordPress\* 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 @@ -10,7 +10,7 @@ phpMyAdmin\* and MariaDB\*. Now that the LAMP server is up and running, you can add the WordPress components needed to host a WordPress website on your system. Before you begin -================= +**************** This tutorial assumes you have successfully installed :ref:`Clear Linux on bare metal` and that you have :ref:`set up a LAMP web server `. @@ -24,7 +24,7 @@ Before you install new packages, update the |CL| OS with the following command: Create a WordPress server -=========================== +************************* WordPress can be installed in a variety of ways. These instructions are written for users who have followed our instructions for installing phpMyAdmin @@ -47,7 +47,7 @@ your site but we strongly encourage you to take action. Download WordPress and manage directories ------------------------------------------- +========================================= For this tutorial, you will create a WordPress blog that can be accessed at: http:///blog. @@ -89,7 +89,7 @@ Follow these steps: sudo rm latest.tar.gz Set up WordPress with Web-based GUI ------------------------------------ +=================================== Recall that you created a database and user when you installed phpMyAdmin during :ref:`Creating a Clear Linux based web server `. Next, you must @@ -118,26 +118,20 @@ The WordPress language option screen appears, as shown in figure 1. #. Click :guilabel:`Let’s go!`. -#. Enter database connection specifics in the screen that appears as shown in figure 3 -below. - +#. Enter database connection specifics in the screen that appears, as shown in figure 3 + below. + * Database name: WordPress - * Database username: wordpressuser - * Database password: wp-example (asterisks will not appear in the text box) - * Database host: localhost - * Table prefix: wp\_ - Figure 3 shows the completed fields: - .. figure:: figures/wp-install-3.png - :alt: Database connection details - :width: 600 + :alt: Database connection details + :width: 600 - `Figure 3: Information necessary for WordPress to connect to the database.` + `Figure 3: Information necessary for WordPress to connect to the database.` #. Click :guilabel:`Submit` to complete the setup. @@ -154,7 +148,7 @@ below. The installer runs until WordPress is fully installed on your system. Complete successful login ---------------------------- +========================= Once the installation is complete, you can name your blog and create a Wordpress username and password. See figure 5. From 5ef00db52c1d7e2d8e0b240d12b1402a3eab017e Mon Sep 17 00:00:00 2001 From: Kristal Dale Date: Fri, 28 Sep 2018 13:22:19 -0700 Subject: [PATCH 3/4] - simplify tutorial landing page (remove duplicate info re bare metal install, which is included in part 1) - Remove redundant "OS" with use of substitution Signed-off-by: Kristal Dale --- .../tutorials/wordpress/web-server-install.rst | 2 +- source/clear-linux/tutorials/wordpress/wordpress.rst | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/source/clear-linux/tutorials/wordpress/web-server-install.rst b/source/clear-linux/tutorials/wordpress/web-server-install.rst index e3e6aa56..c3a6a482 100644 --- a/source/clear-linux/tutorials/wordpress/web-server-install.rst +++ b/source/clear-linux/tutorials/wordpress/web-server-install.rst @@ -10,7 +10,7 @@ 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`. -Before you install new packages, update the |CL| OS with the following console command: +Before you install new packages, update the |CL| with the following console command: .. code-block:: bash diff --git a/source/clear-linux/tutorials/wordpress/wordpress.rst b/source/clear-linux/tutorials/wordpress/wordpress.rst index 27768e32..3a5ae2f8 100644 --- a/source/clear-linux/tutorials/wordpress/wordpress.rst +++ b/source/clear-linux/tutorials/wordpress/wordpress.rst @@ -3,13 +3,8 @@ WordPress\* use case tutorial ############################# -Welcome to our WordPress\* use case tutorial. This tutorial describes the steps to -setup a webserver to host a WordPress site using |CL-ATTR|. - -In this tutorial we assume your system is already running |CL|. For instructions -on how to install |CL| on bare metal, see the :ref:`bare metal install` -page from our :ref:`get-started` guide. For your convenience, we have split this -tutorial into two sections: +This tutorial describes how to setup a webserver to host a WordPress site using +|CL-ATTR|. The tutorial is split into two sections: #. Setting up a LAMP webserver with :ref:`web-server-install`. From 1862a2593d9c15b0b97aa86c6a045d8dce615008 Mon Sep 17 00:00:00 2001 From: Kristal Dale Date: Tue, 2 Oct 2018 14:33:13 -0700 Subject: [PATCH 4/4] - 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 --- source/clear-linux/tutorials/tutorials.rst | 14 ++-- .../wordpress/web-server-install.rst | 71 ++++++++++--------- .../tutorials/wordpress/wordpress.rst | 20 +++--- .../tutorials/wordpress/wp-install.rst | 62 +++++++--------- 4 files changed, 80 insertions(+), 87 deletions(-) diff --git a/source/clear-linux/tutorials/tutorials.rst b/source/clear-linux/tutorials/tutorials.rst index 91dbdb4d..31ede714 100644 --- a/source/clear-linux/tutorials/tutorials.rst +++ b/source/clear-linux/tutorials/tutorials.rst @@ -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 diff --git a/source/clear-linux/tutorials/wordpress/web-server-install.rst b/source/clear-linux/tutorials/wordpress/web-server-install.rst index c3a6a482..845a64ec 100644 --- a/source/clear-linux/tutorials/wordpress/web-server-install.rst +++ b/source/clear-linux/tutorials/wordpress/web-server-install.rst @@ -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`. -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 ` 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/ \ No newline at end of file +.. _phpMyAdmin: https://www.phpmyadmin.net/ +.. _`stateless`: https://clearlinux.org/features/stateless \ No newline at end of file diff --git a/source/clear-linux/tutorials/wordpress/wordpress.rst b/source/clear-linux/tutorials/wordpress/wordpress.rst index 3a5ae2f8..31060894 100644 --- a/source/clear-linux/tutorials/wordpress/wordpress.rst +++ b/source/clear-linux/tutorials/wordpress/wordpress.rst @@ -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 diff --git a/source/clear-linux/tutorials/wordpress/wp-install.rst b/source/clear-linux/tutorials/wordpress/wp-install.rst index 2f6a939e..aa062e3e 100644 --- a/source/clear-linux/tutorials/wordpress/wp-install.rst +++ b/source/clear-linux/tutorials/wordpress/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` -and that you have :ref:`set up a LAMP web server `. - - -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:///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!**