Get A Sys Admin

sysadmin linux open source centos redhat rhel ubuntu apache mysql amazon ec2 s3 tutorial

Feb 9, 2010

Windows 7 on MSI Wind U100

After the problems I had with Ubuntu 9.10 I decided to try to install Windows 7 on my Advent netbook(a MSI Wind U100 clone).

I was very impressed to notice that installing Windows 7 was as easy as installing the latest version of Ubuntu. I used a tool available from their site to create a bootable USB. It's called Windows 7 USB/DVD Download Tool and this is the link to get it: http://store.microsoft.com/Help/ISO-Tool

Installation took about 30 minutes and everything worked out of the box except wireless and the scroll. Oh how I HATE that RTL8187SE! No OS likes it. I found some posts saying that it should work after a Windows Update, but it wasn't my case.

Labels: , , ,

Feb 8, 2010

Ubuntu 9.10 on MSI Wind U100

I just finished installing Ubuntu 9.10 karmic on my netbook few moments ago. Of course nothing works ... I feel like I'm back in the days of Windows 95. For the moment the list of things that are NOT working:
  • Wireless drivers (rtl8187se chip set I believe)
  • Webcam (never used it anyway)
  • Flash is missing

I'm a bit disappointed about all those things not working out of the box, but I'll have to find a way around.

Things that are working:
  • Sound
  • Bluetooth

Labels: , , , ,

Jan 30, 2010

mEgo is sky high

Yes ladies and gents, it is true! mEgo Inc, my former company where I have worked for the last 2 years as sysadmin, made the move to Amazon Elastic Compute Cloud (aka EC2) today!!!11oneone It's a moment of great joy to see this thing happening now at the beginning of 2010.

Best wishes to the mEgo team!

LE: Proof
PING mego.com (67.202.39.53) 56(84) bytes of data.
64 bytes from ec2-67-202-39-53.compute-1.amazonaws.com (67.202.39.53): icmp_seq=1 ttl=48 time=10.6 ms

Labels: , , , , , , ,

Jan 21, 2010

ISPConfig3 running on Ubuntu 9.10 on AWS

This is an idea on how to set ISPConfig 3 on Amazon EC2 for web hosting. It's still work in progress and I await for any constructive feedback. Since English is not my first language there might be some grammatical errors.

Prerequisites:
  • AWS Account
  • Some Linux experience

Part I - Setting up AWS

I have done all the setup of instance and ebs from the Amazon Management Console. It has a very intuitive interface and it's so easy to work with.

Optional: You can purchase reservation for an instance if you are planing to run it 24/7. To do so go to Instances -> Reserved Instances and click on Purchase Reserved Instance. For example a c1.medium instance reservation for 1 year costs 455$ one time fee and the hourly cost of the instance goes to 0.06$/hour. It's your decision, do the math if it's worth it or not to go with reserved instances.
  1. From the Management Console go to Volumes and Create Volume. I created a 40 GB volume in us-east-1a zone, choose an appropriate value for your needs.
  2. Next step which is also optional is to get an Elastic IP for your instance. Go to Elastic IPs and click Allocate New Address.
  3. You will need a keypair to access your instance. You can create one before launching the instance or create one when you also setup the new instance. Your choice. I created one before by going to Key Pairs -> Create Key Pair.

Part II - Launching the instance

Instance type used was c1.medium, the AMI for it was Ubuntu 9.10 Karmic 32bit ami-1515f67c from Canonical Images for Amazon EC2.
Go to Instances and press Launch Instance and make sure you set it to use ami-1515f67c. If you need to use a different zone or a 64 bit instance you can check the alestic page which is a wonderful resource for Ubuntu images for EC2. I would also suggest to join their EC2 Ubuntu Google Grup if you are serious about AWS + Ubuntu.
After the instance is up and running attach the Elastic IP and the Volume you have created to it. To attach the IP go to Elastic IPs and select Associate, for the EBS go to Volumes. I attached the EBS as /dev/sdb to the instance.

Later Edit: You will need to also modify the Security Groups and permit access on ports 22(SSH), 80(HTTP), 8080(ISPConfig 3), 20-21(FTP) -> still need more work to support PASV.

Part III - Install ISPConfig 3

Before proceeding with ISPConfig 3 setup connect to your instance and update the packages.

sudo su
apt-get update
apt-get upgrade

Note: You will have to connect to your instance using the ubuntu username and the key pair you generated for that instance. It won't allow you to connect directly as root.

To install the ISPConfig 3 I followed the HowtoForge excellent tutorial with a small exception: I skipped the part of setting up the quota since I was planning to use the EBS as storage for sites and MySQL databases. The rest of the tutorial was just perfect.

Part IV - Setting up the EBS and ISPConfig to work with it

Most of the stuff and talk about EBS and MySQL snapshots is discussed on Amazon developer forums in the thread called Tutorial: Running MySQL on Amazon EC2 with EBS (Elastic Block Store). Make sure you read the discussion before or after you are done with this post.

apt-get install dmsetup
modprobe dm_mod
modprobe dm_mirror
modprobe dm_snapshot
mkdir /dev/.static/dev/mapper -pv

Create ext3 filesystem:
mkfs.ext3 /dev/sdb

Setup it with dmsetup
echo 0 `blockdev --getsize /dev/sdb` linear /dev/sdb 0 | dmsetup create ebs

Add the records to fstab
echo "/dev/mapper/ebs /ebs ext3 noatime,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0 0 0" >> /etc/fstab

