Archive

Archive for the ‘UNIX’ Category

How to: Mount an ISO image under Linux

May 15th, 2010 cw No comments

Procedure to mount ISO images under Linux
1) You must login as a root user
2) Create the directory i.e. mount point:
# mkdir -p /mnt/temp_disk1
3) Use mount command to mount iso file called disk1.iso with loop option:
# mount -o loop disk1.iso /mnt/temp_disk1

Now you should be able to access all the files on that ISO image. Please note, you have to provide full path to iso image, not just iso image alone.

Categories: Linux Tags: , ,

virtual server on my rhel 5 not starting

July 25th, 2009 cw No comments

Sometime ago installed my RedHat 5 with xen. Then I needed to create a virtual server running RedHat 4 in it, all needed to be 64 bit because Opsware required 64 bit RHEL AS4, so had to come up with an inexpensive solution. Got Intel Quad from Dell for $400 with 8gb ram, inexpensive desktop, installed RedHat 5 on it, then created xen virtual server in it running RedHat AS 4 for Opsware, of course opsware is not supported under XEN as a virtual server and it would not run under RedHat 5, so I had to hack it a bit to get it working, actually to get it installed is quite simple. Anyway so I had my RedHat AS4 vm running then I did notice that my desktop running all of that rebooted the other day, but my opsware virtual server did not start. With XEN I am not that familiar so I had issues starting it with command line, so I was ending up bringing xdisplay back to my pc remotely just to start it up. Well what it turned out that I don’t have to do this anymore. I was playing around with starting it up and why, I can do it automatically.

Anyway solution to start it up was very simple, on my RedHat 5 hyperviser I had to go to /etc/xen directory, there is directory called auto, and there is a config file for my virtual server called opsware (name of that virtual server) so to get it automatically started I needed to create a symbolic link inside that auto directory that pointed to that opsware config file.

Read more…

Freshly installed RedHat – Root logins are not allowed

May 4th, 2009 cw No comments

Just installed Red Hat AS4 and I am unable to login with root account. Passwd is all set but I am getting popup message saying “Root logins are not allowed”, simple solution is to press CTRL+ALT+F1 and switch to console login and you will be on your way :) Nice and simple.

Categories: Linux Tags: , ,

Solaris 10 U7 released :)

May 4th, 2009 cw No comments

So Sun, ups, I think I should say Oracle released Solaris 10 U7. Here are the few things what I did find whats new:

 

Read more…

Categories: 10, Solaris Tags: , ,

ipcalc – perform simple manipulation of IP addresses

May 2nd, 2009 cw No comments

This utility is so cool, how many times I did try to figure out netmasks, broadcasts etc, this utility actualy performs simple manipulation of IP addresses:

ipcalc – provides a simple way to calculate IP information for a host.  The various options specify what information ipcalc should display on standard out. Multiple options may be specified.  An IP address to operate on must  always be specified.  Most operations also require a netmask or a CIDR prefix as well.

Read more…

Oracle buy Sun

April 19th, 2009 cw No comments

I knew something was cooking, when IBM announcement was made SUN’s stock jumped like a rocket, then when deal was off, at least from talk perspective stock did retreat, but please don’t tell me people did not know somehow that something else is cooking, how come stock did not go down to previous levels or lower as it usually does after such situation? Well inside traders knew something that others (such as myself) had no idea, I could only speculate something was out in the air as stock only did drop to over $6. So now another announcement is made and look at this. Stock went back to over $9. Interesting, I hate those inside traders, those people who makes millions or even billions by just having access to the right information that others don’t.

SANTA CLARA, Calif., April 20, 2009 — Sun Microsystems (NASDAQ: JAVA) and Oracle Corporation (NASDAQ: ORCL) announced today they have entered into a definitive agreement under which Oracle will acquire Sun common stock for $9.50 per share in cash. The transaction is valued at approximately $7.4 billion, or $5.6 billion net of Sun’s cash and debt.

Read more…

Categories: SUN Tags: ,

when trying to remove directory I get the following error: cannot determine if this is an ancestor of the current working directory events

April 17th, 2009 cw No comments

I have solaris 10 and I have test user, I have then direcotry created as events, when I do rm -r events I get the following error:
rm: cannot determine if this is an ancestor of the current working directory events
rm -rf does not even show me anything but directory is not being removed

One of the solutions that I’ve found in my case was to change user to root even though the owner of the diretories or files is test, of try the following comand:
find . -depth -exec rmdir {} \;

Categories: 10, Solaris Tags: , ,

Reinstalling the Boot Loader on Linux Red Hat server

April 16th, 2009 cw No comments

I had server that rebooted and then was hanging at the GRUB line and was not booting, so I did decide to reinstall grub which seems like it did help. Here is the procedure that I did to get it boot again:

Reinstalling the Boot Loader
In many cases, the GRUB boot loader can mistakenly be deleted, corrupted, or replaced by other operating systems.
The following steps detail the process on how GRUB is reinstalled on the master boot record:
* Boot the system from an installation boot medium (CDROM or DVD)
* Type linux rescue at the installation boot prompt to enter the rescue environment.
* Type chroot /mnt/sysimage to mount the root partition.
* Type /sbin/grub-install /dev/sda to reinstall the GRUB boot loader, where /dev/sda is the boot partition.
* Review the /boot/grub/grub.conf file, as additional entries may be needed for GRUB to control additional operating systems.
* Reboot the system.

Read more…

Categories: Linux Tags: , ,

How to optimize mysql database

April 10th, 2009 cw No comments

Recently I did run into issue where I just needed to optimize my database. Have few of them in mysql and then each of those databases have all bunch of tables. Now, I can issue:
mysql -u root -ppassword -e ‘show databases’
this will display list of all my databases, then I can connect to each individual database and issue the following sql statement:
OPTIMIZE TABLE tbl_name;
But this is quite manual process. Easier way is to just use mysqlcheck utility on the whole database rather than each individual tables.
mysqlcheck -o dspam -u root -ppassword
The mysqlcheck program can also be used to check (-c/-m/-C), repair (-r) and analyze (-a) the tables in a database. These commands can be done by using the CHECK, REPAIR and ANALYZE MySQL commands.

So anyway I did put this into some script and can easily execute it on every database that I have in my mysql
-=-=-=- END OF SCRIPT -=-=-=-
#!/usr/bin/ksh
STAMP=`date +%y%m%d.%H%M%S`
HOSTNAME=`/usr/bin/uname -n`
REMOTEHOSTNAME=”localhost”

Read more…

Categories: mysql Tags: , ,

Massive Sun cuts planned as IBM focuses on software

April 6th, 2009 cw No comments

Massive Sun cuts planned as IBM focuses on software trio

IBM staffers have, according to a Reg source close to the parties, been talking to Sun about its software portfolio and – unsurprisingly – they don’t like what they’ve found: It’s not making any money.

Read more…

Categories: SUN, Solaris Tags: ,
Powered by Yahoo! Answers