Skip to content

Commit

Permalink
docs:Revert "docs: add notes about root requirements for commands"
Browse files Browse the repository at this point in the history
This reverts commit 8cafdc0.
  • Loading branch information
Jcahilltorre committed Jan 8, 2025
1 parent 8cafdc0 commit 960d7c8
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 67 deletions.
6 changes: 3 additions & 3 deletions source/certificates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ order them leaf to root.

Upload the resulting bundle file to Unit's certificate storage
under a suitable name
(in this case, **bundle**), running the following command as root:
(in this case, **bundle**):

.. code-block:: console
Expand Down Expand Up @@ -127,7 +127,7 @@ as **GET**-table JSON using **/certificates**:

Access array items,
such as individual certificates in a chain,
and their properties by indexing, running the following commands as root:
and their properties by indexing:

.. code-block:: console
Expand Down Expand Up @@ -196,7 +196,7 @@ the application is now accessible via SSL/TLS:
Finally, you can delete a certificate bundle
that you don't need anymore
from the storage, running the following command as root:
from the storage:

.. code-block:: console
Expand Down
4 changes: 0 additions & 4 deletions source/configuration/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

.. include:: ../include/replace.rst

.. note::
The commands in this document starting with a hash (#) must be run as root or
with superuser privileges.

#############
Configuration
#############
Expand Down
14 changes: 5 additions & 9 deletions source/controlapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ may benefit from this
Repeat these commands on the second machine
to see where the target instance stores its state.

Stop both Unit instances, for example, running the following command as root:
Stop both Unit instances, for example:

.. code-block:: console
Expand All @@ -147,7 +147,7 @@ may benefit from this
Copy the reference state directory to the target state directory
by arbitrary means;
make sure to include subdirectories and hidden files.
Finally, restart both Unit instances running the following command as root:
Finally, restart both Unit instances:

.. code-block:: console
Expand Down Expand Up @@ -205,10 +205,6 @@ OpenAPI specification
Quick start
***********


.. note::
Run the `curl` commands in this section as root.

For a brief intro,
we configure Unit to serve a static file.
Suppose you saved this as **/www/data/index.html**:
Expand Down Expand Up @@ -268,7 +264,7 @@ To configure Unit,
**PUT** this snippet to the **/config** section via the
:ref:`control socket <source-startup>`.
Working with JSON in the command line can be cumbersome;
instead, save and upload it as **snippet.json**.
instead, save and upload it as **snippet.json**:

.. code-block:: console
Expand Down Expand Up @@ -366,7 +362,7 @@ connections are properly closed,
processes end smoothly.

Any type of update can be done with different URIs,
provided you supply the right JSON. Run the following commands as root:
provided you supply the right JSON:

.. code-block:: console
Expand Down Expand Up @@ -404,7 +400,7 @@ For instance, save your application object as **wiki.json**:
"path": "/www/wiki/"
}
Use it to set up an application called **wiki-prod**.
Use it to set up an application called **wiki-prod**:

.. code-block:: console
Expand Down
5 changes: 2 additions & 3 deletions source/howto/apollo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ using Unit:

#. Install :ref:`Unit <installation-precomp-pkgs>` with the
**unit-dev/unit-devel** package. Next, :ref:`install
<installation-nodejs-package>` Unit's **unit-http** package. Run the following
command as root:
<installation-nodejs-package>` Unit's **unit-http** package:

.. code-block:: console
# npm install -g --unsafe-perm unit-http
#. Create your app directory, `install
<https://expressjs.com/en/starter/installing.html>`_ |app|, and link
**unit-http**. Run the commands starting with a hash (#) as root:
**unit-http**:

.. code-block:: console
Expand Down
4 changes: 0 additions & 4 deletions source/howto/certbot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ advisable to obtain certificates for your website from a certificate authority
<https://certbot.eff.org>`__ that issues free certificates signed by `Let's
Encrypt <https://letsencrypt.org>`_, a non-profit CA.

.. note::
The commands in this document starting with a hash (#) must be run as root or
with superuser privileges.

***********************
Generating Certificates
***********************
Expand Down
5 changes: 1 addition & 4 deletions source/howto/express.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ using Unit:

#. Install :ref:`Unit <installation-precomp-pkgs>` with the
**unit-dev/unit-devel** package. Next, :ref:`install
<installation-nodejs-package>` Unit's **unit-http** package. Run the following
command as root:
<installation-nodejs-package>` Unit's **unit-http** package:

.. code-block:: console
Expand All @@ -33,8 +32,6 @@ using Unit:
$ npm install express --save
Run the following command as root:

.. code-block:: console
# npm link unit-http
Expand Down
2 changes: 1 addition & 1 deletion source/howto/grafana.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ so we can :ref:`configure it <configuration-go>` to run on Unit.
usually **$GOPATH/bin/**; it's used for the **executable** option in
the Unit configuration.

#. Run the following commands (as root) so Unit can access |app|'s files:
#. Run the following commands so Unit can access |app|'s files:

.. code-block:: console
Expand Down
5 changes: 1 addition & 4 deletions source/howto/koa.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ To run apps built with the `Koa <https://koajs.com>`_ web framework using Unit:

#. Install :ref:`Unit <installation-precomp-pkgs>` with the
**unit-dev/unit-devel** package. Next, :ref:`install
<installation-nodejs-package>` Unit's **unit-http** package. Run the following
command as root:
<installation-nodejs-package>` Unit's **unit-http** package:

.. code-block:: console
Expand All @@ -31,8 +30,6 @@ To run apps built with the `Koa <https://koajs.com>`_ web framework using Unit:
$ npm install koa
Run the following command as root:

.. code-block:: console
# npm link unit-http
Expand Down
4 changes: 2 additions & 2 deletions source/howto/mailman.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To install and run the web UI for the `Mailman 3

These are needed to configure Unit.

#. Run the following command (as root) so Unit can access |app|'s static files:
#. Run the following command so Unit can access |app|'s static files:

.. code-block:: console
Expand All @@ -39,7 +39,7 @@ To install and run the web UI for the `Mailman 3
run the :program:`ps aux | grep unitd` command to be sure.

Alternatively, add Unit's unprivileged user account to |app|'s group so Unit
can access the static files. Run the following command as root:
can access the static files:

.. code-block:: console
Expand Down
4 changes: 1 addition & 3 deletions source/howto/mediawiki.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ documentation platform using Unit:
$ chmod 600 LocalSettings.php
Run the following commands (as root) to set the correct ownership:

.. code-block:: console
# chown :nxt_ph:`unit:unit <Values from Step 3>` LocalSettings.php
Expand All @@ -149,7 +147,7 @@ documentation platform using Unit:
# mv LocalSettings.php :nxt_ph:`/path/to/app/ <Path to the application directory; use a real path in your configuration>`
#. After installation, add a match condition to the first step to disable
access to the **mw-config/** directory. Run the following command (as root):
access to the **mw-config/** directory:

.. code-block:: console
Expand Down
4 changes: 0 additions & 4 deletions source/howto/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ Languages supported by Unit fall into these two categories:

For any specific language and its version, Unit needs a language module.

.. note::
The commands in this document starting with a hash (#) must be run as root or
with superuser privileges.

.. _modules-ext:

*************************
Expand Down
3 changes: 1 addition & 2 deletions source/howto/nextcloud.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ platform using Unit:
#. .. include:: ../include/howto_upload_config.rst

#. Adjust Unit's **max_body_size** :ref:`option <configuration-stngs>` to
avoid potential issues with large file uploads, for example, runnig the
following command as root:
avoid potential issues with large file uploads, for example:

.. code-block:: console
Expand Down
2 changes: 1 addition & 1 deletion source/howto/roundcube.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ To run the `Roundcube <https://roundcube.net>`_ webmail platform using Unit:
#. After installation, switch **share** and **root** to the
**public_html/** subdirectory to `protect
<https://github.com/roundcube/roundcubemail/wiki/Installation#protect-your-installation>`__
sensitive data, run the following command as root:
sensitive data:
.. code-block:: console
Expand Down
3 changes: 0 additions & 3 deletions source/howto/samples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ App Samples
These steps assume Unit was already :ref:`installed
<installation-precomp-pkgs>` with the language module for each app.

The commands in this document starting with a hash (#) must be run as root or
with superuser privileges.

.. _sample-go:

**
Expand Down
3 changes: 0 additions & 3 deletions source/howto/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ configuration, and maintenance.
This guide lists the steps to protect your Unit from installation to individual
app configuration.

.. note::
The commands in this document starting with a hash (#) must be run as root or
with superuser privileges.

.. _security-update:

Expand Down
4 changes: 0 additions & 4 deletions source/howto/source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ Building From Source
After you've obtained Unit's :ref:`source code <source>`, configure
and compile it to fine-tune and run a custom Unit build.

.. note::
The commands in this document starting with a hash (#) must be run as root or
with superuser privileges.

.. _source-prereq-build:

============================
Expand Down
2 changes: 1 addition & 1 deletion source/include/howto_change_ownership.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Run the following command (as root) so Unit can access :nxt_hint:`the application
Run the following command so Unit can access :nxt_hint:`the application
directory <If the application uses several directories, run the command for
each one>`:

Expand Down
2 changes: 1 addition & 1 deletion source/include/howto_upload_config.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Upload the updated configuration. Assuming the JSON above was added to
:file:`config.json`. Run the following command as root:
:file:`config.json`:

.. code-block:: console
Expand Down
4 changes: 0 additions & 4 deletions source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ You can install NGINX Unit in four alternative ways:
and :ref:`build <source-config-src>` a custom binary from scratch;
just make sure you know what you're doing.

.. note::
The commands in this document starting with a hash (#) must be run as root or
with superuser privileges.


.. _source-prereqs:

Expand Down
5 changes: 2 additions & 3 deletions source/scripting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,15 @@ by their **Authorization** header field values:
export default http
To upload it to Unit's JavaScript module storage
as **http**, run the following command as root:
as **http**:

.. code-block:: console
# curl -X PUT --data-binary @http.js --unix-socket :nxt_ph:`/path/to/control.unit.sock <Path to the remote control socket>` \
http://localhost/js_modules/:nxt_ph:`http <Module name in Unit's configuration>`
Unit doesn't enable the uploaded modules by default,
so add the module's name to **settings/js_module** running the following command
as root:
so add the module's name to **settings/js_module**:

.. code-block:: console
Expand Down
4 changes: 0 additions & 4 deletions source/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
Troubleshooting
###############

.. note::
The commands in this document starting with a hash (#) must be run as root or
with superuser privileges.

.. _troubleshooting-log:

*******
Expand Down

0 comments on commit 960d7c8

Please sign in to comment.