Archive for the ‘Uncategorized’ Category

WinRAR on CentOS with cPanel

I’ve seen alot of people get stumped by an error that looks like this, rar: /lib/libc.so.6: version `GLIBC_2.7′ not found (required by rar) even I did for a while, after numerous google searches I found nothing, however today I finally ran into the site that saved me!

Basically

rm -rf /usr/bin/rar
ln -s /usr/local/rar/rar_static /usr/bin/rar

For me the location varied a little because I extracted everything in a different spot!

http://www.123tweak.com/how-to-install-winrar-on-centos/

Relocation Kuwait City

Well for those of you that have no idea, I have moved (temporarily?) to Kuwait city. I should be updating my blog regularly again. My portfolio will begin to get updated again, not much has gone on. The only bad news for me this week is the airline lost my bag & its been about a week, so I put in my claim, I’ll see how good they are to me. I have receipts to show how much everything in the bag is worth. Wish me luck ;)

FSLR First Solar, Inc.

First Solar, shares were up around 10% today, I closed my position with a modest gain, for those of you that didn’t see in the news;

First Solar, Inc. announced a memorandum of understanding (MOU) with the Chinese government to build a 2 gigawatt solar power plant in Ordos City, Inner Mongolia, China. Pursuant to the MOU, signed in the presence of Chairman Wu Bangguo of the Standing Committee of the National People’s Congress of China, the solar project in Ordos will be built over a multi-year period. Phase 1 will be a 30 megawatt demonstration project that will begin construction by June 1, 2010 and be completed as soon thereafter as practicable. Phases 2, 3 and 4 will be 100 megawatts, 870 megawatts, and 1,000 megawatts. Phases 2 and 3 will be completed in 2014 and Phase 4 will be completed by 2019. The project will operate under a feed-in-tariff which will guarantee the pricing of electricity produced by the power plant over a long-term period.

http://www.reuters.com/article/rbssEnergyNews/idUST5132220090907

I will update my positions here in the next 24 hours. My homework load has soared and eaten up most of my time, but I will be updating the site here soon.

Silkroad Online

Well, other than school, perl, linux + vmware, and going out I need a new hobby to eat up some of my downtime without spending tons of money :) , I decided I’ll start playing Silkroad Online again! Previously, when the cap was level 80, I had an 80 Full STR blader. Lets see how far I can get this time, word has it I will need 750,000 – 1,000,000 SP (Skill Points). In order to do alright, and more with the cap being raised to 110 by summer of next year at the latest.

If any of you wish to join me, I can be found on server Gaia. I haven’t picked a character name I like yet, however I will update the post once I do. Chances are I will make a Chinese character, instead of European.

Second Perl Experiment

After a bit of reading online and book reading (Learning Perl 2nd Edition), I came up with this;

#!/usr/bin/perl
# Revision 1 - 09-03-09 1530
# Countr Code list, stdin, perl
# SRC for codes: http://www.kropla.com/dialcode.htm

use Term::ANSIColor qw(:constants);
$Term::ANSIColor::AUTORESET = 1; #reset colors after each line

print GREEN "Please enter the country code you are trying to look up.\n";
$cc = <STDIN>;
chomp $cc;
if ($cc eq "1") {
print GREEN "United States of America or Canada.\n";
}
elsif ($cc eq "93") {
print RED "Afghanistan.\n"; }
elsif ($cc eq "355") {
print RED "Albania.\n"; }
elsif ($cc eq "213") {
print RED "Algeria.\n"; }
elsif ($cc eq "1684") {
print RED "American Samoa.\n"; }
elsif ($cc eq "376") {
print RED "Andorra.\n"; }
elsif ($cc eq "244") {
print RED "Angola.\n"; }
elsif ($cc eq "1268") {
print RED "Antigua.\n"; }
elsif ($cc eq "54") {
print RED "Argentina.\n"; }
elsif ($cc eq "374") {
print RED "Armenia.\n"; }
elsif ($cc eq "297") {
print RED "Aruba.\n"; }
elsif ($cc eq "247") {
print RED "Ascension.\n"; }
elsif ($cc eq "61") {
print RED "Australia.\n"; }
elsif ($cc eq "672") {
print RED "Australian Extrernal Territories.\n"; }
elsif ($cc eq "43") {
print RED "Austra.\n"; }
elsif ($cc eq "994") {
print RED "Azerbaijan.\n"; }
elsif ($cc eq "1242") {
print RED "Bahamas.\n"; }
elsif ($cc eq "973") {
print RED "Bahrain.\n"; }
elsif ($cc eq "880") {
print RED "Bangladesh.\n"; }
elsif ($cc eq "1246") {
print RED "Barbados.\n"; }
elsif ($cc eq "1268") {
print RED "Barbuda.\n"; }
elsif ($cc eq "375") {
print RED "Belarus.\n"; }
elsif ($cc eq "32") {
print RED "Belgium.\n"; }
elsif ($cc eq "501") {
print RED "Belize.\n"; }

Some of you may find this to be pretty elementary, but lets see what I can come up with in the next day or two. Essentially all this does is looks for a country that matches the code you put in. It does not include all countries, but I think I got the idea of elsif in perl.

Experimenting with Perl

Well, this is my first actual experiment with Perl. All it does is chmod 750 some fetch utilities. In my next build I want to set it up so that if the file exists, and if it doesnt, it will prompt you that the file is not on the system and it is being skipped.

#!/usr/bin/perl
# Revision 1 - 09-03-09
# Initial Build
# Chmod 750 of rcp, wget, lynx, links, elinks, scp, nc, ftp, telnet, curl
 
print ("Permissions?\n");
system ('chmod 750 -v /usr/bin/rcp');
system ('chmod 750 -v /usr/bin/wget');
system ('chmod 750 -v /usr/bin/lynx');
system ('chmod 750 -v /usr/bin/links');
system ('chmod 750 -v /usr/bin/elinks');
system ('chmod 750 -v /usr/bin/scp');
system ('chmod 750 -v /usr/bin/nc');
system ('chmod 750 -v /usr/bin/ftp');
system ('chmod 750 -v /usr/bin/telnet');

Lets see how this turns out over the next few days.

Update before I go to bed:

#!/usr/bin/perl
# Revision 1 - 09-03-09 0055
# Initial Build
# Chmod 750 of rcp, wget, lynx, links, elinks, scp, nc, ftp, ssh, telnet, curl
#
# Revision 2 - 09-03-09 0113
# If else statements are in place, they can handle if the file does or does not exist
 
print ("Permissions lol...\n");
$filename = '/usr/bin/wget';
if (-e $filename) {
print "Found $filename\n";
system ("chmod 750 -v '/usr/bin/wget'");
}
else
{ print "File $filename, not found\n";
}
$filename = '/usr/bin/curl';
if (-e $filename) {
print "Found $filename\n";
system ("chmod 750 -v '/usr/bin/curl'");
}
else
{ print "File $filename, not found\n";
}
$filename = '/usr/bin/rcp';
if (-e $filename) {
print "Founds $filename\n";
system ('chmod 750 -v /usr/bin/rcp');
}
else
{ print "File $filename, not found\n";
}
$filename = '/usr/bin/lynx';
if (-e $filename) {
print "Found $filename\n";
system ('chmod 750 -v /usr/bin/lynx');
}
else
{ print "File $filename, not found\n";
}
$filename = '/usr/bin/elinks';
if (-e $filename) {
print "Found $filename\n";
system ('chmod 750 -v /usr/bin/elinks');
}
else
{ print "File $filename, not found\n";
}
$filename = '/usr/bin/scp';
if (-e $filename) {
print "Found $filename\n";
system ('chmod 750 -v /usr/bin/scp');
}
else
{ print "File $filename, not found\n";
}
$filename = '/usr/bin/nc';
if (-e $filename) {
print "Found $filename\n";
system ('chmod 750 -v /usr/bin/nc');
}
else
{ print "File $filename, not found\n";
}
$filename = '/usr/bin/ftp';
if (-e $filename) {
print "Found $filename\n";
system ('chmod 750 -v /usr/bin/ftp');
}
else
{ print "File $filename, not found\n";
}
$filename = '/usr/bin/telnet';
if (-e $filename) {
print "Found $filename\n";
system ('chmod 750 -v /usr/bin/telnet');
}
else
{ print "File $filename, not found\n";

}
print “Permissions set to 750 across the board.\n”

And now the last revision of the night, colors.

#!/usr/bin/perl
# Revision 1 - 09-03-09 0055
# Initial Build
# Chmod 750 of rcp, wget, lynx, links, elinks, scp, nc, ftp, ssh, telnet, curl
#
# Revision 2 - 09-03-09 0113
# If else statements are in place, they can handle if the file does or does not exist
#
# Revision 3 - 09-03-09 0124
# Colors?
 
use Term::ANSIColor qw(:constants);
$Term::ANSIColor::AUTORESET = 1; #reset colors after each line, otherwise everything will be green and red
 
print ("Permissions lol...\n");
$filename = '/usr/bin/wget';
if (-e $filename) {
print GREEN "Found $filename\n";
system ("chmod 750 -v '/usr/bin/wget'");
}
else
{
print RED "File $filename, not found\n";
}
$filename = '/usr/bin/curl';
if (-e $filename) {
print GREEN "Found $filename\n";
system ("chmod 750 -v '/usr/bin/curl'");
}
else
{ print RED "File $filename, not found\n";
}
$filename = '/usr/bin/rcp';
if (-e $filename) {
print GREEN "Found $filename\n";
system ('chmod 750 -v /usr/bin/rcp');
}
else
{ print RED "File $filename, not found\n";
}
$filename = '/usr/bin/lynx';
if (-e $filename) {
print GREEN "Found $filename\n";
system ('chmod 750 -v /usr/bin/lynx');
}
else
{
print RED "File $filename, not found\n";
}
$filename = '/usr/bin/elinks';
if (-e $filename) {
print GREEN "Found $filename\n";
system ('chmod 750 -v /usr/bin/elinks');
}
else
{ print RED "File $filename, not found\n";
}
$filename = '/usr/bin/scp';
if (-e $filename) {
print GREEN "Found $filename\n";
system ('chmod 750 -v /usr/bin/scp');
}
else
{ print RED "File $filename, not found\n";
}
$filename = '/usr/bin/nc';
if (-e $filename) {
print GREEN "Found $filename\n";
system ('chmod 750 -v /usr/bin/nc');
}
else
{ print RED "File $filename, not found\n";
}
$filename = '/usr/bin/ftp';
if (-e $filename) {
print GREEN "Found $filename\n";
system ('chmod 750 -v /usr/bin/ftp');
}
else
{ print RED "File $filename, not found\n";
}
$filename = '/usr/bin/telnet';
if (-e $filename) {
print GREEN "Found $filename\n";
system ('chmod 750 -v /usr/bin/telnet');
}
else
{ print RED "File $filename, not found\n";
}
print "Permissions set to 750 across the board.\n"

Additional reading:
http://perl.about.com/od/programmingperl/qt/perlexists.htm
http://perl.active-venture.com/lib/Term/ANSIColor.html
http://www.linuxforums.org/forum/linux-programming-scripting/116383-how-can-i-use-wget-perl.html

VMWare Tutorial – CentOS 4.7

VMWare Tutorial – CentOS 4.7

So, you want to run linux on your PC, but you don’t want to repartition your drive, much less replace windows just yet? Well this may be the right solution for you. I do realise there are tutorials for this online, however this is what I did every step of the way, so lets follow;

This article assumes you have basic PC knowledge, and have already downloaded and installed VMWare or already purchased it. And you have some common sense on when to click “next”.

Please refer to http://www.vmware.com for a copy of VMWare, and http://www.centos.org/ for a copy of CentOS. For the exact copy look at: http://mirrors.kernel.org/centos/4.7/isos/i386/ in particular the server iso.

Firsr things first, lets fire up VMWare. Once that’s done click on “New Virtual Machine” or simply press CTRL+N.

Next, a window will come up, click next and then Make sure the following options are checked, under Virtual Machine Configuration, “Typical”, and click next.

After that it will prompt you to select a “Guest operating system”, choose “Linux”, and under Version, select “Other Linux 2.6.x kernel”.

Here you get to name your virtual machine (this is changeable later on should you name it something you don’t like for now), under Virtual Machine name, pick something fancy or you can go along with “Salomon’s Tutorial”, if you wish to change the location for disk space reasons, you have DeepFreeze installed, or whatever reason it may be, click on Browse, and move it to a more desiarable location.

Network type, I assume you’d want your virtual machine to have some sort of network access, if you are using a home network 99% of the time, I would suggest leaving it under “Use bridged networking”.

Step 6 in our tutorial is where you get to pick how much space you want your virtual machine to have, here the sky is the limit as long as you have the disk space, I usually set it somewhere between 4.0 and 8.0 GB (gigabytes), that is enough 99% of the time for a sandbox that you want to play with.

A window showing “Virtual Machine created successfully” will come up, go ahead and click close on it.

Under the left sidebar make sure you have selected your virtual machine, chances are if you are following this tutorial you will only have one. Once having done so, under devices, double click CD-ROM. A window will pop up, look for USO ISO image, and browse, and find the CD Image of CentOS that you downloaded, once you have found it click ok.

Next step, since you probably want your Virtual Machine to have enough resources to play with everything, I usually set mine to have 512 MB or ram, instead of just 256, don’t get me wrong 256 will get you by, however, if you have the available resources put it to use. (Personally I have 3.25 GB of RAM windows is reading, and half the time I never exceed 1.5 GB of usage, why not put another 512+ MB to good use?).

Once you have all that set, you should have something that looks like the picture below under your devices. Go ahead and click “start this virtual machine”.

You may or may not get a window that comes up prompting you that you have no floppy drive set up, if it so happens to come up, go ahead and click on “no”.

Once it boots up you will see the CentOS logo with some of the install options, just press “enter”.

Next its going to prompt you that it found the CD and ask if you would like to test the CD media before the installation process, it never hurts to test it, however, we are going to skip that step today.

In the next part of the installer you get to pick the language to use during the install process, I have selected english, obviously if english isnt your first language or your forte, feel free to select a different one accordingly.

Now you get to choose the appropriate keyboard for the system, 99% of the time, it will find the right one, however its always good to double check, in my case I’m using a US English one.

Since this article is meant to be basic, we are going to let CentOS Automatically partition the drive. Don’t panic, windows is not going to disappear! Theres a reason they call these virtual machines. Go ahead and click next. You will get a window prompting you that the partition table is unreadable… would you like to initialize this drive, erasing ALL DATA? Click yes.

In this step make sure “Remove all partitions on this system” is checked and click next.

At the next step click yes.

Step 21, go ahead and click next again.

Network configuration, 99% of the time, if your at a home network, you will not need to change this as most routers have DHCP and can assign you an IP automatically, however should you be aware of something different, or you want to assign it an IP address you can do that here. Once done, click next.

Step 23 is rather important, here you will want to enable the firewall, check “Remote Login (SSH)” checked, and leave SELinux active. Basically what this does, is it enables you to use putty or a similar program to log into your box and administer it, when you have a server at a datacenter you will have to use putty, or a similar program. Once done, click next.

Here you get to set the default langauge for the system.

Step 25 is where you get to set the time for your virtual machine. I choose America/Los_Angeles because it’s the one closest to me. Once you have found the one that best suits you, click next.

Root password, I can emphisize how important it is that people use secure passwords. I know you may not have the best memory, but try to remember at least 2-3 different 10 character passwords with letters and numbers. Look here http://www.pctools.com/guides/password/ for password generation. Once you have entered a password click next. DO NOT forget your password.

Step 27, custom packages and other software, for the scope of this tutorial I will leave this one alone. We will go with the default for now, don’t panic though, its pretty easy should you need compilers. This is another one where your just going to click next.

Again another screen where you will click next, basically this one is telling you where the install log is at should you wish to review it after the installation.

Now for the fun part, on my pc it took just under 5 minutes to install from the ISO.

After your done it will prompt you to reboot, go ahead and click “reboot”.

Once it boots up yo u have successfully installed CentOS.

Should you have any questions, notice that I omited something, please post a comment and I will do my best to assist you.

September 1st Positions

Well with the market fluxuating a little bit, I decided to buy up a couple shares of CIT, lets see how it goes

B: CIT  @ 1.51

Other than that, all my positions remain the same.

CIT Group Inc.  (Public, NYSE:CIT) Was down 15.52% today, and up After Hours: 1.48 +0.01 (0.68%).

Positions as of 8-31

Well, despite the market being down I still managed to make some decent calls as far as the market.

S: MESA @ $0.2506
S: HTDS @ $0.012
S: FAZ @ $23.40

My only loser that I sold today was FAZ. Lets see how the rest of the day plays.

Skype + Firefox Lag Issues

A few of my friends reported Firefox running a bit laggy, most of them had recently installed Skype. It seems the Skype addon for firefox is causing a bit of lag / trouble, while I’m not a developer and cant really say for sure its a memory leak, or what causes it, I do have a fix.

Im running:

Windows XP SP 2
Firefox Version 3.5.2
Skype 4.1.0.141

I have 3.25 GB of RAM (that Windows is reading), Q6600 Processor, so there really is no reason why running just firefox should lag up this much, or with a moderate amount of tabs (none using flash) open be eating up 1+ GB of RAM.

In short, I simply went to Tools > Add-Ons, and uninstalled the Skype add-on for firefox. Restart firefox, and now with 15 tabs open on 2 windows, I’m back to 181 MB of RAM being used. While this may not be the ideal solution to everyone, this did help restore what I’d consider a normal browsing experience with considerably less lag. If you continue to have issues please feel free to post a comment, and I’ll do my best to work one on one with you to resolve the issue.