Categories
Hosting Tips & Deals

Linode Review: From Slicehost to Linode VPS Hosting

linode I was with RackSpace Cloud Servers which is owned by RackSpace along with Slicehost where my servers are actually placed. So you can also say I’m moving from Slicehost to Linode. However, the fact that I’m leaving them doesn’t mean they are not good. To the opposite, they are absolutely one of the best VPS hosting providers – the pricing, the uptime, the proprietary control panel and 24/7 live chat support are all their pros. The only downside is that unmanaged VPS hosting can be daunting to those who find Linux a labyrinth. Other than that, they are both fantastic hosting companies to go with.

Linode has been around much earlier than Slicehost and rarely do they pompously promote or advertise their services which is usually a merit you want look at with hosting companies. A host who is stingy of offerings and features and who gives much less promotional discounts than the peer competitors is usually an honest one. From all the hosts I’ve been with, Linode definitely falls into this category.

Currently, they have 4 data centers for you to choose from, namely Fremont, CA, Newark, NJ, Dallas, TX (DC operated by The Planet) and Atlanta, GA. My linode is located at Fremont, CA and after a few HTTP request tests from the DC of DreamHost, Linode is slightly faster than Slicehost.

Linode’s control panel is much more simpler than others’ such as cPanel yet much better organized and filled with indispensable features. You can create and manage different configuration profiles for different VPS. You can create and manage disk images that are easy to move around, cut or mixed. You can even create more than 1 VPS within the most basic plan: Linode 360. Just cut the overall storage allotment and RAM into slices and install Linux and web server software into them respectively.

After a few days of tests, for now, I’m pretty happy with their servers and backbone connections. Will keep you updated.

Categories
Hosting Tips & Deals Linux Server Administration Tips

Linux: Change Directory or CD to the Previous Directory / Last Path

cd is the command in Linux to change the current working directory. While you can change to your home directory by cd ~, you can change to the previous directory or last directory you were in by:

cd -

Which would come very handy when you are working across multiple directories back and forth. To change to the second last directory in the path history, simply add a slash:

cd --
Categories
SQL / MySQL Tips and Tutorials

MySQL: Select and Show all MySQL Users

To show all MySQL databases, you can simply type SHOW DATABASES; or SHOW TABLES; to show all tables of the current database. However, if you want to list and display all the MySQL users, SHOW USERS; won’t work.

So how to display a list of the MySQL users?

As all user information such as user name and privilege data are stored in the table user of the database mysql that comes automatically created and populated after MySQL installation. You can show all the MySQL users of the current host by the following select query:

SELECT user FROM mysql.user;

Which would output a list of rows of all the active users, in the same format of what a SHOW DATABASES; would do.

Categories
CSS & HTML Tips

How to prevent or stop my website and pages from being indexed by search engines?

It’s really weird that one would like to do this but perhaps you are running some private website dedicated to just an intimate group. Anyway, you can stop search engines indexing your web pages by putting a meta tag in the header section of them:

<meta name="robots" content="noindex" />

That’s it. Any search engines abiding by the rules especially Google will never index this page or exclude all the pages with this meta tag out of their index database. You can also prevent search engines from requesting and reading your website or pages in the first place by the help of a robots.txt which specifies to what areas of your site are they not welcome.

Adding a rel="nofollow" tag helps too in that search engines will not follow this link to the destination page, let alone indexing it:

<a href="http://www.example.com" rel="nofollow">example site</a>
Categories
CSS & HTML Tips JavaScript Tips & Tutorials PHP Tips & Tutorials

How to redirect the visitor to another page or website?

This is one of the most common tasks in website development and also one of the most frequently asked question according to some of the keyword research tools. Well, you have 3 ways to achieve a web page redirection.

  1. Use PHP header() function to modify and send a HTTP Location header:

    header("Location: /thankyou.html"); // redirect the visitor to the /thankyou.html page on the same website

    header("Location: http://www.microsoft.com"); // redirect the visitor to Microsoft

    You will need to make sure there’s no output at all before the calling of the header function to avoid any headers already sent errors.

  2. Use the meta tag of HTML:

    <meta http-equiv="refresh" content="3;url=http://www.example.com/hi.html">

    Which will simply refresh the visitor’s browser window and redirect to http://www.example.com/hi.html in 3 seconds.

  3. Use JavaScript to manipulate the browser window location object:

    <body onload="document.location='http://www.example.com/'">

Categories
Coupons and Promo Codes Hosting Tips & Deals

The Planet Coupon Promo Code for 50% – 70% Off Dedicated Servers

the planet coupon of hostingOverture: Apply this Rackspace Cloud promo code to get $25 rebate / refund discount of the Rackspace Cloud managed hosting. Read some reviews of them.

Update: I’m very pleased to warn you that this The Planet dedicated server coupon code is so UNIQUE and POWERFUL that it gives an incredible discount on the plan Dual Xeon 2.8ghz, 2GB RAM, 2x73GB SCSI which you can order for just $89 per month with promo code: sesr, a price not only far lower than the original $269 but even much lower than that of the official promotional campaign of The Planet currently run at Web Hosting Talk. Just check out this sticky thread. You can see they are offering the exactly same server for $130.

———–

