Who says procrastination can make a person dull?
Showing posts with label Computers and Gadgets. Show all posts
Showing posts with label Computers and Gadgets. Show all posts

Setting Up Apt-Mirror to Download Ubuntu Repositories and Create Local Repositories for Use in a Local Network

Yeah, I'm getting my Ubuntu geek on now.

(Methinks I like the meerkat/timon better. But I'm partial to mammals. I loove the karmic koala the best! But i'm digressing..)

On to the tutorial-slash-note-to-myself:


Open Terminal, type:

sudo apt-get update
(this I think updates packages already installed on the system)

Type:
sudo apt-get install apt-mirror
(downloads and installs the apt-mirror package)

Type:
sudo apt-get install apache2
(downlaods and installs the apache2 package you need to serve as local server)

Type:
sudo nano /etc/apt/mirror.list

This opens the mirror.list file in a text editor called Nano right in the Terminal console. You can edit the mirror.list according to your needs. Note: You will need to uncomment (remove the #) on the lines you are going to edit, otherwise nothing will happen.

I've set up mine as the ff:

############# config ##################
#
set base_path    /MYDIR
set mirror_path  $base_path/mirror
set skel_path    $base_path/skel
set var_path     $base_path/var
set cleanscript $var_path/clean.sh
set defaultarch  i386
set postmirror_script $var_path/postmirror.sh
set run_postmirror 0
set nthreads     20
set _tilde 0
#set limit_rate 2.5k
#
############# end config ##############

deb http://archive.ubuntu.com/ubuntu natty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu natty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu natty-updates main restricted universe multiverse
deb http://archive.canonical.com/ubuntu natty partner
deb http://extras.ubuntu.com/ubuntu natty main
#deb http://archive.ubuntu.com/ubuntu natty-proposed main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu natty-backports main restricted universe multiverse

clean http://archive.ubuntu.com/ubuntu
clean http://archive.canonical.com
clean http://extras.ubuntu.com

NOTE:
 mirror://mirrors.ubuntu.com/mirrors.txt ---> use this to identify closest mirror

Some parameters:

    base_path: The place where are the downloaded packages go. NOTE: make sure you have write permissions to this directory
    mirror_path,skel_path,var_path,cleanscript,postmirror_script,run_postmirror,_tilde: Better leave them as they are.
    defaultarch: When you specify "deb <deb-url>" it'll fetch the URL of this type, or you can explicitly specify which architecture packages to pick up by specifying it as "deb-i386 <deb-url>"
    nthreads: The number of threads of wget that have to be launched for fetching the mirror contents
    limit_rate: This variable can be set to limit the download rate of the wget but this is per thread. So it boils down to (20 Threads)*2.5KBps = 50 KBps (Notice the 'B' it's for bytes).
    I just picked up the deb URL's from my file "/etc/apt/sources.list".
    I skipped the "deb-src" url's because I wouldn't be needing the sources and it'll just eat up my space. It all depends on the need of  the mirror if you need 'em just include them in the package.
    deb-urls: These are of the form "deb http://archive.ubuntu.com/ubuntu maverick-updates main restricted universe multiverse". Replace maverick with the codename that you want to mirror, maverick is the codename for Ubuntu 10.10. You can find out which version you are using by the command "lsb_release -a". If you just need the codename use "lsb_release -c". You can mirror any number of archives.

After souping up the mirror.list file, type:

^X

You will be prompted to save the file, click Yes, and further prompted where to save the new file, just hit [Enter] to overwrite the existing file.

If you've changed the base directory, type:

Having changed the base_directory, I need to create some directories under /spare like so:

sudo mkdir /MYDIR/mirror
sudo mkdir /MYDIR/skel
sudo mkdir /MYDIR/var

You're ready to mirror! Type

sudo apt-mirror & /etc/apt/mirror.list

Note the "&" is so that I can run apt-mirror detached from the terminal.

Be ready to devote time - hours, or even several days, depending on your internet connection. In case you want to stop it and restart it from there the is no problem as it continues from there. So you can just run it when no one is using the connection.

If you're done - congratulations! You're halfway through. To clean up unwanted files, open Terminal and Type:
sudo /var/spool/apt-mirror/var/clean.sh

If you want all your packages to be updated everyday you will need to edit the cron file of the apt-mirror package:

gksudo gedit /etc/cron.d/apt-mirror
*or* sudo nano /etc/cron.d/apt-mirror

just uncomment the # from the last line and it will be updated every day at 4:00 AM you can edit and also change the timing and interval.

Useful sources:

http://www.danbishop.org/2011/03/11/create-your-own-local-mirror-of-the-ubuntu-repositories/
http://www.developerstation.org/2011/05/creating-local-ubuntu-mirror-using-apt.html
http://www.ajatus.in/2011/02/set-up-your-own-ubuntu-repository-using-apt-mirror/
http://nwlinux.com/configure-an-ubuntu-repo-mirror/
https://apps.education.ucsb.edu/wiki/Set_up_apt-mirror

Learning a New Language via Firefox

The internet can be a lot of things to a lot of people. But have you ever tried learning a new language just by surfing through sites from all over the world? Apparently you can. By using language learning plugins in the Firefox web browser, you can go to any site in any language and have it instantly translated for you. Not all plugins are perfect though, so you'll find some that simply suck at translation. Here's a list of the five best learning language Firefox plugins to date.

Setting Up Gmail On Your Symbian 60 Phone

How do you configure your Symbian 60 phone to receive and send your Gmail messages? Here's a 20-step guide:
  1. Enable IMAP in your Gmail settings.
  2. Select 'Messaging' > 'Options' > 'Settings' > 'E-mail' > 'Mailboxes.'
  3. If you have never set up email on your phone before, select 'Yes' to define a new mailbox. If you already have other mailboxes, select 'Options' and then 'New mailbox.'
  4. Select 'Start' to begin the setup wizard.
  5. Select 'IMAP4' and then 'Next.'
  6. Enter your full email address (including '@gmail.com') as the email address and select 'Next.' Google Apps users, enter your full address in the format 'username@your_domain.com.'
  7. Enter 'imap.gmail.com' as the incoming mail server and select 'Next.'
  8. Enter 'smtp.gmail.com' as the outgoing mail server and select 'Next.'
  9. Select the appropriate access point and then 'Next.'
  10. Enter a descriptive name for the email account mailbox name.
  11. Once your mailbox is set up, select it from the email mailbox settings screen.
  12. Select 'Connection settings' > 'Incoming e-mail.'
  13. Enter your address (including '@gmail.com' or '@your_domain.com') and password.
  14. Select 'SSL/TLS' for your security (ports) and define your port as '993.'
  15. Select 'Back.'
  16. Select 'Outgoing e-mail.'
  17. Enter your email address (including '@gmail.com' or '@your_domain.com') and password.
  18. Select 'StartTLS' for your security (ports) and define your port as '587.'
  19. Select 'Back' and change any other settings according to your preferences.
  20. Check our recommended client settings, and adjust your client's settings as needed.
You can read more about it here. (I'm posting it here for future reference, in case I need to reset my phone again :p)

How to Boost Your Cell Phone Signal - Quick and Easy


I used to live in an apartment where the cell phone signal was just horrible. I missed a lot of calls, didn't get important texts, and had to go out to the other side of the street to get a signal. It got to the point where some friends thought that I was ignoring their texts on purpose. The problem got solved when a more tech-savvy (okay, and yeah, rich) neighbor got a repeater for their unit - and voila! signal problem fixed. Not everyone has the same luck though, so here's something you might want to try:

5 Quick Ways to Boost Cellphone Signal Reception

No, I'm not in any way related or connected to the person who wrote this piece. I just found it really really useful and worth blog-bookmarking (yeah that's what I'm doing right now) in case I'll need it later :-)

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Powered by Blogger