Sometimes you need to add a new array on HP Servers on running system (you can't boot SmartStart DVD to run Array Configuration Utility). In that situation you need to configure the array with command line utility called hpacucli.
- Mac OS X - keyboard shortcuts on startup
- How to edit commited subversion logs?
- How to resolve "Cannot mount ext4 filesystem" problem?
- Best ways to find Linux CPU information. How to get Linux processor info?
- Release of Cyrus IMAPd 2.4.9beta2
- 3 commonly used ways to find Ubuntu version that you have
- Mac memory test.How to test your Mac OS X RAM?
- How to - problems with nfs daemon - nfssvc: Function not implemented?
- What to do after ORA-01658: unable to create INITIAL extent for segment in tablespace string?
- SPFile, PFile - What is used by your running Oracle's instance?
- web promotion commented on Mac OS X - keyboard shortcuts on startup
- macbook commented on Mac memory test.How to test your Mac OS X RAM?
- xxxx commented on Gentoo - install Ruby 1.9.2 - resolve problems with ruby_targets_ruby19
- Henny commented on How to edit commited subversion logs?
- Jonnie commented on How to add odd_or_even automatically in the for loop
Here you have quick installation guide for mongodb on Ubuntu 10.04: Edit:
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" >> /etc/apt/sources.list apt-get update apt-get install mongodb-10gen
Remember that Debian-like systems and default package configuration aren't often security aware so you should edit mongodb config:
and add line:
This will disable default setting to run mongodb in trusted mode
This short tutorial will help you install Ubuntu on XenServer. This requires that the XenServer and the guest network have access to the Internet (we use network install - not CD/DVD)
You can check the long mode processor flag:
grep lm /proc/cpuinfo
flags : fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nonstop_tsc aperfmperf pni pclmulqdq est ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm ida arat
If you have lm flag (like above) your CPU is at 100% 64 bit
Often you need to get files listing from some directory in your administrative tasks/scripts. It's really simple to list directories within Ruby code. I prefer to use Dir class. You can use it as shown below:
files = Dir.glob("*")
Returns all files from the current directory as an Array. You can iterate over every element very easy and use it for custom action.
That's all for today. Thanks
Lastly I faced problems with installing Ruby 1.9 on Gentoo distros. First I unmasked Ruby 1.9.2 version. I use for that autounmask tool:
# autounmask =/dev-lang/ruby-1.9.2
But after that I received error on rdoc installation:
# emerge ruby emerge: there are no ebuilds to satisfy ">=dev-ruby/rdoc-2.5.11[ruby_targets_ruby19]". (dependency required by "dev-lang/ruby-1.9.2" [ebuild]) (dependency required by "ruby" [argument])
How to resolve that problem and install Ruby 1.9?
Instead of resizing swap partition you can create a swap file. Example:
(Create (almost) 1GB file filled with zeros)
dd if=/dev/zero of=/tmp/swap_file bs=1000 count=1000000
("Format" file as swap)
Now you can use free or top to verify that available swap space really increased. Of course the trick above works only until reboot - if you want it to persist, just add (on your Gentoo) server swapon /tmp/swap_file to /etc/conf.d/local.start.
Starting named daemon in debug mode can cause problems with huge size of named.run file. By default named save debug information to /var/named/named.run file. You can stop writing to it by disabling debug mode. Check that your named runs without debug option:
ps ax|grep named named -d 3 -c /etc/named-master.conf
If -d flag exists try to restart named without it and check again
ps ax|grep named named -c /etc/named-master.conf
And that's all.
Due to data migration I'm adding here Derek's comment:
A safer way to do this is the following:
1. delete named.run (can be in /var/named, /var/cache/bind, etc, depending on the flavor of Linux).
2. "rndc notrace" to disable debug in bind
3. "rndc reload" to reopen file handles.
If you're running bind in production, killing it is not usually an option.
There are minimu two ways. First - by using defined? method:
if defined? my_var puts "exists" else puts "doesn't exist" end
defined? method returns type of variable if variable exists and nil otherwise. Second way is by initializing variable which you want to check ...
my_var = nil if my_var.nil? #logic goes here else #otherwise end
There are many ways to create a tar archive that would allow to limit the file size and break up automatically into incremental archives. If you want to do it with tar you should follow this short instruction.
Recreate archive from chunks:
tar -cvp '2011_03_13/' | split -d -b 4000m - archive.tar.bz2.
cat archive.tar.bz2.0* |tar -xpvf -
I've found two cases in which you need to do tar this way: - you don't have space on your machine - you don't trust the machine operator or you want to store backups on other machine What to do then?
tar with bzip2 compression
tar zcvf - /my_data | ssh email@example.com "cat > /backup/my_data.tar.gz"
tar jcvf - /my_data | ssh firstname.lastname@example.org "cat > /backup/my_data.tar.gz"