The Planet is perhaps one of the most prestigious dedicated hosting providers on the planet, along with RackSpace and SoftLayer. It hosts for HostGator. This week as I was looking for some additional hosts to accommodate the growth of a few of my sites, I found a very good deal from them. It’s a promotional code that instantly slices 50% – 70% off the pricing of the entire line of their dedicated products – well maybe not the entire line but it worked with all the servers on which I tried the code.

Just head to https://www.theplanet.com/servers/ and choose the server you’d like to sign up with by clicking ‘Order Now’. On the opened page find the ‘Promotional Code’ textbox on the right. Enter the coupon code:

sesr

And click ‘Apply’. If it’s successfully validated, you should be able to see the Monthly Price being discounted by 50% or so. Note that the code will NOT work in uppercase.

For instance, with this promo code,

the planet coupon discounts

Dual Xeon 2.8Ghz + 2GB RAM + 2x73GB SCSI at just $89 per month is ABSOLUTELY a dedicated hosting deal! Just head to the product page and enter the coupon code!

There’s still the setup fee though, so for the first month you’d have to pay an extra $25 unless you use this tip. Fire up the live chat and talk to a sales rep, ask for it and chances are you will get it waived. I talked to one of them and they seem pretty fine with that.

Use the coupon code to get bonus features of WiredTree.

Categories
Hosting Tips & Deals Linux Server Administration Tips

Linux: Check how much disk storage each directory takes up (Disk Usage command – du)

The Linux command du stands for disk usage which is used to check the amount of disk storage any particular directory or file is using. By default, the simple command:

du

Would return the disk usage in God-knows-what-unit of each of the directories in the current working directory and those beneath them – in a recursive manner. If you happen to have lots of them, the returned stats would be scrolling down crazily which barely makes it any useful.

Even if you have specified a specific directory such as "somedir":

du somedir

It still works in this uncomfortable way.

The solution is to use the -sh switch, the one switch a beginner will ever need:

du -sh

Which simply returns the amount of disk space the current directory and all those stuff in it are using as a whole, something like:

2.4G

Much much more intuitive and readable.

By:

du -sh somedir

You can find out how much disk storage directory "somedir" is using:

101M    somedir

To get all the subsequent / child directories disk usage from the current directory, simply use the asterisk:

du -sh *

It will then list the disk usage of all of them (but not recursively) one by one in a very readable manner:

8.0K    dir1
1.4G    dir2
135M    dir3
Categories
SQL / MySQL Tips and Tutorials

MySQL: How to change or convert MyISAM to InnoDB or vice versa?

After we have discussed the advantages and disadvantages of MyISAM and InnoDB, you might want to convert them back and forth and see the performance differences yourself. For small website, the difference may be minor but for a large popular application,

  • MyISAM tables yield better performance results in selecting data records
  • InnoDB tables give better performance results in inserting and updating data records

To change a MyISAM table to an InnoDB table:

ALTER TABLE table_name ENGINE = InnoDB;

To convert an InnoDB table to a MyISAM table:

ALTER TABLE table_name ENGINE = MyISAM;
Categories
SQL / MySQL Tips and Tutorials

MySQL Engines: InnoDB vs. MyISAM – A Comparison of Pros and Cons

The 2 major types of table storage engines for MySQL databases are InnoDB and MyISAM. To summarize the differences of features and performance,

  1. InnoDB is newer while MyISAM is older.
  2. InnoDB is more complex while MyISAM is simpler.
  3. InnoDB is more strict in data integrity while MyISAM is loose.
  4. InnoDB implements row-level lock for inserting and updating while MyISAM implements table-level lock.
  5. InnoDB has transactions while MyISAM does not.
  6. InnoDB has foreign keys and relationship contraints while MyISAM does not.
  7. InnoDB has better crash recovery while MyISAM is poor at recovering data integrity at system crashes.
  8. MyISAM has full-text search index while InnoDB has not.

In light of these differences, InnoDB and MyISAM have their unique advantages and disadvantages against each other. They each are more suitable in some scenarios than the other.

Advantages of InnoDB

  1. InnoDB should be used where data integrity comes a priority because it inherently takes care of them by the help of relationship constraints and transactions.
  2. Faster in write-intensive (inserts, updates) tables because it utilizes row-level locking and only hold up changes to the same row that’s being inserted or updated.

Disadvantages of InnoDB

  1. Because InnoDB has to take care of the different relationships between tables, database administrator and scheme creators have to take more time in designing the data models which are more complex than those of MyISAM.
  2. Consumes more system resources such as RAM. As a matter of fact, it is recommended by many that InnoDB engine be turned off if there’s no substantial need for it after installation of MySQL.
  3. No full-text indexing.

Advantages of MyISAM

  1. Simpler to design and create, thus better for beginners. No worries about the foreign relationships between tables.
  2. Faster than InnoDB on the whole as a result of the simpler structure thus much less costs of server resources.
  3. Full-text indexing.
  4. Especially good for read-intensive (select) tables.

Disadvantages of MyISAM

  1. No data integrity (e.g. relationship constraints) check, which then comes a responsibility and overhead of the database administrators and application developers.
  2. Doesn’t support transactions which is essential in critical data applications such as that of banking.
  3. Slower than InnoDB for tables that are frequently being inserted to or updated, because the entire table is locked for any insert or update.

The comparison is pretty straightforward. InnoDB is more suitable for data critical situations that require frequent inserts and updates. MyISAM, on the other hand, performs better with applications that don’t quite depend on the data integrity and mostly just select and display the data.