disable presto / drpms from fedora

March 30, 2014, 2:18 pm CDT

presto / drpms speeds up yum updates for some users by allowing yum to download partial .rpm files and recreating them on the local system. If you have a fast internet connection and a slow machine, this causes yum update to go slower. On my 50/50 FIOS connection, it might take 1 minutes to download the updates but take 30 minutes to build the local rpms. if I disable presto / drpms, then I download the full set of rpms in 10 minutes ( vs 1 min ) but I don't have to spend 30 minutes making local rpms.

to disable presto / drpms on newer versions of fedora, add

deltarpm=0

in your /etc/yum.conf file.

older versions of Fedora  ( or Centos  distros ) can use the command:

yum erase yum-presto

to remove the presto package from the system.

jack

linux-tips

watch dvds backups on your local network

September 29, 2012, 10:26 am CDT

I have a 138" projector and AV Surround Sound connected up to my linux box ( and my wdlive tv device ). I don't like to deal with swapping dvds when I watch them and the easiest way to watch dvds on my setup is with my wdlive tv device. So... for most DVDs that I own/watch, I can do something like:

#!/bin/sh # make_dvd_archive.sh # # useage: # insert DVD into DVD drive ( /dev/sr0 on my box ) # make_dvd_archive.sh some-name # mkdir -p tmpdvd dvdbackup -v -M -i /dev/sr0 -o tmpdvd/ mkisofs -dvd-video -udf -o /opt/ISOS/newstuff/$1.iso tmpdvd/$1/ eject
make_dvd_archive.sh dexter_s1_d1 ... which will create an .iso image in my iso save directory. I can then point my wdlive tv box or vlc ( video lan client ) at my .iso image and play on my projector. If dvdbackup does not work on the dvd ( too much copy protection ) then I have to resort to a windows machine with a copy of dvdfab hd decrypter but once I have the .iso image copied to my iso direcotory... I am back in business.

linux-tips

public access to private web servers - (nginx proxy)

September 29, 2012, 9:37 am CDT

Many times in today's networking environments, web servers are located in network places where the public normally can't access or on servers who's addresses might change from time to time. When you find yourself in this situation, nginx comes to the rescue. For example, this web server is located at my home office behind my FIOS firewall. I have a dynamic IP Address that changes every so often and in order to 1) deal with firewall / security issues ) and 2) not have to deal with a dynamic IP address, I could just run this on a remote system, and not worry about my FIOS Firewall or my dynamic ip address, but I like running things on my own systems and remote hosting stuff only when needed. For this system, I run a micro image on amazon's EC2 cloud that hosts my nginx server. All web request pointed to this server get proxied to my home server over my 50/50 FIOS connection. I can have .htaccess type IP Address checks on protected directories.

linux-tips

using rsync for intelligent file transfers

August 10, 2010, 2:18 am CDT

rsync is one of my favorite utilities. I use it on a daily basis. Say that you have a file ( test.csv ) that is 15240 bytes in size. You need to copy it to a remote location... The command: rsync -rav sites.csv apache:/tmp/test.csv does the trick. Here is the output.. notice the sent bytes message. sending incremental file list sites.csv sent 15338 bytes received 31 bytes 30738.00 bytes/sec total size is 15240 speedup is 0.99 .... now the file is on the remote location. ..... now here is the really good part.... say that you add 3-5 lines to the file and now it is 16060 bytes in size.... if you transfer it to the remote system.. how many bytes will need to be sent? Lets see... we'll runt the same rsync command: rsync -rav sites.csv apache:/tmp/test.csv but now look at the bytes sent... sending incremental file list sites.csv sent 850 bytes received 163 bytes 675.33 bytes/sec total size is 16060 speedup is 15.85 ... rsync only sent 850 byes... not 16060... it detected the changed part of the file and only sent the changes needed to sync up the two files. It does this with text or binary files... it only sends the changed bytes ( plus some overhead so that it knows where to make the edits on the remote file ) when you do a file transfer. It can take lines out of the middle of a file, top of a file, random bytes in a file... It is a fantastic little tool.

linux-tips

remove leading directory from a tarball when untaring...

August 9, 2010, 5:21 am CDT

Say you have a tar file like: wordpress-3.0.1.tar.gz and you want to untar it to /var/www/htdocs/vhost/example.com but you don't want the leading wordpress/ directoy in the path. You can either

  • untar and move
  1. mkdir -p /var/www/htdocs/vhost/example.com
  2. tar -C /var/www/htdocs/vhost/example.com -xvf /usr/local/src/src/wordpress-3.0.1.tar.gz
  3. mv wordpress/* .
  4. mv wordpress/.htaccess .
  5. rmdir wordpress
  • untar
  1. mkdir -p /var/www/htdocs/vhost/example.com
  2. tar --strip-components=1 -C /var/www/htdocs/vhost/example.com -xvf /usr/local/src/src/wordpress-3.0.1.tar.gz

linux-tips

Mounting Disks using their UUID

August 6, 2010, 4:49 pm CDT

I've had issues in the past booting linux or auto-mounting drives when they change from something like /dev/sda1 to /dev/sdb2 because of hardware issues or changes. USB Drives move around a lot.... Newer versions of Linux let you mount drives using their UUIDs (Universally Unique IDentifier). To get a list of UUIDs on your system do /bin/ls -lrt /dev/disk/by-uuid/ and you'll get something like: total 0 lrwxrwxrwx 1 root root 10 Aug 6 17:19 d2bace2b-c215-4aec-9516-c0a5ff638555 -> ../../sdd2 lrwxrwxrwx 1 root root 10 Aug 6 17:19 3cdca329-8b78-45bc-b4cb-20f4d12cd41e -> ../../sdd1 lrwxrwxrwx 1 root root 10 Aug 6 17:19 1d24c260-5298-4cd8-876c-a1820f56acc7 -> ../../sdb3 lrwxrwxrwx 1 root root 10 Aug 6 17:19 e868251c-2eb2-48c8-86b9-f0c7955708d4 -> ../../sdb6 lrwxrwxrwx 1 root root 10 Aug 6 17:19 876f85b8-5e0e-4bfe-885c-1137d5550711 -> ../../sdb1 lrwxrwxrwx 1 root root 10 Aug 6 17:19 d493c57b-2083-4f3a-a85a-d197b326965b -> ../../sdb2 lrwxrwxrwx 1 root root 10 Aug 6 17:19 9716af4a-60d8-4848-94d4-65092f7a7ab6 -> ../../sda3 lrwxrwxrwx 1 root root 10 Aug 6 17:19 c426832d-e7ad-4b7e-9a0e-e64b0e39bc84 -> ../../sda2 lrwxrwxrwx 1 root root 10 Aug 6 17:19 7d5a249a-2f43-49e1-945c-3cb217982210 -> ../../sda1 ... now... for your boot loader, you can use something like: kernel /vmlinuz-2.6.33.6-147.fc13.i686 ro root=UUID=c426832d-e7ad-4b7e-9a0e-e64b0e39bc84 .... options.... instead of kernel /vmlinuz-2.6.33.6-147.fc13.i686 ro root=/dev/sda2 .... options.... in an auto.mounter file, you'd use something like: local_video1 -fstype=xfs :UUID=3cdca329-8b78-45bc-b4cb-20f4d12cd41e instead of local_video1 -fstype=xfs :/dev/sdc1

linux-tips