BlueHost Web Hosting Package

- Trusted by more than 1,000,000 domains
- Unlimited hosting Space & file transfer
- 24/7 support, live chat support, toll free phone.
- Fantatico: Free tools for blog, ecommerce, CMS
- CGI, Ruby (RoR), Perl, PHP, MySQL
- SSH (Secure Shell), SSL, FTP, Stats
- Bluehost Promo: Special Link $6.95


Archive for December, 2008

SSH common commands

Following up on my previous post about Bluehost’s SSH services, listed below are some of the common commands in for SSH.

ls : list files/directories in a directory, comparable to dir in windows/dos.
ls -al : shows all files (including ones that start with a period), directories, and details attributes for each file.

cd : change directory · · cd /usr/local/apache : go to /usr/local/apache/ directory
cd ~ : go to your home directory
cd – : go to the last directory you were in
cd .. : go up a directory

cat : print file contents to the screen
cat filename.txt : cat the contents of filename.txt to your screen

tail : like cat, but only reads the end of the file
tail /var/log/messages : see the last 20 (by default) lines of /var/log/messages
tail -f /var/log/messages : watch the file continuously, while it’s being updated
tail -200 /var/log/messages : print the last 200 lines of the file to the screen

more : like cat, but opens the file one screen at a time rather than all at once
more /etc/userdomains : browse through the userdomains file.
hit Space to go to the next page, q to quit

pico : friendly, easy to use file editor
pico /home/burst/public_html/index.html : edit the index page for the user’s website.

vi : another editor, tons of features, harder to use at first than pico
vi /home/burst/public_html/index.html : edit the index page for the user’s website.

grep : looks for patterns in files
grep root /etc/passwd : shows all matches of root in /etc/passwd
grep -v root /etc/passwd : shows all lines that do not match root

touch : create an empty file
touch /home/burst/public_html/404.html : create an empty file called 404.html in the directory /home/burst/public_html/

ln : create’s “links” between files and directories
ln -s /home/username/tmp/webalizer webstats: Now you can display http://www.yourdomain.com/webstats to show your webalizer stats online. You can delete the symlink (webstats) and it will not delete the original stats on the server.

rm : delete a file
rm filename.txt : deletes filename.txt, will more than likely ask if you really want to delete it
rm -f filename.txt : deletes filename.txt, will not ask for confirmation before deleting.
rm -rf tmp/ : recursively deletes the directory tmp, and all files in it, including subdirectories. BE VERY CAREFULL WITH THIS COMMAND!!!

last : shows who logged in and when
last -20 : shows only the last 20 logins
last -20 -a : shows last 20 logins, with the hostname in the last field

w : shows who is currently logged in and where they are logged in from.

netstat : shows all current network connections.
netstat -an : shows all connections to the server, the source and destination ips and ports.
netstat -rn : shows routing table for all ips bound to the server.

top : shows live system processes in a nice table, memory information, uptime and other useful info. This is excellent for managing your system processes, resources and ensure everything is working fine and your server isn’t bogged down.
top then type Shift + M to sort by memory usage or Shift + P to sort by CPU usage

ps: ps is short for process status, which is similar to the top command. It’s used to show currently running processes and their PID.
A process ID is a unique number that identifies a process, with that you can kill or terminate a running program on your server (see kill command).
ps U username : shows processes for a certain user
ps aux : shows all system processes
ps aux –forest : shows all system processes like the above but organizes in a hierarchy that’s very useful!

file : attempts to guess what type of file a file is by looking at it’s content.
file * : prints out a list of all files/directories in a directory

du : shows disk usage.
du -sh : shows a summary, in human-readble form, of total disk space used in the current directory, including subdirectories.
du -sh * : same thing, but for each file and directory. helpful when finding large files taking up space.

wc : word count
wc -l filename.txt : tells how many lines are in filename.txt

