July 1, 2008
By now you have already installed Apache onto your dedicated server. Now, let’s configure Apache to run with PHP4 or PHP5, whichever is your preference in scripting.
For PHP4, it’s as simple as apt-get:
apt-get install apache2 php4 libapache2-mod-php4
Since PHP5 can be automatically installed if you don’t specify the package ‘4’, you can do that or apt-get:
apt-get install apache2 php5 libapache2-mod-php5
To test and ensure that you are now hosting with PHP4 or PHP5, create a test file called test.php in /var/www folder with phpinfo() function as follows:
nano /var/www/test.php
# test.php
php phpinfo();
Now, just point your web browser to http://ip.address/test.php and you’ll be able to see your php config and default settings. If you don’t, check with your dedicated server administrators or web hosting provider.
From there, you can also edit necessary values or setup virtual domains, enable CAPTCHA, and more.
June 26, 2008
LAMP web hosting is probably the most popular and affordable server setting for webmasters these days. If you aren’t already aware, LAMP stands for Linux, Apache, MySQL, and PHP and defines how your dedicated server will run – it will be Linux hosting with an Apache server, MySQL databases, and PHP development.
The first step to create a LAMP server setup is to install Apache on your Linux machine.
1) Download Apache from Apache Software Foundation.
2) Uncompress the archive using gunzip and tar and replace apache_1.3.11.tar.gz in the example here with the name of the current live version you just downloaded:
gunzip < apache_1.3.11.tar.gz | tar xvf –
This should create an apache_1.3.11 directory.
3) Move into the new directory you just created and use cd apache_1.3.11.
4) ./configure in the root so that your screen appears as such:
# ./configure
Configuring for Apache, Version 1.3.11
…
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
+ checking sizeof various data types
+ doing sanity check on compiler and options
…
Creating Makefile in src/modules/standard
5) make so that your screen looks like this:
# make
===> src
make[1]: Entering directory `src/httpd/apache_1.3.11′
make[2]: Entering directory `src/httpd/apache_1.3.11/src’
===> src/regex
…
[several lines later]
…
gcc -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite
-DNO_DL_NEEDED `../apaci` -o ab -L../os/unix
-L../ap ab.o -lap -los -lm -lcrypt
make[2]: Leaving directory `src/httpd/apache_1.3.11/src/support’
<=== src/support
make[1]: Leaving directory `src/httpd/apache_1.3.11′
<=== src
#
6) Install your new Apache with # make install and you’re done!
Now you are welcome to start Apache to make sure it’s working if you’d like.
As root, type /usr/local/apache/bin/apachect1 start and your browser at your brand new web server at yourdomain.com. If you see the Apache standard “It worked!” homepage, you are set.
June 11, 2008
Plenty of first time Plesk (and dedicated hosting) users are often confused when it comes to adding users to a new MySQL database. They can create the MySQL database with no issues, but adding a user can be a little trickier.
The option to create a MySQL database user should become available after you click on the database name from within Plesk. As you can see sometimes it is the obvious issues that get in our way the most.
Plesk offers a powerhouse of tools and services to use to manage our dedicated hosting servers, but as with anything it pays to read up on it before you jump in with both feet. All control panels are pretty much the same, they just have different ways of getting these jobs done.
June 6, 2008
Windows web hosting and MS SQL databases go hand in hand, just like Linux web hosting and MySQL are the most compatible. But what happens if you’re looking to use MySQL with your Plesk control panel in your Windows Server Hosting account?
Here’s a simple tutorial that should help you access phpMyAdmin using Plesk.
First, you’ll want to login with the username and password you got from your dedicated web host.
In order to access phpMyAdmin, you must first have created a MySQL database, so if you have not done that yet, do so now before you proceed.
Once the database with MySQL has been created, click on the “Database” icon in your Plesk control panel and choose whichever database you want to manage. Finally, click on the “DB WebAdmin” icon, where a popup window will open for phpMyAdmin.
NOTE: If nothing pops up, your popup blocker might be preventing this, so double check your settings and proceed once you can access the phpMyAdmin popup.
From there, you can edit tables, fields, data, and perform backups and delete your MySQL databases, right from phpMyAdmin!
If you’re using cPanel, it’s a bit easier: simply click on the icon above the words “MySQL Databases” on the main cPanel interface screen and then you’ll see phpMyAdmin and you can go from there!
So either way, whether you’re using Plesk or cPanel, you will be able to access phpMyAdmin with your dedicated server.
April 18, 2008
Blog Web Hosting is possibly the fastest growing type of web hosting these days. Because blogging helps with SEO (search engine optimization), builds resources and content, and draws customers and audiences to explore and offer their opinions, link back, and more, corporations are using blogs for their websites as content management systems, even as individuals continue to grow the blogging community with daily unique content about their hobbies and personal lives.
This puts b2evolution web hosting in the forefront of the industry, as b2evolution provides quality open source (free!) blogging software for your website!
b2evolution is actually an advanced blogging tool that is great for beginners and experienced webmasters alike. Similar to WordPress, b2evolution includes all kinds of traditional blogging tool, like posting categories, tags, comments, skins, and content management, but also combines that simplicity with a sophisticated yet easy-to-use interface with features like file and photo management, multiple blogs, and detailed user permissions and groups.
On your dedicated server, you just need to find a reliable dedicated web host and use a LAMP-based configuration (i.e. Linux, Apache, MySQL, PHP/PERL/Python).
April 11, 2008
Database Servers are becoming more and more popular these days, as technology professionals not only need a server to run their website for web server hosting but they also require the functionality and performance of a reliable database server. And in setting a database server up, you not only need affordable dedicated web hosting but also a database management system.
So what is a database management system?
A database management system (or DBMS) is more or less a piece of software that helps you organize, store, manage, edit, and retrieve of data in a database or databases from your server. Like content management system (CMS), it is setup to do these things as easily as possible for you.
There are many database management systems around, but here is a quick list of some of the most popular choices for dedicated server hosting:
- Oracle
- Microsoft Access
- Microsoft SQL Server
- Firebird
- PostgreSQL
- MySQL
- SQLite
April 10, 2008
Like Ruby on Rails and Web 2.0, LAMP has become one of the most popular and trendy keywords for software and application development these days. But, do you know what LAMP stands for or what it means as you choose a dedicated web host? LAMP is actually incredibly important to application servers, web servers, and software distribution, so if you are planning to purchase a dedicated server for exactly these purposes, you should definitely research this solution stack.
So what is LAMP?
LAMP stands for the solution stack of free, open source software that produces dynamic websites and allows for web server, application server, and easy software distribution. LAMP is actually an acronym for the open source software that it comprises:
L – Linux: the operating system on which LAMP can be hosted
A – Apache: the actual web server
M – MySQL: the database system used for database management
P – PHP, Perl, and Python: the programming languages that can develop the software
Each of these four technologies can be utilized separately, but together, they provide dedicated web developers the chance to dazzle. More importantly, they are more than likely bundled together anyway, as Linux, PHP, and MySQL are almost 100% of the time found beside each other, and the Apache web server is one of the most popular choices.
There is an extremely low cost associated with LAMP web hosting, as all of the LAMP solutions are completely free. The only real cost is the hosting account itself or dedicated server hosting you purchase.
There are many different dedicated server and web hosting technologies available to use when building and accessing your website. Probably the most popular free tool for database web hosting is MySQL.
So what is MySQL Web Hosting?
MySQL (pronounced My-Ess-Queue-El or My-See-Quel) is an open source or free database software, providing ease and speed to its resource base. MySQL boasts over 100 million downloads of this extremely familiar database software, and for good reason – most web hosting companies these days utilize MySQL for their databases and offer it free to their customers for database management as well.
The popularity of MySQL web hosting really came into light as a new application pack for technology was devised called LAMP (Linux, Apache, MySQL, PHP/Perl/Python). This, coupled with the fact that MySQL can be used on Linux as well as Windows and over 20 other platforms, makes MySQL hosting a huge choice for developers and webmasters in the dedicated web hosting and shared hosting fields.
April 7, 2008
Backing up your website is extremely important to the server security of your dedicated server, but you can’t forget about your server databases either! Your MySQL databases are the backbone of your website, especially if you are using it for database server hosting. In either situation, you cannot rely on manual backups of your dedicated server databases if you access them every day and if they are integral to your website’s success and uptime.
So below, we have included some helpful scripts that can be setup via cron jobs (scheduled tasks) on your server. These will automatically backup your databases for you, so you’ll never have to worry again! There are two options for these backups – you can either have them emailed to you or FTPed to you, both of which will assist with your dedicated web hosting experience.
MySQL backup via cron - Emailed to You
<?
$datestamp = date(”Y-m-d”); // Current date to append to filename of backup file in format of YYYY-MM-DD
/* CONFIGURE THE FOLLOWING SEVEN VARIABLES TO MATCH YOUR SETUP */
$dbuser = “”; // Database username
$dbpwd = “”; // Database password
$dbname = “”; // Database name. Use –all-databases if you have more than one
$filename= “backup-$datestamp.sql.gz”; // The name (and optionally path) of the dump file
$to = “you@remotesite.com”; // Email address to send dump file to
$from = “you@yourhost.com”; // Email address message will show as coming from.
$subject = “MySQL backup file”; // Subject of email
$command = “mysqldump -u $dbuser –password=$dbpwd $dbname | gzip > $filename”;
$result = passthru($command);
$attachmentname = array_pop(explode(”/”, $filename)); // If a path was included, strip it out for the attachment name
$message = “Compressed database backup file $attachmentname attached.”;
$mime_boundary = “<<<:” . md5(time());
$data = chunk_split(base64_encode(implode(”", file($filename))));
$headers = “From: $from\r\n”;
$headers .= “MIME-Version: 1.0\r\n”;
$headers .= “Content-type: multipart/mixed;\r\n”;
$headers .= ” boundary=\”".$mime_boundary.”\”\r\n”;
$content = “This is a multi-part message in MIME format.\r\n\r\n”;
$content.= “–”.$mime_boundary.”\r\n”;
$content.= “Content-Type: text/plain; charset=\”iso-8859-1\”\r\n”;
$content.= “Content-Transfer-Encoding: 7bit\r\n\r\n”;
$content.= $message.”\r\n”;
$content.= “–”.$mime_boundary.”\r\n”;
$content.= “Content-Disposition: attachment;\r\n”;
$content.= “Content-Type: Application/Octet-Stream; name=\”$attachmentname\”\r\n”;
$content.= “Content-Transfer-Encoding: base64\r\n\r\n”;
$content.= $data.”\r\n”;
$content.= “–” . $mime_boundary . “\r\n”;
mail($to, $subject, $content, $headers);
unlink($filename); //delete the backup file from the server
?>
MySQL backup via cron - FTPed to You
<?
$datestamp = date(”Y-m-d”); // Current date to append to filename of backup file in format of YYYY-MM-DD
/* CONFIGURE THE FOLLOWING THREE VARIABLES TO MATCH YOUR SETUP */
$dbuser = “”; // Database username
$dbpwd = “”; // Database password
$dbname = “”; // Database name. Use –all-databases if you have more than one
$filename= “backup-$datestamp.sql.gz”; // The name (and optionally path) of the dump file
$command = “mysqldump -u $dbuser –password=$dbpwd $dbname | gzip > $filename”;
$result = passthru($command);
/* CONFIGURE THE FOLLOWING FOUR VARIABLES TO MATCH YOUR FTP SETUP */
$ftp_server = “”; // Shouldn’t have any trailing slashes and shouldn’t be prefixed with ftp://
$ftp_port = “21″; // FTP port - blank defaults to port 21
$ftp_username = “anonymous”; // FTP account username
$ftp_password = “”; // FTP account password - blank for anonymous
// set up basic connection
$ftp_conn = ftp_connect($ftp_server);
// Turn PASV mode on or off
ftp_pasv($ftp_conn, false);
// login with username and password
$login_result = ftp_login($ftp_conn, $ftp_username, $ftp_password);
// check connection
if ((!$ftp_conn) || (!$login_result))
{
echo “FTP connection has failed.”;
echo “Attempted to connect to $ftp_server for user $ftp_username”;
exit;
}
else
{
echo “Connected to $ftp_server, for user $ftp_username”;
}
// upload the file
$upload = ftp_put($ftp_conn, $filename, $filename, FTP_BINARY);
// check upload status
if (!$upload)
{
echo “FTP upload has failed.”;
}
else
{
echo “Uploaded $filename to $ftp_server.”;
}
// close the FTP stream
ftp_close($ftp_conn);
unlink($filename); //delete the backup file from the server
?>
**MAKE ABSOLUTELY SURE that either script you use from above includes a .php extension. That file should have 755 permissions, and you MUST change the first variables to those specific to your website’s setup. Also, you MUST have a cron job setup in Cpanel and the path to the script needs to look like this: php /home/username/path-to-the-php-script. Just make sure you replace path-to-the-script with your script’s physical path. 
April 4, 2008
One of the first things you will notice about having a dedicated web host is that there is a fix for everything. Even if your server’s databases go down or you make a mistake that causes you to lose these databases, there is an easy way to back them up before you test scripts or applications so that you’ll never lose a thing on your dedicated server.
So how do you backup your MySQL databases using cPanel on a dedicated server?
1. First, navigate to cPanel and login.
2. Then, click on the “Backup” icon in cPanel and find your database’s name. Once you click on this, it will download a gzipped copy straight to your computer, where you can store it for future restores.
**You can also use the PHPMyAdmin feature via your dedicated server’s control panel by clicking on MySQL and then “phpmyadmin” at the bottom. In PHPMyAdmin, simply select the database that you need to backup and then click the export tab on the right. You can choose one specific table, several tables, or all tables to backup. When you’ve chosen the appropriate table(s), simply tick “save file as” and click “go” – you can then save the databases straight to your computer!
If you have the patience to manage your dedicated server periodically like this, backing up your databases regularly is a great idea. However, there are also automated solutions for site and MySQL backups using cron jobs.