07 July, 2011

Use the Debian Squeeze DVD/pendrive as a package repository

The Debian Squeeze DVD contains many application level packages which are not installed during the base operating system installation. Only core packages are installed during the basic Debian Operating system installation. For example the DVD is loaded with the graphical display managers such as Gnome, KDE and XFCE, but during the installation you can select only one among them.  There are a lot more stuff in the dvd, such as vlc media player, phpmyadmin, mysql etc. Here I am sharing how i used these Debian squeeze DVD as a repository to install those packages.

Adding the dvd to the repository
                 --------------------------------------------------

Take the terminal and type the following

$ sudo apt-cdrom add



This will add your DVD to the repositories list. 


For those who are using the pendrive as the installation media, pendrive should be mounted on the /media/cdrom directory. This can be done in two steps.


#1. Plug in the USB pendrive, then the new block device will be added under the /dev directory. We have to find this block device location for mounting and using the device. Use the following command to detect the block device's filename (selected in the image).
$ sudo fdisk -l


#2. Mount the block device into /media/cdrom.  

$ sudo mount  /dev/sdb1  /media/cdrom/


#3. Add the cdrom to the software repository list, as described earlier in the  case of the DVD.

$ sudo apt-cdrom add


Installing Packages
-------------------------------------
Now install the packages using the apt package manager. Check the sample below :- 
$ sudo apt-get install vlc

Thatz up...This trick will work for Ubuntu also...
Read rest of entry

05 October, 2010

apt package manager : options & tricks

APT package manager in Debian systems can be used to download and install packages from online repositories. The APT commands (apt-get, apt-cache, and so on) can be used to install packages locally. However, it’s normally used for working with online software.

sudo apt-get update
Consults /etc/apt/sources.list and updates the database of available packages. Be sure to run this command whenever sources.list is changed.

apt-cache search <keyword>
Case-insensitive search of the package database for the keyword given. The package names and descriptions are returned where that keyword is found.

sudo apt-get install <package>

Download and install the given package name as found in the package database.

sudo apt-get -d install <package>
Download the package only, placing it in /var/cache/apt/archives.

apt-cache show <package>

Display information about the software from the named package.

sudo apt-get upgrade


Check updates for all installed packages and then prompt to download and install them.

sudo apt-get dist-upgrade

Updates the entire system to a new release, even if it means removing packages. (Are you on nuts to do this?)

sudo apt-get autoclean

Can be run anytime to delete partially downloaded packages, or packages no longer installed.

sudo apt-get clean


Removes all cached packages from /var/cache/apt/archives to free up disk space.

sudo apt-get --purge remove <package>

Remove the named package and all its configuration files. Remove the --purge keyword to keep config files.

sudo apt-get -f install

Do a sanity check for broken packages. This tries to fix any “unmet dependency” messages.

apt-config -V


Print version information of installed APT utilities.

sudo apt-key list


List gpg keys that APT knows about. 

apt-cache stats 

Print statistics on all packages installed.

apt-cache depends


Print dependencies for a package (whether it’s installed or not). 

apt-cache pkgnames 

List all packages installed on the system.
Read rest of entry

dpkg package manager options

The dpkg utility works at a layer lower than the APT utilities do. APT uses dpkg behind the scenes to manage software on your Ubuntu system. APT and dpkg work similar to the way yum and rpm do on Red Hat–based Linux distributions. Usually, APT will have enough functionality to get you through just about anything, but there are times when dpkg will be needed, such as finding out which package is associated with a given file on your system. Following are some of the common dpkg command options and parameters.


dpkg -c <.deb file> 
Lists files which are installed by the .deb file given (.deb file must be path/filename).

dpkg –I <.deb file> 
Lists information about the .deb given file.


dpkg –p <package> 
Lists information about the package.


dkpg –S <filename> 
Lists the packages where the given file name is found. This can be a path, or just the name of a file.

dpkg –l 
Lists installed packages. This will also take options for more specific info.
dpkg -L <package> 
Lists all the files which have been installed from package (package must have been previously installed).


dpkg –s <package> 
Lists the status of the given package. 

