Archive › VPS Hosting

Find out Files modified within the Last x Days in Linux

Just use this simple command to recursively find out what files in the current directory has been modified within the last 6 days:

find . -type f -mtime -6

 

To find modified files in the current directory but to not look in certain sub-directories such as Maildir or logs:

find . -type f -mtime -6 | grep -v "/Maildir/" | grep -v "/logs/"

 

This would come very handy in:

  1. Finding files that have been hacked or maliciously uploaded.
  2. Finding files that are modified or updated by you in the last few days for backup or recovery or simply synchronization.

More tips can be found in this article as well.

Comments Off on Find out Files modified within the Last x Days in Linux

A Small Orange Coupon Codes for 15% Hosting Discounts

Save the rubbish. Here are the promotional coupon codes for A Small Orange.

Just click the orange coupons below to claim the discounts. I would appreciate it if you can click this link to be my referral so I earn a commission for your order.

Click to claim: 15% off any annual order

KAVOIRCOM
Click To Open/Copy

Click to claim: $5 off any order

SCRAPINGWEBCOM
Click To Open/Copy

These 2 codes will NEVER expire. So feel free to hand out to your friends!

 

Comments Off on A Small Orange Coupon Codes for 15% Hosting Discounts

Get Server CPU Usage of A Specific User

Suppose your user name is jimgreen and you can run the following command to get a very specific CPU usage of it in real time:

top -b -n 1 -u jimgreen | awk 'NR>7 { sum += $9; } END { print sum; }'

You can even further capture the usage metric in PHP and do conditional actions:
$usage = shell_exec("top -b -n 1 -u jimgreen | awk 'NR>7 { sum += $9; } END { print sum; }'");
Now $usage contains the CPU usage of the user jimgreen.

Comments Off on Get Server CPU Usage of A Specific User

2-year Linode Review – Prince of Unmanaged Hosting

linodeUnmanaged hosting wasn’t my thing at first but as I was eager to learn something new and it’s just much cheaper than managed hosting, I found one with the most positive reviews – Linode.

It’s all simple and to the point. Period. And I never looked back after using them. Though it’s very much painful for me to manage the vps box myself, it’s a great learning experience after all and I did learn a lot!

Linode is probably the cheapest VPS in all unmanaged hosting companies but it’s far from the worst. In opposite, they are the best and most cost-effective. RAM of 512MB hardly comes by at less than $20 / month these days. And they have got a very hearty community of users! They are eager to help those who need tips to set up and harden their boxes against security breaches.

Their control panel is very cozy – not fancy but just to the point. Everything’s well aligned where they should be. Very well organized. Easy to use and very intuitive. I love it very much.

They also have a very comprehensive documentation library that you could look up stuff in case you don’t know how to do something by yourself.

The only down time I experienced was a power outage or something that lasted about 3 hours. Other than that, it’s all a breeze. The server is responsive and stable.

I would recommend Linode to anyone who’s good at managing the hosting server themselves!

4.8/5 from me.

Comments ( 1 )

WiredTree Coupon Codes for VPS and Dedicated Hosting Discounts

It’s been a while since my last post here. If you are still subscribing to this blog, I deeply appreciate it and would like to invite you to subscribe to my other blog Kavoir.com which is much more tended. I publish related stuff such as web hosting reviews and deals there as well as my path to making grand money online which I hope would be of help to people like you.

So WiredTree coupons and discounts, you can use these coupon codes to get generous discounts from them. In case you are curious, I wrote a WiredTree review so that you know what these guys are like that you are going to deal with.

Comments ( 1 )

Unmanaged Hosting Server Installation & Initial Configuration for Dummies

Unmanaged hosting often comes with very competitive price compared to managed hosting environment, however, the drawback of which, is the steep learning curve for server noobs that unfortunately includes me. It’s meant for technically proficient ones after all.

This simple tutorial will walk you through the steps needed to set up a working web server that’s ready to serve websites from a bare bone Linux distro (Ubuntu, in this case). It serves to be a survival guide of unmanaged hosting for novice Linux server administrators while at the same time documents my findings and learned tips for myself.

