This is the official command-line interface for the Liquid Web API. CLI stands for the “command-line interface” which is used for interacting with multiple Liquid Web services via the Liquid Web’s Public API.
Chocolatey or Choco as it is sometimes referred to, is a free, open-source package manager for Windows that is very similar to Apt or DNF in the Linux realm. In other words, this is a program used for installing software via the Windows command line. It downloads a program, installs it, then it will check for updates, and installs those updates automatically if needed. Those who use Linux are quite familiar with the package management systems like this.
Some ask, “Why should we choose to use a program like this, since we can simply download the .exe or .msi software and install the program ourselves?”
That is an excellent question. Here are several solid answers.
When we install a new operating system and want to use numerous programs, we must look for each program installer, download it, install it, and then regularly check for updates. The Chocolatey package manager this all by itself, when using automatic mode.
Instead of searching for an executable installer, we can install the program using the Chocolatey package manager and complete everything using the command line. It is much more convenient and faster.
We can conveniently and more comfortably control the application versions we need. Most often, when we go to download an executable for the application, it downloads the latest version for us, and we do not always need the latest version.
Chocolatey provides clear, simple commands which are almost identically used in all package management systems.
Windows 7 or later / Windows Server 2003 or later
PowerShell v2 or later
.NET Framework 4 or later
(As an aside, the installation will attempt to install .NET 4.0 if you do not have it already installed.)
Let’s move on to the installation. There are two options for installing Chocolatey. We can install Chocolatey via the command line or through PowerShell. The option to use cmd is most often used for Windows, and PowerShell for running scripts. In this case, we can run both cmd and PowerShell, but as an administrator, for this installation.
Please inspect the Chocolatey installation script before running it to ensure safety. Chocolatey already knows it’s scripts are safe, but by default, you should verify the security and contents of any script you are not familiar with, before downloading and running it from the internet. This installation downloads a remote PowerShell script and execute it on your machine. We take security very seriously.
Install Using Powershell
When installing the software via PowerShell, we must ensure the local Get-ExecutionPolicy is not set to restricted. Chocolatey suggests using Bypass to bypass the policy to get things installed or AllSigned for increased security.
First, we need to run. Get-ExecutionPolicy If it returns Restricted
Then we need to run Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.
Now run the following command in the Windows shell. Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
If there are no errors, Chocolatey will be installed. We can verify the installation using one of the following commands. choco or choco -?
Install Using Windows Cmd Shell
First, we need ensure that we are using an administrative shell. Next, copy the following command to our cmd.exe shell.
Microsoft Windows [Version 10.0.18363.900]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command " [System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Getting latest version of the Chocolatey package for download.
Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.15.
Extracting C:\Users\user\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\user\AppData\Local\Temp\chocolatey\chocInstall...
Installing chocolatey on this machine
Creating ChocolateyInstall as an environment variable (targeting 'Machine')
Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell
before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to 'C:\ProgramData\chocolatey\lib'
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.
Creating Chocolatey folders if they do not already exist.
WARNING: You can safely ignore errors related to missing log files when
upgrading from a version of Chocolatey less than 0.9.9.
'Batch file could not be found' is also safe to ignore.
'The system cannot find the file specified' - also safe.
WARNING: Not setting tab completion: Profile file does not exist at
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
first prior to using choco.
Ensuring chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder
To verify that Chocolatey is installed, we will use the choco command.
Please run 'choco -?' or 'choco -?' for help menu.
Excellent! Chocolatey is installed!
Basic Chocolatey Commands
Now let’s review some of the basic commands for using Choco. Choco commands can be used in both the Windows cmd shell and in PowerShell.
To install a specific program, use the following command. choco install <pkg|packages.config> [ ] </pkg|packages.config>
For example: choco install chrome
For a complete listing of install options, visit the Choco install page or run the following command. choco install -h
To update a program, we will use the following command. choco upgrade <pkg|all> [ ] </pkg|all> For example: сhoco upgrade chrome
Update All Programs
To update all programs, we need to use the following command. cup <pkg|all> [ ] </pkg|all> or choco upgrade all
If you noticed, the cup command is an alternative to using the choco upgrade command.
Search For a Program
To find a needed program for downloading and installation, we can enter the following command. choco search chrome
See Installed Programs
Using the following command, you can see which programs are already installed using Choco. choco list --local-only
5 packages installed.
We can update the Choco program itself using this command. choco upgrade chocolatey
It is important to do this periodically because in previous versions, errors may be detected, and they need to be fixed so that there are no vulnerabilities.
Install the Chocolatey GUI
If someone is not comfortable using the command line, we can install the graphical user interface of Chocolatey using this command. choco install chocolateygui
That’s it! As you can see, using Chocolatey is very simple. Overall, we have found that Chocolatey is an excellent tool in our local systems administration toolbox. It is reliable, definitive, and consistently updated. Overall, it is an exceptional product.
Screen is a terminal program in Linux which allows us to use a virtual (VT100 terminal) as full-screen window manager which multiplexes an open physical terminal between multiple processes, which are typically, interactive shells. It allows us to access multiple terminal sessions within a single terminal or a remote terminal session. It is most useful when addressing multiple Linux shell commands on the command line, as well as separating commands from the shell that started the commands.
ApacheTop is an uncomplicated command line (CLI) utility that is used to monitor http traffic in real-time. It achieves this task by analyzing the incoming apache logs and based on that data presents understandable output to our screen. It can be configured to output X number of hits, or output X number of hits within X seconds.
Introduction to ApacheTop
Website owners and administrators oftentimes find themselves interested in the traffic for a specific website or multiple websites on the server. They might need this information in order to troubleshoot a high load issue on the server, or simply to learn the traffic pattern of a website, which is crucial for running a business. This information is logged in the web server’s access logs, and we can look through them to learn about the website’s traffic that has occurred in the past. Parsing through these logs to make most sense of them requires some basic skills in Bash, though, so it is not always very convenient.
However, we might want to learn more about the traffic in real-time in cases of currently high load on the server or issues with a website. In this case, we can use a monitoring tool called ApacheTop, which shows traffic in real-time. Furthermore, it collects the information from the web server’s access log and parses through it so that it generates human-readable output. This way, we can see what pages are being seen on the server in real-time, but we also do not need any Bash skills to parse through the output. It displays the information such as requests per second, bytes per second and URLs that are being requested, and its display is modelled after the standard top utility.
ApacheTop keeps a table of information by containing all the relevant data about the requests it has collected, but it can only be of a certain finite size. By default, it will show the data within the 30-second time frame, but we can define its size in a couple of ways. This can be done by making it remember a certain number of hits, or a certain number of seconds, after which it resets. We should also note that ApacheTop tool uses Apache’s default access log file for the traffic information, however, in case of a custom log path, we can also specify which log file to look through.
We can install ApacheTop like any other package, but we need to have the EPEL repository installed first.
CentOS Based Systems
yum install epel-release
yum install apachetop
Debian Based Systems
On Debian/Ubuntu based systems, we can use apt-get to install apachetop
apt-get install apachetop
In order to use ApacheTop, we can simply run the command apachetop from the command line. This will, without specifying anything else, by default use the Apache access log and display information within a 30-second timeframe.
If we want to use a custom log path, we can specify it with the -f flag:
apachetop -f /path/to/the/log/file
In order to change the default 30 second time range for showing data, we can do so with one of the following flags:
H – This flag specifies the number of hits we want ApacheTop to display. The following example will show the last 100 hits apachetop -H 100
T – This flag specifies the number of seconds for how long ApacheTop will keep track of the data. In the following example, ApacheTop will be showing hits in the last 60 seconds: apachetop -T 60
Some of the additional flags that we can also use include the following.
– q – This flag instructs ApacheTop to keep the query strings, instead of removing them
– l – This flag instructs ApacheTop to use all lowercase URLs, which causes it to accumulate the same statistics for both uppercase and lowercase URL
– s segments: This flag instructs ApacheTop to keep only the first parts of the path, which causes the statistics to be merged for each truncated URL
– p – protocol: This flag is kept at the front of its referrer strings. By default, it is removed to give more room to more useful information
– r secs: This flag sets the default refresh delay in seconds
Reading the Output
When we run the apachetop command, at the top of the screen we can see a summary of the statistics, as is shown in the image below.
The first line shows the time of the last hit, ApacheTop running time and the current time of the server.
The second and third lines show the statistics of all the visits since ApacheTop started running. On the second line we can see the total number of requests, along with the number of requests per second; total size of all requests with the number of bytes per second; and the average size of each request. The third line shows the number of requests that are returning 2xx, 3xx, 4xx and 5xx web server response codes.
The fourth and fifth lines show the same statistics as the second and the third respectively, but they only display the information within the specified, or default, time range.
Below these top five lines, we have the list of URLs that are being requested, with the total number of hits for each, and the size of the request in question, as can be seen in the image below.
The star (*) symbol next to the URL specifies which request is selected. We can select different requests by moving with the Up and Down arrow keys. Once we reach the request we are interested in, we can press the Right arrow key, which will take us to the page with details for that request. The details include the hosts requesting that URL and the referrers. To return to the main list, we can use the Left arrow key.
We can also switch the main view from showing the URLs, to show Hosts, or Referrers instead, by pressing the d key. In the image below, we are currently seeing the hosts instead of the URLs:
We can also choose what to see in the view by using filters. We can access those by pressing the fkey, and we will be presented with three options:
Pressing each of the letters will activate the corresponding action. If we want to add a filter, we would press the a key, and then we can choose if we want to filter by
Pressing the corresponding key would let us enter which URL, or referrer or host we want to filter by. Once we enter the information, the view will only show the requests that fit the entered criteria.
The ApacheTop utility is an extremely useful monitoring tool that is easy to use while providing human-readable information that can help pinpoint the cause of certain server and website issues. However, one should keep in mind not to monitor the traffic with an extended time frame or too many hits, as that would use too many CPU and memory resources, which could only add to the problem at hand.
In this article, we will be discussing the various methods and techniques used to locate and uninstall the software from a Ubuntu/Debian based server. We will primarily be using the apt and dpkg commands on the command line.
In this article, we will be reviewing the Apache Service Status. Sometimes checking the performance of a server can be difficult. Apache has built-in utilities that assist in monitoring the usage and performance of Apache. Apache Status also provides information that aids in performance auditing and control tuning.
cURL is a Linux command that is used to transfer multiple data types to and from a server. It operates utilizing the libcurl library, which allows it to use the following protocols to move information:
Installing Linux software from the command line can save you time, money, and make life easy – if you know what you’re doing! This article is a brief overview of how the command line operates on a RedHat or CentOS based Linux distribution, or even within a server cluster.
Once we have learned how the command line works, we will move on to installing, removing, and updating our software packages via the command line with yum. To get started, let’s begin by making sure we understand what the command line does.