Write a Basic Bash Script to Simplify Server Operations

Linux comes with a very powerful tool built into it. It is called the shell. Bash is one version of the shell that is very popular with Linux distributions. If you can learn even basic Bash scripting, you can simplify and automate a lot of tasks you would normally have to manually perform on your […]

How to Install Softaculous in cPanel/WHM

Softaculous is a handy add-on for cPanel that gives your users the ability to quickly and nearly effortlessly install web application scripts. You can administer it through WHM, but once it is installed, any of your cPanel users can do one-click script installations. Installing Softaculous is relatively easy. Just follow these steps.
First, you should make […]

Storing Web Cache on a RAM Disk: Part Two

In part one, you learned how to create a basic RAM disk and how to make it permanent by creating an entry in /etc/fstab. In this section, you will learn how to configure your Apache to send certain files to your RAM drive.
In this example, we will only send images to the RAM drive. Special […]

How to Fix Out of Memory Script Errors

A common problem you might face when running PHP scripts is an “out of memory” error. It usually looks something like this:
PHP Fatal error: Out of memory (allocated 51795435) (tried to allocate 84524 bytes) in /home/user/public_html/randomdirectory/file.php on line 750
First, it is important to understand what this error means. PHP is configured to only allow a […]

How to Increase Your PHP Upload Limit

Picture this:  You have a shiny new web application that allows your website’s users to upload videos through a web interface.  They are meant to be short videos that do not take up much space or bandwidth (100MB or less), but when you finally open the doors to let the users have at it, you […]

7 Lessons I Learned from Having My Own Server

For several years I leased an unmanaged dedicated server from a company that will remain nameless. I loved the experience, but there were plenty of times when I made horrible mistakes. The following are seven lessons I learned from having my own server.
1. Whatever I thought I knew was far less than what I needed […]

How to Login to a Linux Server as a Different User

When you login to your dedicated server via SSH, there are normally two options: your own username and root.  It is inadvisable to login directly as root, but you can always use “su” or “sudo” to run root commands.  In some circumstances, however, it may actually be more convenient and useful to login as another […]

MySQL Backup with AutoMySQLBackup

With the emergence of dynamic websites, most sites on your dedicated server probably use some form of database.  Chances are, if a site uses a database, it is running on MySQL or other SQL server.  It is no longer sufficient for system administrators or even individual website owners to only backup the contents of a […]

7 Ways to Troubleshoot Database Connections

With most of the world using dynamic websites, databases have become a regular part of the web hosting experience. Even if your database always works and run smoothly, you may have users on your dedicated server who are not so fortunate. Because many applications, scripts, and users may attempt to access the database […]

How to Create a phpinfo Page

A phpinfo page is a simple PHP script that usually only has one line of code:
<? php phpinfo(); ?>
You can create a phpinfo.php file and place it anywhere on any website on your server to view the current PHP configuration. That single line of code will return a plethora of detailed information about your […]

PHP the Module vs PHP the CGI Script

Some debates seem to have no end. Which came first, the chicken or the egg? Team Edward or Team Jacob? Paper or Plastic? In the world of dedicated servers, the ongoing debate is whether to use PHP as an Apache module or as a separate CGI script.
The current trend with most […]

How to Troubleshoot an Internal Server Error

In an earlier post, I went over some of the common error codes for Apache web servers. Most of them, like “404 Not Found”, are pretty easy to troubleshoot; however, one of the more obscure errors is “500 Internal Server Error”. It is clear from the error that something running on the […]

PHP Command Line Interface

PHP is a versatile tool that millions of sites use to power their content management systems and user interfaces. Its flexibility and dynamic nature make it deal for the era of the Internet that has been dubbed “Web 2.0”. It is, therefore, no surprise that the highly praised LAMP (Linux+Apache+MySQL+PHP) stack includes PHP.
What […]

Mail Server Email Aliases

An email alias is a name that appears before the @ symbol in an email address, which actually refers to another account or location. For example, the alias “billing” may actually point to an email account on your server called “sales”. A single email account can have multiple aliases, and an alias can […]

Finding Linux Server Files with “locate”

For the next couple of days, we will focus on searching. There are a few ways to search for files on a Linux server. Some are more in-depth than others. The tool called locate relies on a database backend for fast searching. The database must index the filesystem, and then the […]

How to automate tasks with cron jobs

Cron is a Linux service that runs in the background. On a dedicated server, cron is extremely valuable because you can automate repetitive commands and tasks. For example, if you want a certain log to be purged every day, you can create a script to perform the task and then tell cron to […]