After creating a new partition (/dev/hda5) with fdisk run the below commands:
# partprobe
# pvcreate /dev/hda5
# vgcreate vg0 /dev/hda5
# lvcreate -L 1G -n lv0 vg0
# mke2fs -j /dev/vg0/lv0
TipsheetTips and tricks... Creating LVM partitions.Submitted by sandip on Fri, 03/23/2007 - 10:34After creating a new partition (/dev/hda5) with fdisk run the below commands: # partprobe »
Extending LVMSubmitted by sandip on Fri, 03/23/2007 - 09:19Extend partition by 1Gb. # lvresize -L +1G /dev/vg00/lvol0 Notes:
need to unmount volume prior to doing resize2fs. Restoring corrupt rpm databaseSubmitted by sandip on Fri, 03/23/2007 - 08:09If you have a corrupt rpm database, simply delete the db files and rebuild it again. # rm -rf /var/lib/rpm/*db.* Serving files from a folder outside the web root with mod_rewriteSubmitted by sandip on Thu, 01/25/2007 - 15:29I was serving static content within a drupal installation, which became a huge nightmare when doing upgrades. So, I decided, I should just create a symbolic link to a folder outside the installation and route the traffic via mod_rewrite rules. I first created a folder called "/var/www/site_files" and then symlinked to it from "/var/www/html/site_files". This way, I just have to recreate one single symbolic link after doing the upgrades. With the below rules, I was able to maintain the links to the existing pages. ## BEGIN: site_files ## »
New Server CentOS 4.4 at LT Grid with ISPConfig InstalledSubmitted by sandip on Tue, 01/23/2007 - 23:52These are notes, I had taken down while setting up ISPConfig Hosting Control Panel on LayeredTechs Grid. Most of the steps were referenced via howtoforge and ispconfig installation notes. There were some gotchas to look out for and has bee noted below: Search Engine Friendly RedirectsSubmitted by sandip on Mon, 01/15/2007 - 01:06301 redirect is the most efficient and Search Engine friendly method for webpage redirection. If you have to change file names or move pages around, it's the safest option and preserves your search engine rankings. The code "301" is interpreted as "moved permanently". With php: <? With mod_rewrite: RewriteEngine on »
Block IP addresses from accessing your site via .htaccessSubmitted by sandip on Sun, 01/14/2007 - 00:47There are couple ways to block an IP, the one general way is to use htaccess deny feature. SetEnvIf REMOTE_ADDR "^xxx.xxx.xxx.xxx$" badip »
Extract individual files from an RPMSubmitted by sandip on Mon, 01/01/2007 - 17:39To extract an individual file from an rpm package without installing the rpm:
$ rpm2cpio <package_name> | cpio -t Use rpm2cpio to extract a file. Run this command from /tmp or elsewhere in order to avoid overwriting any current system files. This creates the full path in the current directory and extracts the file specified. $ rpm2cpio <package_name> | cpio -iv --make-directories <full-file-path> To extract everything to the current directory: $ rpm2cpio <package_name> | cpio -ivd »
extracting initrd.img file on Fedora Core 6Submitted by sandip on Sat, 11/25/2006 - 02:22initrd in Fedora Core 6 is a gzipped cpio archive which can be extracted using: $ cd /tmp »
Firefox2.0 Tips...Submitted by sandip on Mon, 11/06/2006 - 09:07This is going to consist of tips on Firefox2.0 usage. If you have any good tips please leave it in the comments. Hide Go ButtonType in "about:config" in the address bar, then do a search for "hideGoButton" and toggle the value to "true". »
|
User loginRecent blog posts
Who's onlineThere are currently 0 users and 4 guests online.
|