Technology Insights

How to Use Gmail as an SMTP Server

Below is a brief explanation of how to use Gmail as an SMTP server to send email. I personally needed to configure Gmail to test Cforms WordPress plugin to make sure there wasn’t a problem with a clients hosting company servers native PHP mail. I used the below steps to create an account, configure the Gmail settings, and then verify the email was sent.

  1. Create Gmail Account: Got to gmail.com and create a new account.
  2. Open Cform Settings: Login to your WordPress admin, click on cforms in the left side nav, click on “Global Settings”, and then click on the “SMTP Server Settings” line.

Technology Insights

How to Update WordPress Blog URL

Below are a couple simple steps to update your WordPress blog’s URL. The below is valid if you are simply switching the URL using the same domain or if you are changing the WordPress domain all together. You will run into problems if you do not make sure to update each item.

  1. Update WordPress SiteURL: In the database table wp_options make sure to change siteurl to the new URL. This should be the first row in the wp_options table.
  2. Change Blog Address: Under “Settings” and then “General” change the “Blog Address” to the new URL.

Technology Insights

How to Change Timezone on Linux

Changing the timezone on Linux is easy. The timezone within Linux is set by a symbolic link located in the /etc directory which needs to be changed to the new timezone. Once this is changed the time needs to be synced to a time server. I recently moved from Las Vegas to Louisville and had not changed a Linux server to the new timezone. Follow the steps below and the new timezone will be set and updated.

  1. Backup Current Timezone: Issue the below command on your server to backup the current timezone information just in case there are issues.
    bash

    1. cp -p /etc/localtime /etc/localtime.bak

Technology Insights

Use Multiple Shells From One Terminal Window on Linux

You can use the Linux screen command to operate multiple shells from one terminal window on Linux. Below is the command to install screen on CentOS Linux.

bash

  1. yum install screen

Using screen is easy. First SSH to your server as you normally would and before running any commands that may take awhile type “screen”. This will start a screen session which will allow you to either run commands in multiple screen windows or detach the screen, close your SSH connection, reconnect another SSH session, and reattach the screen session. Below are some useful screen commands.

Technology Insights

Use yum on Linux to Install Previous Package Versions

When installing packages via yum the default will be to install the latest and greatest package that you request. It is possible however to install previous versions of the package by first seeing what versions of the package are available followed by a more detailed command to install a previous version.

Search Package Versions
First issue the below command to use yum yo display all versions of a package. This will only work on yum versions 8.1.X and below. See below for what to do on yum versions 8.2.X and above.

bash

  1. yum search package_name