Ramblings from MostlyChris

Tech stuff and a bit more

Browsing Posts published on April 19, 2009

I recently ran across a request to place all vhost configurations in separate files. Here are the steps I followed to make this happen. Step 4 is only necessary if you have existing virtual hosts in the main or a single apache configuration file. 1. I created the virtual_sites directory under /etc/httpd/conf.d/ 2. I set [...]

Here is a handy little snippet for deleting all the tables in a database. Replace 'uname' and 'dbname' as required. mysql -u uname dbname -e "show tables" | grep -v Tables_in | grep -v "+"  | gawk '{print "drop table " $1 ";"}' | mysql -u uname dbname

If your .FRM file gets hosed up, you'll need to repair it or your database(s) will be worthless. You'll still need to make sure you make regular backups of your databases so you can use them to rebuild the .FRM file. 1. Get last good backup of database (assumes the backup is an .sql formatted [...]

Launch `hpacucli’, the RAID interface and run the following: controller slot=0 pd show all All drives will be shown — it’s obvious which ones are not configured as a logical disk. controller slot=0 create type=ld drives=2:2 We’ve only added one drive, and the controller is smart enough to know that making a logical disk out [...]

If configured, you can access the RAID controllers in a Dell server or an HP server by browsing to the IP address of the server and using the ports listed. Dell Servers (OpenManage) https://ip.ad.dr.es:1311 HP Servers https://ip.ad.dr.es:2381 Notice they are both https.