From 4494c3781261582399efb1ede58186c02152fea6 Mon Sep 17 00:00:00 2001 From: Steven Spencer Date: Tue, 18 Oct 2022 10:27:54 -0500 Subject: [PATCH] URL fixes * based on the script that identifies broken URLs, attempt to fix broken URLs * In the `asterisk_installation.md` cleaned up code blocks to be consistent and fixed image display as well. Added admonition at the top noting the last version of Rocky Linux that this was tested with, but also noting that it should still work, since the bulk of the procedure deals with outside source packages. --- docs/books/disa_stig/disa_stig_part2.md | 2 +- docs/books/lxd_server/03-lxdinit.md | 2 +- docs/books/lxd_server/07-configurations.md | 2 +- docs/books/lxd_server/30-appendix_a.md | 2 +- .../communications/asterisk_installation.md | 94 ++++++++++++++----- docs/guides/containers/lxd_web_servers.md | 2 +- .../network/librenms_monitoring_server.md | 4 +- .../package_management/package_debranding.md | 2 +- 8 files changed, 80 insertions(+), 30 deletions(-) diff --git a/docs/books/disa_stig/disa_stig_part2.md b/docs/books/disa_stig/disa_stig_part2.md index 5d3cfb46c4..99aa8b375d 100644 --- a/docs/books/disa_stig/disa_stig_part2.md +++ b/docs/books/disa_stig/disa_stig_part2.md @@ -38,7 +38,7 @@ DISA is just one of many Security Profiles supported by the Rocky Linux SCAP def * [ANSSI](https://www.ssi.gouv.fr/en/) * [CIS](https://cisecurity.org) -* [Australian Cyber Security Center](https://www.cyber.gov.au/) +* [Australian Cyber Security Center](https://cyber.gov.au/) * [NIST-800-171](https://csrc.nist.gov/publications/detail/sp/800-171/rev-2/final) * [HIPAA](https://www.hhs.gov/hipaa/for-professionals/security/laws-regulations/index.html) * [PCI-DSS](https://www.pcisecuritystandards.org/) diff --git a/docs/books/lxd_server/03-lxdinit.md b/docs/books/lxd_server/03-lxdinit.md index 7e94e70ca1..975ee5a007 100644 --- a/docs/books/lxd_server/03-lxdinit.md +++ b/docs/books/lxd_server/03-lxdinit.md @@ -28,7 +28,7 @@ Here are the questions and our answers for the script, with a little explanation Would you like to use LXD clustering? (yes/no) [default=no]: ``` -If you are interested in clustering, do some additional research on that [here](https://lxd.readthedocs.io/en/latest/clustering/) +If you are interested in clustering, do some additional research on that [here](https://linuxcontainers.org/lxd/docs/master/clustering/) ``` Do you want to configure a new storage pool? (yes/no) [default=yes]: diff --git a/docs/books/lxd_server/07-configurations.md b/docs/books/lxd_server/07-configurations.md index d7c96698c5..d1ea06ce5d 100644 --- a/docs/books/lxd_server/07-configurations.md +++ b/docs/books/lxd_server/07-configurations.md @@ -76,7 +76,7 @@ lxc config set ubuntu-test and then hit TAB. -This shows you all of the options for configuring a container. If you have questions about what one of the configuration options does, head up to the [official documentation for LXD](https://lxd.readthedocs.io/en/stable-4.0/instances/) and do a search for the configuration parameter, or Google the entire string, such as "lxc config set limits.memory" and take a look at the results of the search. +This shows you all of the options for configuring a container. If you have questions about what one of the configuration options does, head up to the [official documentation for LXD](https://linuxcontainers.org/lxd/docs/master/instances/) and do a search for the configuration parameter, or Google the entire string, such as "lxc config set limits.memory" and take a look at the results of the search. We will look at a few of the most used configuration options. For example, if you want to set the max amount of memory that a container can use: diff --git a/docs/books/lxd_server/30-appendix_a.md b/docs/books/lxd_server/30-appendix_a.md index 31aac29ce1..d1d4f98ffa 100644 --- a/docs/books/lxd_server/30-appendix_a.md +++ b/docs/books/lxd_server/30-appendix_a.md @@ -70,7 +70,7 @@ Here are the questions and our answers for the script, with a little explanation Would you like to use LXD clustering? (yes/no) [default=no]: ``` -If you are interested in clustering, do some additional research on that [here](https://lxd.readthedocs.io/en/latest/clustering/) +If you are interested in clustering, do some additional research on that [here](https://linuxcontainers.org/lxd/docs/master/clustering/) ``` Do you want to configure a new storage pool? (yes/no) [default=yes]: diff --git a/docs/guides/communications/asterisk_installation.md b/docs/guides/communications/asterisk_installation.md index 15ef00fe64..a149900326 100644 --- a/docs/guides/communications/asterisk_installation.md +++ b/docs/guides/communications/asterisk_installation.md @@ -1,7 +1,17 @@ --- title: Installing Asterisk +contributors: Steven Spencer +tested with: 8.5 +tags: + - asterisk + - pbx + - communications --- +!!! note + + The last version of Rocky Linux that this procedure was tested on was version 8.5. Because the bulk of this procedure relies on source builds directly from Asterisk and a simple set of Development Tools from Rocky Linux, it should work on all versions. If you run into a problem, please let us know! + # Installing Asterisk on Rocky Linux **What is Asterisk?** @@ -26,38 +36,50 @@ At minimum, you will need the following skills and tools to complete this guide: ## Update Rocky Linux and Install `wget` -`sudo dnf -y update` +``` +sudo dnf -y update +``` This will get your server up-to-date with all packages that have been released or updated since the last update or install. Then run: -`sudo dnf install wget` +``` +sudo dnf install wget +``` ## Set Hostname Set your host name to the domain you'll be using for Asterisk. -`sudo hostnamectl set-hostname asterisk.example.com` +``` +sudo hostnamectl set-hostname asterisk.example.com +``` ## Add Needed Repositories First, install the EPEL (Extra Packages for Enterprise Linux): -`sudo dnf -y install epel-release` +``` +sudo dnf -y install epel-release +``` Next, enable Rocky Linux' PowerTools: -`sudo dnf config-manager --set-enabled powertools` +``` +sudo dnf config-manager --set-enabled powertools +``` ## Install Development Tools - sudo dnf group -y install "Development Tools" - sudo dnf -y install git wget +``` +sudo dnf group -y install "Development Tools" +sudo dnf -y install git wget +``` ## Install Asterisk ### Downloading and Configuring the Asterisk Build -Before you download this script, make sure you have the latest version. To do so, navigate to http://downloads.asterisk.org/pub/telephony/asterisk/ and look for the latest build of Asterisk. Then copy the link location. As of the writing of this document, the following was the latest build: +Before you download this script, make sure you have the latest version. To do so, navigate to [the Asterisk download link here](http://downloads.asterisk.org/pub/telephony/asterisk/) and look for the latest build of Asterisk. Then copy the link location. As of the writing of this document, the following was the latest build: ``` wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18.6.0.tar.gz @@ -82,7 +104,9 @@ You should see the following when the script completes: Now that all of the required packages are installed, our next step is to configure and build Asterisk: -`./configure --libdir=/usr/lib64 --with-jansson-bundled=yes` +``` +./configure --libdir=/usr/lib64 --with-jansson-bundled=yes +``` Assuming that the configuration runs without issue, you should get a large ASCII Asterisk emblem, followed by the following on Rocky Linux: @@ -98,9 +122,13 @@ configure: host-cpu:vendor:os: x86_64 : pc : linux-gnu : This is one of the steps where the administrator is going to need to do his homework. There are a lot of menu options that you may or may not need. Running the following command: -`make menuselect` +``` +make menuselect +``` -will bring you to a [menuselect screen](../images/asterisk_menuselect.png) +will bring you to a menu select screen: + +![menuselect screen](../images/asterisk_menuselect.png) Look through these options carefully and make selections based on your requirements. As stated earlier, this may take some additional homework. @@ -115,7 +143,9 @@ make install Installing the documentation isn't required, but unless you are a communications server expert, you'll want them installed: -`make progdocs` +``` +make progdocs +``` Next install the basic PBX and make the config. The basic PBX is just that, very basic! You will probably need to make changes going forward to get your PBX to function as you want it to. @@ -139,11 +169,15 @@ restorecon -vr {/etc/asterisk,/var/lib/asterisk,/var/log/asterisk,/var/spool/ast Now that the bulk of our work is completed, go ahead and exit out of the `sudo -s` command. This will require that most of the remaining commands use _sudo_ again: -`exit` +``` +exit +``` ### Set Default User & Group -`sudo vi /etc/sysconfig/asterisk` +``` +sudo vi /etc/sysconfig/asterisk +``` Remove the comments on the two lines below and save: @@ -152,7 +186,9 @@ AST_USER="asterisk" AST_GROUP="asterisk" ``` -`sudo vi /etc/asterisk/asterisk.conf` +``` +sudo vi /etc/asterisk/asterisk.conf +``` Remove the comments on the two lines below and save: @@ -163,7 +199,9 @@ rungroup = asterisk ; The group to run as. ### Configure Asterisk Service -`sudo systemctl enable asterisk` +``` +sudo systemctl enable asterisk +``` ### Configure Firewall @@ -178,7 +216,9 @@ sudo firewall-cmd --zone=public --add-port=10000-20000/udp --permanent Since we've made the `firewalld` commands permanent, we will need to do a reboot of the server. You can do that with: -`sudo shutdown -r now` +``` +sudo shutdown -r now +``` ## Test @@ -186,25 +226,35 @@ Since we've made the `firewalld` commands permanent, we will need to do a reboot To test, let's connect to the Asterisk console: -`sudo asterisk -r` +``` +sudo asterisk -r +``` Which will bring you into the Asterisk command-line client. You will see this prompt after the basic Asterisk information is displayed: -`asterisk*CLI>` +``` +asterisk*CLI> +``` To change the verbosity of the console, use the following: -`core set verbose 4` +``` +core set verbose 4 +``` Which should show you the following in the Asterisk console: -`Console verbose was OFF and is now 4.` +```bash +Console verbose was OFF and is now 4. +``` ### Show Sample End-Point Authentications At the Asterisk command-line client prompt, type: -`pjsip show auth 1101` +``` +pjsip show auth 1101 +``` This will return username and password information that you can then use to connect any SIP client with. diff --git a/docs/guides/containers/lxd_web_servers.md b/docs/guides/containers/lxd_web_servers.md index 0e739a9e2a..ad2bf10ddd 100644 --- a/docs/guides/containers/lxd_web_servers.md +++ b/docs/guides/containers/lxd_web_servers.md @@ -126,7 +126,7 @@ Here are the questions and our answers for the script, with a little explanation Would you like to use LXD clustering? (yes/no) [default=no]: ``` -If you are interested in clustering, do some additional research on that [here](https://lxd.readthedocs.io/en/latest/clustering/). Otherwise, just press “Enter” to accept the default option. +If you are interested in clustering, do some additional research on that [here](https://linuxcontainers.org/lxd/docs/master/clustering/). Otherwise, just press “Enter” to accept the default option. ``` Do you want to configure a new storage pool? (yes/no) [default=yes]: diff --git a/docs/guides/network/librenms_monitoring_server.md b/docs/guides/network/librenms_monitoring_server.md index 448e146378..7ab40d4a1f 100644 --- a/docs/guides/network/librenms_monitoring_server.md +++ b/docs/guides/network/librenms_monitoring_server.md @@ -40,10 +40,10 @@ dnf install -y epel-release The current version of LibreNMS requires a minimum PHP version of 8.1. The default package in Rocky Linux 9.0 is PHP 8.0, so we will need to enable a third party repository (true for Rocky Linux 8.6 as well) for this newer version. -We will install the REMI repository for this. The version of the repository you install will depend on the version of Rocky Linux you are running. Simply replace the "[v#]" below with either 8 or 9: +We will install the REMI repository for this. The version of the repository you install will depend on the version of Rocky Linux you are running. We are assuming version 9 below, but change this accordingly for the version you are running: ``` -dnf install http://rpms.remirepo.net/enterprise/remi-release-[v#].rpm +dnf install http://rpms.remirepo.net/enterprise/remi-release-9.rpm ``` Once both the EPEL and REMI repositories are installed, it's time to install the packages we will need: diff --git a/docs/guides/package_management/package_debranding.md b/docs/guides/package_management/package_debranding.md index cade75a022..a89b4e719c 100644 --- a/docs/guides/package_management/package_debranding.md +++ b/docs/guides/package_management/package_debranding.md @@ -20,4 +20,4 @@ Note: Use spaces, not tabs. When srpmproc goes to import the package to Rocky, it will see the work done in https://git.rockylinux.org/patch/PACKAGE , and apply the stored debranding patches by reading the config file(s) under ROCKY/CFG/*.cfg -from https://wiki.rockylinux.org/en/team/development/debranding/how-to +from [debranding wiki page](https://wiki.rockylinux.org/team/release_engineering/debranding/)