We will take Ubuntu 9.04 (Jaunty) for example. Though all things are done at a Mosso 256 MB Cloud Server, 99% of them should work without a problem at other unmanaged hosting providers as long as the Linux distribution is identical. After this tutorial, you will have a working VPS or dedicated hosting server with update to date softwares and beginner security, in addition to necessary software packages to run and manage a LAMP web server: FTP, Apache 2, PHP 5.2.6 and MySQL.

Here we go. Suppose you have made the decision to go with one of the Linux distros of which I’d suggest Ubuntu and installed a plain version of it from the hosting control panel, now:

  1. You will be given a bare IP address, of course, when you have finished installing the Linux distro from the contrl panel provided by your hosting company. Download PuTTY and set it up to connect to your hosting server of that IP as the root via SSH. The root password should also have been revealed or emailed to you.
  2. Change the root password to a new one.
  3. Customize the default SSH listening port of 22 to a custom one.
  4. Build up necessary iptables firewall rules.
  5. Customize shell environment and make the prompt ls command listings a little more colorful so it’s more readable.
  6. Enable vi code highlighting (enabled by default in Ubuntu) and change the dark blue color for comments to a lighter blue.
  7. Update the software source lists in Ubuntu by:
    aptitude updateAnd set the proper locales:
    locale-gen en_US.UTF-8
  8. Upgrade the current distro to its latest:
    aptitude safe-upgradeFollowed by:
    aptitude full-upgrade
  9. Install the essential tools and packages for development, the build tools:
    aptitude install build-essential
  10. Install MySQL:
    aptitude install mysql-server mysql-clientThe installation will prompt you twice for the root password.
  11. Install Apache:
    aptitude install apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 ssl-certChange server name in the Apache configuration:
    vi /etc/apache2/apache2.confAnd add the following directive at the end of the file:
    ServerName kingChange ‘king’ to whatever you’ll name your own server. For beginner SSH users, nano would be a better choice for its intuitive editing capabilities. After restarting Apache web server gracefully by not interrupting connected clients:
    apache2ctl gracefulYou should be able to view the demo web page at http://(your server IP address).
  12. Install PHP5:
    aptitude install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-imagick php5-mcrypt php5-memcache php5-mhash php5-mysql php5-pspell php5-snmp php5-sqlite php5-xmlrpc php5-xsl
  13. Turn off server signature:
    nano /etc/apache2/conf.d/securityAnd change:
    ServerTokens FullTo:
    ServerTokens Prod
  14. Change the hostname of your server. Open and edit /etc/hostname:
    vi /etc/hostnameTo a top level domain you have registered for your website. And add it in /etc/hosts:
    vi /etc/hostsIn this way:
    127.0.0.1 example.com
  15. Reboot by:
    shutdown -r now
  16. Install the mail module for your hosting server, Postfix, so the php function mail() works:
    aptitude install postfix telnet mailxJust choose ‘Internet Site’.
  17. Install FTP daemon service so you can FTP stuff to your server as any user.
  18. Install rsync so that you can easily synchronize and backup files between 2 remote hosting servers:
    aptitude install rsync
Comments ( 5 )

Quick tip: 256 MB VPS helps you no more than shared hosting

256MB being the startup plan from most VPS providers will be no better than a shared hosting plan from affordable hosting providers. 384MB may seem to be a 128MB extra but actually just slightly more.

As a result of the nature of VPS, an entire operating system (such as Linux distributions: Ubuntu, Debian or Centos, and so forth) resides in it with a complete web server package: Apache, PHP, MySQL and potentially a lot of necessary modules and extensions, making the mere hosting slice of 256MB a frugal choice to cover all the overheads, much like the sunk cost in Economics. It is after the threshold of 256MB that every additional MB of RAM you purchase will be consumed by your own websites rather than by the system. Well, not precisely all of 256MB will be used for the system, but you are left with like 50MB – 100MB from the whole 256MB pie after installing everything WWW and getting your slice ready for websites.

So if you are going to switch to a VPS, make sure you board on at least 512MB memeory for a start or it won’t be worth the while and it may just be good enough to spread your sites across various shared hosting plans (preferrably from various distant hosting comapnies) for some SEO advantage.

Comments ( 2 )