All posts tagged server

Fast control panel script installation

By Tavis J. Hampton in: Uncategorized

Fantastico script installer

As the web hosting industry becomes more competitive, web hosting providers need to provide extra services and features to stand out from the rest. One common service that numerous hosts offer is script installation. Usually managed in the host’s control panel, users can use the service to automatically install content management systems, photo galleries, forums, and other web-based software.

Ideally, script installation should be fast, easy to use, and should be simple and direct, avoiding any hacks that make the installations incompatible with normal installations (in case the user ever needs to move their data to another server). But not all hosts are equal in these areas.

Go Daddy, for example, is a well known and highly advertised host, but their control panel scripts installation is mediocre at best. When a user sets up an installation of a script, Go Daddy’s control panel will queue it and make the user wait an undetermined amount of time before the script is actually installed. It is very slow and can be frustrating to a website owner who purchased an account expecting clean and fast script installation.

Continue reading: Fast control panel script installation

....
share this 0 comments

Control panel gallery scripts vs. third-party photo services

By Tavis J. Hampton in: Web Hosting Software

Gallery

Many website owners need photo galleries for their content. There are essentially three options for someone who wants an online photo gallery:

1. Use one of the gallery scripts supplied and installed by your web hosting provider (if available)
2. Download a free or commercial gallery application and install it on your server
3. Use a third-party photo sharing or gallery hosting site.

The advantage of a locally hosted gallery on your own server is that you can usually easily export your gallery and take it to another host. You also have full control over customization and features (especially if you are using an open source product). With option #1 the biggest disadvantage is that you are limited to whatever your web host provides, which may or may not be available if you switch to another host. The disadvantage of #2 is that you are responsible for updates and maintaining the security and stability of the gallery.

Option #3 eliminates the disadvantages of #1 and #2. Your gallery is maintained by another company and hosted on a remote server. You never have to worry about upgrades. The big disadvantage is that you do not have control over your own content and may not be able to easily export it and take it to another host or gallery.

Photo: Flickr

Continue reading: Control panel gallery scripts vs. third-party photo services

....
share this 0 comments

Companies save energy by integrating batteries into servers

By Daniel Foster in: Web Infrastructure VPS & Dedicated Web servers

batteryGiven the high cost of electricity, companies are always looking for ways to increase efficiency. This may involve optimizing CPU usage or reducing active cooling, but in the case of Google, Facebook, and soon Goldman Sachs, these companies have found another way go green: integrate batteries into servers.

Data centers spend millions on large UPS systems to provide temporary power during utility outages. A UPS only needs to provide power for a few minutes until generators can be started.

In 2008, Google became the first firm to integrate 12-volt batteries into servers for the same purpose. The technology works likes a charm and now others in the industry are catching on. This new system is not only cheaper and more reliable, but uses less power as well.

Continue reading: Companies save energy by integrating batteries into servers

....
share this 0 comments

What is FFmpeg hosting?

By Tavis J. Hampton in: Web Hosting Web servers Software

FFmpeg YouTube

Question: What is FFmpeg hosting?

Answer: FFmpeg is a suite of tools that provide users with video manipulation, editing, streaming, and recording capabilities on numerous platforms and multiple formats. As the name indicates, it supports a number of mpeg compression formats as well as other open and proprietary video codecs.

In order to have better than average video conversion and streaming on a website, you need a webhost that has FFmpeg installed on your server, accessible from web scripts, and ready to use. Since the advent of YouTube, many hosts have started offering dedicate FFmpeg server packages completely separate from their shared hosting accounts.

This allows the video conversion, streaming, and other tasks to use as much of the CPU and RAM that it needs to complete the tasks quickly and thoroughly. Normally, such servers will also include other related tools and libraries to support as many codecs and options as possible. Those may include but are not limited to Myplayer, xvidcore, Ogg (Theora and Vorbis), and LAME (MP3 Encoder).

Continue reading: What is FFmpeg hosting?

....
share this 0 comments

How to upgrade CentOS

By Tavis J. Hampton in: VPS & Dedicated Web servers Software

YUM update CentOS

Question: How do I upgrade my CentOS installation to a higher version?

Answer: Using YUM you can upgrade CentOS with only a few steps.

1. Backup your important data. If most or all of is in a database, make sure to backup all databases.

2. List all of the updates:

# yum list updates

3. Upgrade your distribution:

# yum update

4. Reboot the server:

# reboot

5. Verify that all systems are working:

# uname -a
# netstat -tulpn
# tail -f /var/log/messages
# tail -f /path/to/log/file
# cat /etc/redhat-release

Note: Because the kernel will be upgraded, you will need to reboot the server after completion, so you should plan a scheduled down time when your website(s) will have the least amount of activity.

Source: nixCraft

Continue reading: How to upgrade CentOS

....
share this 0 comments

New server setup

By Tavis J. Hampton in: VPS & Dedicated Web servers

server rack

Question: I want to setup my own server. What software and tools will I need?

Answer: The first major decision to make after you have purchased server hardware is what operating system to use. Many servers come with one already, but if yours does not, you will need to decide on one. Linux or other Unix variants, such as BSD or Solaris are by far the most popular, but there are also many Windows servers out there. If you are on a limited budget, go with a free Linux distribution, such as CentOS.

The next thing to choose is the web server. Choices include Apache, Nginx, and Lighttpd. After that, you will probably one a database server such as MySQL or PostgreSQL Finally, you will want a web-based control panel. Depending on the one you choose, it might also install its own versions of Apache, PHP, and MySQL.

There are many control panel solutions on the market, and most of them are commercial. Popular control panels includ cPanel and Plesk. There are also free solutions available like Virtualmin. Decide what you need for whatever type of websites you plan to have and then choose the software that meets those needs.