Setup quota
touch /ebs/aquota.user /ebs/aquota.group
chmod 600 /ebs/aquota.*
mount -o remount /ebs


Enable quota on ebs
quotacheck -avugm -F vfsv0 /ebs
quotaon -avug /ebs


For websites:
mkdir /ebs/sites
ln -s /ebs/sites /var/www/clients


Jailkit:
Set Jailkit chroot home: /ebs/home/[username]
mkdir /ebs/home

MySQL:
/etc/init.d/mysql stop
mkdir /ebs/mysql/data /ebs/mysql/log -pv
mv /var/lib/mysql /ebs/mysql/data
ln -s /ebs/mysql/data/mysql /var/lib/mysql
mv /var/log/mysql /ebs/mysql/log
ln -s /ebs/mysql/log/mysql /var/log/mysql



To make a snapshot of the database, go to the mysql console (msqyl -p)
FLUSH TABLES WITH READ LOCK;
SHOW MASTER STATUS;
SYSTEM dmsetup suspend /dev/mapper/ebs


Take your snapshot of the EBS

SYSTEM dmsetup resume /dev/mapper/ebs
UNLOCK TABLES;


Note:This is still work in progress, any advices on how to improve it are greatly appreciated and any constructive criticism also.

Labels: , , , , , , , ,

Nov 9, 2009

Funny 404 page

While reading some tutorials I found this funny 404 page:
http://high5.net/page7.html
It doesn't take long to read everything the web server has to say so check it out.

Labels: , , , ,

Aug 14, 2009

Cloud providers compared

Cloud Providers

Amazon offers EC2(Elastic Compute Cloud) as IaaS(Infrastructure as a Service). Maybe the most well known cloud provider, provides a wide variety of instances to use starting from 10 cents/hour up to 80 cents/hour.
Rackspace offers Cloud Servers, the equivalent of Amazon's EC2. The prices start from 1.5 cents/hour for 256 MB instance and go up to 96 cents/hour for their top instances.
GoGrid have, in their customer opinion, best UI(User Interface). Their prices seem a bit high, but with their prepaid plans prices go down to 10 cents/hour, similar to Amazon.

All three providers offer file storage also:
-Amazon offers S3 (15 cents/GB)
-Rackspace has Cloud Files(15 cents/GB)
-GoGrid has Cloud Storage in Beta (15 cents/GB)
So not much to say here. Prices are the same for storing.

But for uploading / downloading the files you store they also charge a tax.
-S3 will cost 1 cent per 1000 PUT/POST/COPY/LIST requests and 1 cent for 10 000 GET requests(when a user requests an image). DELETE is free :)
-Rackspace will cost 2 cents per 1000 PUT/POST/LIST requests and it's FREE for GET requests ... which I believe is an advantage for mEgo.
-Couldn't find any reasonable info about GoGrid on this matter.

Another important aspect is the bandwidth cost:
-Amazon 10c/17c for each 1 GB uploaded/downloaded
-Rackspace 8c/22c for each 1 GB uploaded/downloaded
-GoGrid with no plan you get to pay FREE/50c for each GB. But for 200$ a month we can get down to 20c/GB for downloads(Transfer 1TB plan).

Case study: 2 web servers each with 2 GB of RAM and one database server with 8 GB of RAM, 500 GB file storage, 400GB inbound transfers and 1TB outbound transfer.

Amazon:
2x c1.medium = 288$ (2 x 0.4$/h x 720h)
1x c1.high = 576$ (well this one has 7GB of RAM) (0.8$/h x 720h)
500GB file storage = 75$
400GB inbound = 40$
1TB outbound = 170$
Total 1149$/month

Rackspace:
2x 2048MB = 172$(2 x 0.12$/h x 720)
1x 8192MB = 345$(0.48$/h x 720)
500 GB file storage = 75$
400GB inbound = 32$
1TB outbound = 220$
Total 844$/month

GoGrid - for this one I will make use of their prepaid plans Advanced Cloud(499$/month for 5 000 RAM hours) and Tranfer 1TB plan(200$/month for 1TB outbound)
(2 x 2GB + 1x 8GB) * 720 = 8640 RAM hours at a price of 0.10$/hour which means 864$
500GB file storage = 75$
400GB inbound = 0$
1TB outbound = 200$
Total 1139$/month
LE: See Michael's comment for additional info regarding GoGrid

Labels: , , , ,

Dec 16, 2008

Useful Firefox add-ons

This is a list of add-ons I use daily:
Firebug for Web Development
A must add-on for anyone that is doing web development.You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page...

Nagios Checker
for server monitoring
The statusbar indicator of the events from the network monitoring system Nagios. What else can be said?

GMail Notifier for email alerts
Since I use Gmail as mail solution for my day-to-day work this is a great add-on. It supports multiple accounts.

Delicious Bookmarks for keeping your bookmarks in one place
Since I use multiple desktops, laptops and other devices I hate to have separate bookmarks for each of them. delicious is a great way to keep them in one place. You can keep private bookmarks if you want.

Labels: , , , , ,

Oct 14, 2008

Funny article about sysadmin

I was wandering around the Internet and I found an interesting article called "Silicon Valley Users Guide: How do I get my sysadmin to do anything?"

While it made me smile a lot I must say that most of the things pointed out there are true. This is my preferred part:
Don't question what he does all day. Systems administrators are like firemen and cops. If you don't have a couple of bored ones hanging around, you'll be sorry when there's an emergency.
Keep that in mind!

Link to the original post: How do I get my sysadmin to do anything?

Labels: , , , , , ,