cp : copy a file
cp filename filename.backup : copies filename to filename.backup
cp -a /home/burst/new_design/* /home/burst/public_html/ : copies all files, retaining permissions form one directory to another.
find * -type d|xargs -i cp –verbose php.ini {} : copies your php.ini file into all directories recursively.

kill: terminate a system process
kill -9 PID EG: kill -9 431
kill PID EG: kill 10550
Use top or ps ux to get system PIDs (Process IDs)

EG:

PID TTY TIME COMMAND
10550 pts/3 0:01 /bin/csh
10574 pts/4 0:02 /bin/csh
10590 pts/4 0:09 APP

Each line represents one process, with a process being loosely defined as a running instance of a program. The column headed PID (process ID) shows the assigned process numbers of the processes. The heading COMMAND shows the location of the executed process.

Putting commands together
Often you will find you need to use different commands on the same line. Here are some examples. Note that the | character is called a pipe, it takes date from one program and pipes it to another.
> means create a new file, overwriting any content already there.
>> means tp append data to a file, creating a newone if it doesn not already exist.
< send input from a file back into a command.

grep User /usr/local/apache/conf/httpd.conf |more
This will dump all lines that match User from the httpd.conf, then print the results to your screen one page at a time.

last -a > /root/lastlogins.tmp
This will print all the current login history to a file called lastlogins.tmp in /root/

tail -10000 /var/log/exim_mainlog |grep domain.com |more
This will grab the last 10,000 lines from /var/log/exim_mainlog, find all occurances of domain.com (the period represents ‘anything’,
– comment it out with a so it will be interpretted literally), then send it to your screen page by page.

netstat -an |grep :80 |wc -l
Show how many active connections there are to apache (httpd runs on port 80)

mysqladmin processlist |wc -l
Show how many current open connections there are to mysql

mysqldump -u username -p dbname > file.sql
MySQL Dump

tar -zxvf file.tar.gz
UnTAR file

mysql -u username -p database_name Importing MySQL database

which [perl]
Finding path to [perl]

These codes are quoted from Bluehost’s Helpdesk – thus in case you have questions about them, it’s best to refer back to Bluehost technical supports.


Bluehost vs Lunarpages (Review & Guestpost)

Lunarpages and Bluehost are both in my favorite hosting list for long. Both hosting companies are in business for long and both are offering topnotch hosting services.

Bluehost vs Lunarpages in a glance

To save your time, I had highlighted several key hosting features of Bluehost and Lunarpages below.

Web Hosting Storage &
Bandwidth
Addon domain Automation Webstats Price Specials
BlueHost Unlimited Unlimited Fantastico & Simple Scripts Awstats & Webalizer $6.95/mo Marketing credit with Yahoo! and Google
LunarPages Unlimited Unlimited Fantastico Webalizer $4.95/mo Free software & web application

From the table, you’ll see that there are indeed not much differences between the two. In fact, pricing is the only differences between Lunarpages and Bluehost (with LP slightly cheaper than BH).

In term of popularity, Bluehost is much welcomed among webmasters. Google Trend (refer to the diagram) shows that Bluehost is growing much faster when compare with Lunarpages.

Bluehost vs Lunarpages

To my wild guess I think this is due to Bluehost’s quality customer support as well as aggressive web marketing plans.

Guest Article: Comparison between Bluehost and Lunarpages

On top of my personal review, I’m glad to have experienced web writer – Justin Knights to share his view on the topic. Check out his view about Bluehost and Lunarpages in this guest post below.

Comparison Between BlueHost and Lunarpages

There are many hosting providers out there in the market today and 2 companies that are worth mentioning is BlueHost and Lunarpages. Both these companies have been around for quite some time and have a good reputation in the industry. However, which company is the better of the two? Lets us make a comparison to see which company excels in the different categories.

By comparing the packages provided, Lunarpages provides specific packages for blogs, small business or enterprises but BlueHost is not clear in their packages. So, to find out which package suits you if you want to choose BlueHost, you will need to spend s little time to do a research. Lunarpages also provides Window hosting while BlueHost do not. Even though this might not be big matter, it still proves that Lunarpages provide something that BlueHost do not provide.

Next, we take a look at the price for both companies. Lunarpages is the more cost effective choice but Bluehost are much welcomed among webmasters. Bluehost is hosting a lot more domain than Lunarpages at the moment and a check on both companies search popularity will show that Bluehost is way ahead of Lunarpages. From the customer’s point of view, both companies are satisfactory. In fact, many customers have websites hosted by both of these companies. Last but not least, both companies provide user friendly hosting panels. Different users prefer different panels like cpanel, Fantastico. Both companies provide the same stuff.

For a conclusion, the company that you will choose must be an effective business investment. Lunarpages provide more choices and is cheaper; while BlueHost, despite being more popular, offer less hosting choices and are slightly more expensive.

Bluehost vs Lunarpages: Who’s the best?

So who’s the best between Lunarpages and Bluehost? Well it seems that it’s pretty tough to choose between these two hosting companies. In case you’re looking for budget hosting, then Lunarpages is recommended; for those who don’t mind paying a little extra for the pop star, then Bluehost is very much your choice. All in all, both hosting companies are doing very good in their industry. In case you are still unsure with them, I suggest you to try both services yourself as they both offer 30 days free trial period.


Does Bluehost offer SSH services?

Yes, you can always use SSH services for secure connection at Bluehost. However, SSH services are not enabled by default at Bluehost. In order to begin using SSH functions, you’ll need to submit a copy of your photo identification card via email or uploads via cPanel. On top of Bluehost’s admin approval, you’ll also need to manage SSH keys for automated SSH login.

Bluehost SSH functions

Connection to SSH Shell at Bluehost

To start using SSH services, here’s what you do:

1. Click on the connect button. It is the first one from the left.

Bluehost SSH functions

2. Enter in Hostname. (your domain name with out the www.) and your username. Highlight password when you’re done.

Bluehost SSH functions

3. Click Connect and enter your password when you’re prompted to do so.

What’s SSH and why should I care?

Personally I don’t use much SSH services but it’s indeed a very useful function. A SSH or sometimes known as secure shell is a kind of network that enables data exchange done in a safe channel.

The reason for SSH to exist is simple: Security. Internet is an open space that’s so vulnerable to malicious attacks – eavesdropping for passwords or sensitive information; hijacking messages to inspect and modify transmitted data; and faking network addresses to fool access control mechanisms or redirect connections to a fake server – these are all the common disaster we heard (or experienced!) about all the time. Using SSH protects you against all of these attacks.

Common SSH application: SFTP

In web hosting, SSH services are mostly used as secured file transfer protocol (SFTP). To transfer your data files between Bluehost server and your local machines, all you need to is as below:

  1. Download an FTP program that support Secure FTP.
  2. Enable SSH/Shell access on your account by submitting your identification card.
  3. Log into your SFTP program using port 22.

I can’t see any stats for awstats or webalizer

Don’t be surprise if you can’t see a thing when you click on Awstats or Webalizer in Bluehost cPanel. Stats reporting is not done automatically like last time. Now, Web stats must be enabled and saved before getting your site tracked.

Bluehost web stats reporting

To do this, go to ‘Choose Log Program’ in your Bluehost cpanel. Check the boxes for the stats you wish to track on each domain, click save changes when you’re done. Stats reporting will be visible after 24 hours, you can then view the statistics by logging back into cPanel.

Web stats function in Bluehost

In brief, here are what can you get at Bluehost’s web statistic report (mainly via Awstats and Webalizer):

  • Updated website statistical reports in every 24 hours.
  • Updated website bandwidth usage information in every 6 hours.

For current Bluehost users, a point worth noting is that Analog stats in Bluehost have been deprecated. The system will still function if you currently have Analog Stats enabled, however you cannot enable them for additional domains.