×


Blog


Configure WordPress on Ubuntu Server with Apache - Step by step process to do it ?

This article covers setup WordPress — including Apache, MySQL, and PHP, on the Ubuntu Linux server. WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. WordPress has seen incredible adoption and is a great choice for getting a website up and running quickly. After setup, almost all administration can be done through the web frontend.


How to install PHP Extensions on Ubuntu?

1. You can download and install some of the most popular PHP extensions for use with WordPress by executing the commands:

$ sudo apt update
$ sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip

2. Then restart Apache to load these new extensions in the next section. 

If you are returning here to install additional plugins, you can restart Apache now by running:

$ sudo systemctl restart apache2


To install WordPress on Ubuntu:

1. Change into a writable directory and then download the compressed release by typing:

$ cd /tmp
$ curl -O https://wordpress.org/latest.tar.gz

2. Extract the compressed file to create the WordPress directory structure:

$ tar xzvf latest.tar.gz

3. Add a dummy .htaccess file so that this will be available for WordPress to use later.

Create the file by typing:

$ touch /tmp/wordpress/.htaccess

4. Copy over the sample configuration file to the filename that WordPress actually reads:

$ cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php

5. Create the upgrade directory, so that WordPress won't run into permissions issues when trying to do this on its own following an update to its software:

$ mkdir /tmp/wordpress/wp-content/upgrade

6. Copy the entire contents of the directory into our document root:

$ sudo cp -a /tmp/wordpress/. /var/www/wordpress


Install Yarn on Ubuntu 20.04 - Step by step process to implement it ?

This article covers how to install Yarn on Ubuntu 20.04 LTS system. Yarn is a JavaScript package manager compatible with npm that helps you automate the process of installing, updating, configuring, and removing npm packages. 

It caches every download package and speeds up the installation process by parallelizing operations.


To Yarn on Ubuntu Linux:

1. Import the repository’s GPG key and add the Yarn APT repository to your system by running the following commands:

$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

2. Once the repository is enabled, update the package list, and install Yarn:

$ sudo apt update
$ sudo apt install yarn

3. If you installed Node trough nvm, skip the Node.js installation with:

$ sudo apt install --no-install-recommends yarn

4. Once completed, verify the installation by printing the Yarn version:

$ yarn --version


Download YouTube Videos on Ubuntu Linux - How to do it ?

This article covers how you can download YouTube videos on Linux using the youtube-dl utility. The youtube-dl is a handy utility with a large feature set. However, there is a lot more you can do with this utility. To explore more features, visit its official documentation . To play the downloaded videos, you can use any media players like VLC , FFmpeg , and so on.

youtube-dl is a command-line program that lets you easily download videos and audio from more than a thousand websites. 


youtube-dl is a Python based small command-line tool that allows to download videos from YouTube.com, Dailymotion, Google Video, Photobucket, Facebook, Yahoo, Metacafe, Depositfiles and few more similar sites. 

It written in pygtk and requires Python interpreter to run this program, it's not platform restricted. It should run on any Unix, Windows or in Mac OS X based systems.


To Install YouTube-DL in RHEL/CentOS and Fedora:

The youtube-dl program can be installed by enabling epel repository under your systems. Once enabled, you can install using 'yum' package manager tool:

$ yum install youtube-dl

Also, if you wish to add any third party repository, you can still install it right away using curl or wget command:

$ curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl

OR

$ wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

Your system must have curl or wget packages installed to fetch the recent version youtube-dl file. If you don't have them, you may yum to get it.

After fetching the file, you need to set a executable permission on the script to execute properly:

$ chmod a+rx /usr/local/bin/youtube-dl


To Install YouTube-DL in Ubuntu/Linux Mint and Debian:

$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install youtube-dl

Also, instead using any third party PPA, you can use curl or wget command to install latest version of youtube-dl script:

$ sudo curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl

OR

$ sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

After downloading the script, set the executable permission:

$ sudo chmod a+rx /usr/local/bin/youtube-dl


To Update YouTube-DL,

Youtube-dl itself can be updated to the latest version using the following command:

$ youtube-dl -U


Configure XRDP to Securely Connect Remote Linux Servers - Step by step process ?

This article covers how to install and use XRDP to securely connect to remote servers. Xrdp is an open-source implementation of the Microsoft Remote Desktop Protocol (RDP) that allows you to control a remote system graphically. 

With RDP, you can log in to the remote machine and create a real desktop session the same as if you had logged in to a local machine.


Installing Xrdp on Debian:

Xrdp package is available in the standard Debian repositories. To install it, run:

$ sudo apt install xrdp 

The service will automatically start once the installation process is complete. You can verify that the Xrdp service is running by typing:

$ sudo systemctl status xrdp


How to Configure Xrdp on Linux?

The Xrdp configuration files are stored in the /etc/xrdp directory.

Whenever you make any changes to the configuration file you need to restart the Xrdp service:

$ sudo systemctl restart xrdp


View Standard Log Files on Ubuntu Linux Servers - How to do it ?

This article covers how to view standard log files for troubleshooting any Linux system. Linux system administrators often need to look at log files for troubleshooting purposes.

Linux and the applications that run on it can generate all different types of messages, which are recorded in various log files. Linux uses a set of configuration files, directories, programs, commands and daemons to create, store and recycle these log messages. 

Knowing where the system keeps its log files and how to make use of related commands can therefore help save valuable time during troubleshooting.


To view log files on Linux:

Open the Terminal or login as root user using ssh command. 

Go to /var/log directory using the following cd command:

# cd /var/log

To list files use the following ls command:

# ls


To Configure Log Files on Ubuntu and CentOS:

This section explains different mechanisms for configuring log files. Let's start with a CentOS example.

To view users currently logged onto a Linux server, enter the who command as a root user:

$ who

This also lists the login history of users. 

To view the login history of the system administrator, enter the following command:

$ last reboot

To view information of the last login, enter:

$ lastlog


To Execute Log Rotation on Linux:

Log files that have zeroes appended at the end are rotated files. That means log file names have automatically been changed within the system.

The purpose of log rotation is to compress outdated logs that are taking up space. Log rotation can be done using the logrotate command. This command rotates, compresses, and mails system logs.

logrotate handles systems that create significant amounts of log files. The command is used by the cron scheduler and reads the logrotate configuration file /etc/logrotate.conf. It's also used to read files in the logrotate configuration directory.


Install and Use Curl Command on Ubuntu 20.04 - Step by step process to implement it ?

This article covers how to set up curl command on your Ubuntu 20.04 LTS machine. curl command is a tool to download or transfer files/data from or to a server using FTP, HTTP, HTTPS, SCP, SFTP, SMB and other supported protocols on Linux or Unix-like system.


To Install cURL for Ubuntu Linux:

1. Update your Ubuntu box, run: 

$ sudo apt update && sudo apt upgrade

2. Next, install cURL, execute: 

$ sudo apt install curl

3. Verify install of curl on Ubuntu by running: 

$ curl --version