Categories
Computer Hardware Hard Drives

Windows 7 – Windows cannot be installed to this disk

I was trying to install windows on my new ASRock H81M-ITX motherboard and for some reason loading windows 7 pro 64bit to my OCZ agility 2 I got this error message:

Windows cannot be installed to this disk. This computer’s hardware may not support booting to this disk. Ensure that the disk’s controller is enabled in the computer’s BIOS menu.

BIOS saw 60GB SSD, the windows installer tool saw and let me format 60GB SSD, so if you are in my shoes and sounds similar, what I did to fix it was go to BIOS, enable SMART, DISABLE EXTERNAL (this seemed to do it), and enable HOT PLUG (not sure if needed, but I did enable).

Hope that helps!

Categories
nagios

Could not open external command file for reading via open(): (13) -> Permission denied in nagios v4.01

I ended up getting this in my nagios.log, the fix was to change the permissions on the rw file!

chmod 777 /usr/local/nagios/var/rw/nagios.cmd

Categories
nagios

Directory index forbidden by Options directive: /var/www/html/

I was receiving this error in my nagios apache log:

Directory index forbidden by Options directive: /var/www/html/

to fix this, I just did touch index.html to /var/www/html It creates a file in the directory that is empty. I found this safer then turning on indexes for my nagios install.

Categories
cPanel linux

How to delete all mail in queue for cPanel exim

I ran into an issue where a user was spamming and queue up thousands of email in our cPanel server. To clear it out, I did this:

/etc/init.d/exim stop

exim -bpru | awk {'print $3'} | xargs exim -Mrm

or

exim -bpru|grep frozen|awk {'print $3'}|xargs exim -Mrm

/etc/init.d/exim start

I had about 120k emails in queue and it took about 20 seconds to remove them all. If you want to fine tune it, you can have exim delete only specific emails in queue:

grep -lr 'a certain string' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm

Credit to: http://bradthemad.org/tech/notes/exim_cheatsheet.php
 

To delete frozen emails from a specific email address:

exiqgrep -i -f luser@example.tld | xargs exim -Mrm

If you just want to delete mail queue directories, sometimes faster delete:

/var/spool/exim/input and the /var/spool/exim/msglog directories

Categories
Linux

internal server error with CSF (Config Server Firewall) in cPanel after upgrade in cPanel

So I was receiving this error after cPanel upgraded:

Internal Server Error

500

No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_csf.cgi): subprocess exited with status 2

 

This did not fix it:

 

/usr/sbin/csf -x
/scripts/perlinstaller --force URI
/usr/sbin/csf -e
/usr/sbin/csf -u


If that doesn’t work this will:

 

curl -s configserver.com/free/csupdate | perl

 

 

Categories
Linux

How to move files that are older then x days in linux

I found this useful:
sudo find ./* -mtime +2 -exec mv {} /hosting/dropbox/ops/user/client/ \;
breakdown…
./* is the current directory, including all files, but you could use full path.
mtime +2 is 2 days old
mv is the command being executed
and after the brackets is the directory the files are moving to
Categories
Computer Hardware Hard Drives

Can Dell PE860 (power edge 860) run 3TB drives on the motherboard SATA?

I found out the answer is yes! I have hooked up 2 3TB drives into the onboard SATA and was able to successfully raid 1 them within Ubuntu 12.10. I was not able to do this with the Perc raid controller, as it only saw 2.2TB.

Categories
Software

Microsoft Office 2013 PRO ISO/IMG Direct Downloads

I needed these for a retail key I received from my employer for $10, so these were useful, as I did not want to install the cheap software they had to go and download the IMG.

64bit:

http://care.dlservice.microsoft.com/dl/download/2/9/C/29CC45EF-4CDA-4710-9FB3-1489786570A1/OfficeProfessionalPlus_x64_en-us.img 

32bit:

http://care.dlservice.microsoft.com/dl/download/6/6/2/662A612F-B3E9-4A94-9396-C92F656BA100/ProjectProfessional_x86_en-us.img

Categories
cPanel linux

Fatal error: Allowed memory size of 134217728 bytes exhausted – MySQL error – PHPMyAdmin

I had a client trying to import a 200M zip file to phpmyadmin to import into his MySQL database, he kept receiving this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 201380904 bytes) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/zip_extension.lib.php on line 65

It ends up that phpmyadmin is using its own php.ini config, and defaults the memory size to 128M.

Edit the file : /usr/local/cpanel/3rdparty/etc/php.ini.dist

there is a line that says memory_limit, change that to what you’d like. I changed mine to 264M.

You will want to restart cPanel as well:

/etc/init.d/cpanel restart

You will lose this setting upon reboot, so if you want to keep it, you will want to run this:

echo "/usr/local/cpanel/3rdparty/etc/php.ini.dist" >> /etc/cpanelsync.exclude

This will exclude the file when it goes to sync/update with cPanel.

Categories
Computer Hardware Hard Drives

Samsung 830 256GB in raid 0 with Z77 chipset and TRIM

Got my new drives, two Samsung 830 256GB I then dropped them into an intel ROM raid 0 with Intel RST 11.6 drivers and I get some pretty great looking benchmarks AND TRIM! These were running on my Asus P8Z77-I DELUXE ITX motherboard.

[zp src=”AS-SAMSUNGRAID0.png” album=”vivi/” width=”600″]

The benchmarks speak for themselves. If anyone would like me to run some other tests, let me know.

This is the test PC build by the way : El Linko