sudo dpkg –i <.deb file>  
Installs the given .deb file.


sudo dpkg –r <package> 
Removes the given package from the system, but leaves files behind.


sudo dpkg –P <package> 
Removes package and config files of given package.

sudo dpkg -x <.deb file> <directory>  
Extracts the files contained in the .deb file to a destination directory. This will reset permissions on the target directory.


Read rest of entry

27 April, 2010

Quick tips : Ubuntu / Linux

The simplest way to install the packages
 If you feels the package installation as a head ache in Ubuntu Linux, just try http://www.appnr.com . It has a wide categorized collection of packages with short description, what you need is only a mouse to begin installation.


Separate /home partition when you install Linux
 
Try to make separate partition for the /home when you install linux, and show this partion as the home for any linux that you install later in your system. It has the advantage that if you have more linux with same home then you can share files easily in spite of difference in operating system. Also you can avoid losing your data during an OS crash.


Read rest of entry

26 April, 2010

Make your keyboard blinking to represent network traffic using tleds in Ubuntu

tleds is debian based appliation that is used to indicate the netwotk traffic using your keyboard LEDs. As you know the led lights in the keyboard for indicating scroll lock, numlock have no other purpose other than just glowing to indicate this features are active. These remain off during most of the time.

So let's use these LED's to indicate the network traffic of your system. You can make them blinking when you send/recieve packets into network or internet.
This can be done by just downloading a small package called tleds.

Installing tleds


Take the terminal and type in as follows

    sudo apt-get install tleds

configuring

You have to show,  for which connection these LEDs should blink. You will issue the command ifconfig in the terminal to see the name of active connection. The commandline is
   
        sudo tleds wlan0   -- represents the wireless connection

        sudo tleds ppp0     -- represents the point to point connection (eth0,    
                                                                                 mobile broadband )

also you can issue command below for further control

        sudo tleds ppp0 -d 100
100 represents the delay between the blinking in microseconds. This delay represents the blinking speed. You can also issue command like this.  Here the default delay 200ms will be used.

That's all. Take your browser and search for something... See the lights in your keyboard blinking..
   
       
Read rest of entry

Internet access and package installation behind a proxy server in Ubuntu

When there is a proxy server in between your system and server you have to specify the proxy address in all the applications that is intended to access internet such as firefox, bittorrent... Proxy servers are mainly deployed for subnets, for example a network inside a college is connected to internet using a proxy server (not technically, since there are gateways,routers...) to sensor and restrict the students internet activities, protect from unauthorized access... 

If you have to run any application behind a proxy server, you have to specify the proxy server address and the port number to the application that need access the internet. This is because the default port numbers used by the transport  layer protocols are changed by the proxy server. Squid is one among the important proxy programs that is prefered by network administrators. In the following cases please replace the proxy address and port number with the corresponding feilds applicable to you.

Setting Proxy address in Mozilla  firefox

Click on edit --> Preferences.

Select the Network tab under the advanced tab. Click on the Settings button. In the Network settings window select the manual configuration. Then enter the HTTP proxy and port on the current window. Save the settings...When you start browsing the firefox will automatically ask for authentication. Then you have to specify the username and password in the proxy server. 






Setting Proxy in Synaptic package manager


If you are using synaptic package manager as the package installer, You have to do some configuration before using apt package manager.
Click on the Settings --> Preferences
Choose the network tab and select manual proxy configuration. Set HTTP proxy and FTP proxy. Then enter their port numbers also. Click on the authentication button to set username and password.




Setting proxy for APT package manager
APT is a command line utility for installing packages. Probably many people are addicted to terminal do the following . . .

If you have no authentication for the proxy server then use the following command line. 

export http_proxy=http://192.168.0.2:3128
export ftp_proxy=http://192.168.0.2:3128


If you have username and password the use

export http_proxy=http://username:password@192.168.0.2:3128/
export ftp_proxy=http://username:password@192.168.0.2:3128/
Read rest of entry
 

Terminal Diary | techblog Copyright © 2009 Gadget Blog is Designed by jintu jacob Powered by Blogger