Photo: Flickr

Continue reading: New server setup

....
share this 0 comments

How to setup umask on a Linux server

By Tavis J. Hampton in: VPS & Dedicated

terminal iconIn Linux umask, or user file-creation mode mask, determines the permissions of new files. In other words, whenever you make a new file or upload/transfer a file from your local machine or another server, umask sets the initial permissions of that file.

In most Linux distributions, umask for all users is set in /etc/bashrc or /etc/profile. It uses a four digit code to determine the permissions. The default umask is 0002, which sets default directory permissions to 775 and default file permissions to 664. Use this simple calculation to determine the umask code for a permission:

Subtract the permission you want from the default file permission:

777 - 755 = 022

Similarly, for directories:

666 - 644 = 022

For a complete explanation of umask settings, type man umask from the command line.

Image Source: Wikimedia Commons

Continue reading: How to setup umask on a Linux server

....
share this 0 comments

Benefits of a Virtual Private Server (VPS)

By Tavis J. Hampton in: Web Hosting VPS & Dedicated

server rack

As we have mentioned in previous posts, a virtual private server (VPS) is an isolated instance of a larger operating system running in an enclosed environment. In Linux it is normally in a chrooted environment, where the root directory / is not available to the server user, but that user has its own virtual root directory. In essences it looks and feels to the end user like he has his own dedicated server.

There are several benefits to this setup,namely:

1. On the server side, it is a benefit to the web host because the user does not have true access to the server’s most critical files.
2. The host can support multiple VPS instances on a single machine, saving hardware costs
3. For both the user and web host it adds a higher level of security.
4. The user is provided with a managed server (even if the VPS itself is unmanaged) and does not have to worry about larger security concerns.
5. The cost is usually lower for the user since the host can offer dedicated server functionality while only giving the user the amount of space, CPU power, and RAM that she actually needs.

Photo: Flickr

Continue reading: Benefits of a Virtual Private Server (VPS)

....
share this 0 comments

How to merge two different files in Linux

By Tavis J. Hampton in: VPS & Dedicated Software

sdiff command

In yesterday’s post, we learned how to find the discrepancies between two similar files using a command called diff. With it, we were able to compare them and identify the actual lines containing differences.

Once you have identified the differences between the two, you have a couple of options. If only one file is different, you can delete it, but if both files have slight differences and you need the changes from both, you will need to include the changes from both. That would normally involve creating a third file or revision containing both changes.

With the command sdiff you can display the file differences side-by-side and can also merge the two file changes into a third output file. To run sdiff, use the following command string:

sdiff -o outfile file1.txt file2.txt

It will display the two differences (see the image above). Press Enter, and it will then provide you with options. Choose the one you want and then Quit.

Continue reading: How to merge two different files in Linux

....
share this 0 comments

How to check and optimize MySQL databases automatically

By Tavis J. Hampton in: Web Hosting VPS & Dedicated Software

MySQL table repair in phpMyAdmin

MySQL databases require regular maintenance, but usually the databases just need to be re-optimized and checked for errors. In such cases, having to go through each database on your server can be time consuming. Following these steps, you can setup a cron job that will automatically check and repair your databases.

1. Login to the server via SSH
2. Edit the crontab file found in /etc/crontab

# crontab -e

3. Enter the following line in the crontab file:

0 1 * * * mysqlcheck -Aao –auto-repair -u root -p[password] > /dev/null

This will check all databases on the server. If you do not have root access and only want to check your own website, you can edit your cron in your control panel or replace the “root” user with your MySQL username. Save the file, and cron will now start mysqlcheck at 1 am everyday to optimize and check all databases.

Source: My Digital Life
Photo: Flickr

Continue reading: How to check and optimize MySQL databases automatically

....
share this 0 comments

How to compare two files in Linux

By Tavis J. Hampton in: VPS & Dedicated Software

diff command

Question: I have two scripts in a directory on my server. One is the right one and one is not, but I do not remember which is which. How can I compare the two files?

Answer: Linux and UNIX-like operating systems usually come with a comparison command called “diff”. This command will display line-by-line differences between two files. It is useful for software developers, but web developers and web application managers will find it useful as well.

To use it, just enter:

diff script1.php script2.php

It will search through both PHP scripts and find any lines that are different. The output will look something like this:

if(!function_exists('add_action')){
header('HTTP/1.0 404 Not Found');
header('Location: ../../');
> exit();
}

In the first file “exit();” is not present, while the second file correctly contains it. Tomorrow we will learn how to merge the two differing files into one correct file.

Continue reading: How to compare two files in Linux

....
share this 0 comments

How to delete duplicate files in Linux

By Tavis J. Hampton in: VPS & Dedicated Software

terminal icon
Question: Two of my directories on my server have some the same files. How can I easily delete any duplicates while preserving the unique files?

Answer: There exists a Linux tool for just about everything, and this is no exception. You need a tool called fdupes, which searches the path you give it for duplicate files and uses several comparison techniques (sizes, MD5 signatures, byte-by-byte comparison) to find and eliminate duplicates.

First install fdupes. In RHEL/Fedora/CentOS, use the rpmforge repository enter:

# yum install fdupes

To find duplicates in the /etc directory, you would enter:

# fdupes /etc

To force fdupes to prompt you whether to preserve or delete files:

#fdupes -d /etc

As you can see, fdupes might be just what you need to clean up your server and possibly increase that precious disk space.

Source: nixCraft
Photo: Wikimedia Commons

Continue reading: How to delete duplicate files in Linux

....
share this 0 comments
Network Blogo