http://www.aware. co.in/
Bangalore. We specialize in building and managing Ubuntu/Debian Linux servers and provide good dependable system administration. We install and maintain in-house corporate servers. We also provide dedicated and shared hosting as well as reliable wireless/hybrid networking
http://www.compumaniac.com/
Compumaniac, founded and headed by technocrats, having more than 10 years of experience in respective IT fields, is a consulting firm focusing on the development and implementation of open source strategies for medium and large-sized businesses.
http://www.ehorizon-tech.com/
Chennai. We provide GNU/Linux services such as installation configuration and support services for desktop and server installations. We provide both call and contract based GNU/Linux services. We also provide turnkey GNU/Linux software solutions.
http://www.ibservices.in/
We are helping customers to migrate from windows to GNU/LINUX,UBUNTU. Thin client solutions based on EDUBUNTU in educational institutes.New Laptops and Desktops preinstalled with UBUNTU.
http://www.linuxcertified.com
LinuxCertified is a Open-Source expertise house. We are a leading provider of Linux laptops, services and training. LinuxCertified brings its deep expertise in Linux and open source software to provide significant cost-savings for our customers. LinuxCertified sells pre-installed Ubuntu laptops and servers.
http://www.mahiti. org
Bangalore. We provide end-to end support on Ubuntu including Media sale, Training, Migration planning, deployment, support.
http://tcpip.in/
We provide Linux Solutions For Fast Growing Business
http://www.egovservices.org/
is a fast growing Open-Source government IT service provider in India and is currently running a USD 10 m public-private partnership project in IT with Government of Jharkhand. We run all our resources on Ubuntu.
http://www.taashee.com/
Andhra Pradesh. Taashee Technologies have a dedicated team of certified Linux engineers and developers to handle projects ranging from simple Linux Desktops to complex Servers.
http://www.xseedtec hnologies.com
X-Seed Technologies is a leading Global Technology Services Company providing Software Development and Testing, Sales and Marketing, Technical Support and Infrastructure Management Services.
http://www.yukthi.com
Bangalore, Karnataka. We have been providing FOSS/Linux solutions for over 6 years with many innovative projects to our credit. Our focus is the IT infrastructure space. Based in Bangalore, we have executed projects in many parts of India and the world (US, UK, Finland) too! Also visit www.captain- mail.com
http://www.diqtech.com/
We are a IT Consulting and Services company providing solutions on Ubuntu Servers and platforms. Solutions include Mail Servers, Web Servers, Intranets, CRM, ERP.
see:- http://webapps.ubuntu.com/ marketplace/ asia/ for more details
Monday, September 29, 2008
Saturday, September 27, 2008
kermit in ubuntu
danjmw
as many who have posted for help I'm new to Ubuntun, and I'm loving it. However, I am finding little things missing, little things I've come to depend on when running Fedora Core. at the moment, I'm finding myself scrabbling for a replacement of kermit. What I need is a terminal emulator that will allow me to establish serial connections to other devices, specifically Cisco routers, switches, firewalls. anyone have any suggestions? if kermit's available for Ubuntu/Debian I'd be more then glad to return to it.
shakin
ckermit (multiverse) and gkermit (universe) are both in the repositories.
Edit: If you don't know how, here's how to add those repositories: http://ubuntuguide.org/#extrarepositories
-------------------------------------------------------------------------------------
kermit> connect
SETLINE /dev/ttys0
kermit> connect
kermit> SET CARRIER_WATCH OFF
kermit> connect
references:- http://ubuntuforums.org/showthread.php?t=250461
as many who have posted for help I'm new to Ubuntun, and I'm loving it. However, I am finding little things missing, little things I've come to depend on when running Fedora Core. at the moment, I'm finding myself scrabbling for a replacement of kermit. What I need is a terminal emulator that will allow me to establish serial connections to other devices, specifically Cisco routers, switches, firewalls. anyone have any suggestions? if kermit's available for Ubuntu/Debian I'd be more then glad to return to it.
shakin
ckermit (multiverse) and gkermit (universe) are both in the repositories.
Edit: If you don't know how, here's how to add those repositories: http://ubuntuguide.org/#extrarepositories
-------------------------------------------------------------------------------------
kermit> connect
SETLINE /dev/ttys0
kermit> connect
kermit> SET CARRIER_WATCH OFF
kermit> connect
references:- http://ubuntuforums.org/showthread.php?t=250461
Tuesday, September 23, 2008
Ubuntu Hyperterminal
Fri, 06/22/2007 - 11:30pm — str
I was kinda surprise that HyperTerminal is not available anymore in Windows Vista. No problem, I rebooted my notebook to Ubuntu and fire-up minicom.
1. By default, minicom is not installed in Ubuntu, so you need to install it first.
sudo apt-get install minicom
2. Find the name of your Serial Port
dmesg | grep tty
In the output look for something like "tty". The output in my case is like this:
$ dmesg | grep tty
[ 17.341823] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 17.342454] 00:0b: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
This means the device correspond to my serial port is ttyS0.
3. Configure minicom
sudo minicom -s
* Use the keyboard keys to select the menu item Serial port setup.
* Enter A to change the Serial Device to /dev/ttyS0, and then enter E to change the line speed to 9600 8N1
* Using arrow keys, select Save setup as dfl
4. Select Exit from Minicom.
5. Next time, from the terminal you only need to run sudo minicom in order to access your Cisco box.
I was kinda surprise that HyperTerminal is not available anymore in Windows Vista. No problem, I rebooted my notebook to Ubuntu and fire-up minicom.
1. By default, minicom is not installed in Ubuntu, so you need to install it first.
sudo apt-get install minicom
2. Find the name of your Serial Port
dmesg | grep tty
In the output look for something like "tty". The output in my case is like this:
$ dmesg | grep tty
[ 17.341823] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 17.342454] 00:0b: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
This means the device correspond to my serial port is ttyS0.
3. Configure minicom
sudo minicom -s
* Use the keyboard keys to select the menu item Serial port setup.
* Enter A to change the Serial Device to /dev/ttyS0, and then enter E to change the line speed to 9600 8N1
* Using arrow keys, select Save setup as dfl
4. Select Exit from Minicom.
5. Next time, from the terminal you only need to run sudo minicom in order to access your Cisco box.
WHAT HARDWARE WORKS under ubuntu?
The question of what hardware works under Ubuntu is one that’s not easily answered. However, you can
take a look at http://wiki.ubuntu.com/HardwareSupport to see if your hardware is listed. This
is an informal list created by the Ubuntu community, and it’s not comprehensive (which is to say that there may be hardware that works fine that isn’t mentioned). Nor is the list guaranteed to be 100% accurate.But it’s certainly worth a look.
A search engine like Google is your best friend if the Ubuntu hardware list doesn’t help. Simply
search for the brand and model of your hardware and add “Ubuntu” to the search string. This should
return results, usually from the Ubuntu forums (http://ubuntuforums.org) or blogs, written by
those who have found a way to make that type of hardware work.
https://wiki.ubuntu.com/HardwareSupport
Ubuntu-specific hardwarecompatibility information.
http://www.linuxcompatible.org/compatibility.html
Numerous com-patibility lists, arranged by distribution.
http://www.linuxprinting.org
A great spot for reading up on printer compatibility issues.
http://www.linmodems.org
Find out if your modem is supported.
http://www.sane-project.org
Check to see if your scanner is Linux compatible, and look for fixes if it isn’t.
http://www.linux-laptop.net
Have laptop, want Linux? Check it out here.
http://www.tuxmobil.org
Info for using Linux with anything that isn’t stuck to your desk (laptops, PDAs, phones, etc.).
take a look at http://wiki.ubuntu.com/HardwareSupport to see if your hardware is listed. This
is an informal list created by the Ubuntu community, and it’s not comprehensive (which is to say that there may be hardware that works fine that isn’t mentioned). Nor is the list guaranteed to be 100% accurate.But it’s certainly worth a look.
A search engine like Google is your best friend if the Ubuntu hardware list doesn’t help. Simply
search for the brand and model of your hardware and add “Ubuntu” to the search string. This should
return results, usually from the Ubuntu forums (http://ubuntuforums.org) or blogs, written by
those who have found a way to make that type of hardware work.
https://wiki.ubuntu.com/HardwareSupport
Ubuntu-specific hardwarecompatibility information.
http://www.linuxcompatible.org/compatibility.html
Numerous com-patibility lists, arranged by distribution.
http://www.linuxprinting.org
A great spot for reading up on printer compatibility issues.
http://www.linmodems.org
Find out if your modem is supported.
http://www.sane-project.org
Check to see if your scanner is Linux compatible, and look for fixes if it isn’t.
http://www.linux-laptop.net
Have laptop, want Linux? Check it out here.
http://www.tuxmobil.org
Info for using Linux with anything that isn’t stuck to your desk (laptops, PDAs, phones, etc.).
compiz keys?
i am lost.. i searched the web and this forum. is there somewhere a reference for all the things you can do with compiz and the corresponding keys to push to get the effects?
https://help.ubuntu.com/community/CompositeManager/ConfiguringCompiz
send derek
A really nice graphical tool for you to use is called gnome-compiz-manager. It will show up as GL Desktop under your System->Preferences list when installed with:
sudo apt-get install gnome-compiz-manager
Scale Effect (Shift+Alt+Up)
The scale effect is like the OS X "All Windows" Exposé feature that is invoked with F9. It shrinks all the windows down to fit on your desktop so you can see a thumbnail of everything running to find the window you want. This feature is most useful when you have lots of windows open. The more windows you have open, the smaller each thumbnail gets. It also puts the application icon down in the corner for you to help with identification of applications. You can use your mouse to select the window you want or while still holding down Shift+Alt you can use the arrow keys to move to the window you want.
Ring Switcher (Super+Tab)
The ring switcher is another feature for switching between windows. With this plugin all your windows are shrunk and rotated as if on a rod. The windows farther away are smaller and the window you are switching to is front and center. The window title is also displayed. Although not as useful as the scale effect for selecting a window, it is another good way to scroll through all your open windows and switch applications. Maybe you like the way this one looks better too. It is more like the traditional Alt+Tab but allows you to see all of the windows available at once.
Enhanced Zoom Desktop (Super+Mouse Scroll Up/Down)
Zoom can be a really handy feature. If you run your system at a really high resolution, sometimes you need to be able to take a closer look at something. I've found this feature very useful when watching videos that I can't resize or when using a CRT that just isn't very sharp. It also provides a universal way to zoom so instead of having to know how to zoom in different applications, you can always use this.
Expo (Super+E)
Expo is a feature that makes switching between workspaces (a feature Windows is sorely lacking) a lot easier. It will spread out all your workspaces in a row (with some nice reflection) to allow you to see what is running on all of them at once and then switch to the one you need. Since I've used Linux more I have started to rely on multiple workspaces. I usually have one just for my IM client, one for my personal web browsing, one for work web browsing, one for my media player, one for document editing, etc.. With Expo, seeing what is where is a lot easier and getting there is faster.
Rotate Cube Mousewheel on Desktop
Switcher2 Alt + Tab
Scale Windows Alt + Shift + Up Arrow
Show/Clear Desktop Ctrl + Alt + D (toggle)
Zoom In/Out Super + Mousewheel
Transparent Window Alt + Mousewheel
Widget Layer F9 (toggle)
Screenshot Super + Left Mouse Button
move window alt + f7
https://help.ubuntu.com/community/CompositeManager/ConfiguringCompiz
send derek
A really nice graphical tool for you to use is called gnome-compiz-manager. It will show up as GL Desktop under your System->Preferences list when installed with:
sudo apt-get install gnome-compiz-manager
Scale Effect (Shift+Alt+Up)
The scale effect is like the OS X "All Windows" Exposé feature that is invoked with F9. It shrinks all the windows down to fit on your desktop so you can see a thumbnail of everything running to find the window you want. This feature is most useful when you have lots of windows open. The more windows you have open, the smaller each thumbnail gets. It also puts the application icon down in the corner for you to help with identification of applications. You can use your mouse to select the window you want or while still holding down Shift+Alt you can use the arrow keys to move to the window you want.
Ring Switcher (Super+Tab)
The ring switcher is another feature for switching between windows. With this plugin all your windows are shrunk and rotated as if on a rod. The windows farther away are smaller and the window you are switching to is front and center. The window title is also displayed. Although not as useful as the scale effect for selecting a window, it is another good way to scroll through all your open windows and switch applications. Maybe you like the way this one looks better too. It is more like the traditional Alt+Tab but allows you to see all of the windows available at once.
Enhanced Zoom Desktop (Super+Mouse Scroll Up/Down)
Zoom can be a really handy feature. If you run your system at a really high resolution, sometimes you need to be able to take a closer look at something. I've found this feature very useful when watching videos that I can't resize or when using a CRT that just isn't very sharp. It also provides a universal way to zoom so instead of having to know how to zoom in different applications, you can always use this.
Expo (Super+E)
Expo is a feature that makes switching between workspaces (a feature Windows is sorely lacking) a lot easier. It will spread out all your workspaces in a row (with some nice reflection) to allow you to see what is running on all of them at once and then switch to the one you need. Since I've used Linux more I have started to rely on multiple workspaces. I usually have one just for my IM client, one for my personal web browsing, one for work web browsing, one for my media player, one for document editing, etc.. With Expo, seeing what is where is a lot easier and getting there is faster.
Rotate Cube Mousewheel on Desktop
Switcher2 Alt + Tab
Scale Windows Alt + Shift + Up Arrow
Show/Clear Desktop Ctrl + Alt + D (toggle)
Zoom In/Out Super + Mousewheel
Transparent Window Alt + Mousewheel
Widget Layer F9 (toggle)
Screenshot Super + Left Mouse Button
move window alt + f7
Installing 3D Drivers and Activating Desktop Visual Effects(ubuntu)
The modern trend is for operating systems to incorporate flashy graphical effects into ordinary desktop functions. For example, when windows are minimized in Windows Vista, they physically shrink and fade down to the taskbar.
Under Mac OS X, program windows appear to be “poured” into the Dock when minimized. In Windows Vista, when you press Alt+Tab to switch through open programs, the program windows are previewed
vertically in a graphical arrangement, and you can flick through them, rather like searching
through a card index. These effects are achieved using the 3D processing power of the computer’s graphics card, even though the effects aren’t necessarily 3D in nature.
■Note On a technical level, the technique is known as compositing. What you see on the screen is first drawn in the graphics card memory and then transferred to the screen, rather than everything simply being drawn directly onto the screen.
Ubuntu includes similar desktop visual effects, courtesy of a system called Compiz Fusion (www.compiz-fusion.org). However, all desktop visual effect systems have a couple requirements, and these apply to Ubuntu as well:
• For desktop effects to work, your graphics card (or motherboard graphics chipset)
must be comparatively recent. Examples include the ATI Radeon, nVidia GeForce,
and Intel GMA product lines. Most graphics cards manufactured within the last two
or three years with a graphics processing unit (GPU) should be adequate, and very
recent models definitely will work.
• The correct graphics drivers must be installed. Some of Ubuntu’s built-in graphics
drivers lack the necessary 3D functionality to support desktop effects. Currently,
Intel GMA and some ATI Radeon graphics cards are supported by default because Intel
and ATI provide open-source 3D-capable drivers. For other hardware, including
nVidia cards, you will need to manually install a proprietary driver, which is not
difficult to do.
■Note You only need to install the proprietary driver if you wish to utilize desktop visual effects. Ubuntu includes a default 2D graphics driver that provides excellent functionality for everyday desktop use.
Some proprietary 3D graphics drivers are provided under Ubuntu, but only if open-source equivalents are missing. It is hoped that open-source drivers will one day replace the need for proprietary drivers.
So do you actually need to install new drivers? If you find that desktop effects are working,
then the correct drivers are already installed. A good way to test this is to hold down Ctrl+Alt
and then tap the left or right arrow key. This will switch to the next virtual desktop. If the
entire desktop physically slides out of the way, then desktop effects are activated. If the
desktop remains static and a small dialog box appears in the center of the screen to let you
choose a virtual desktop, then desktop effects are not activated.
A utility called Hardware Drivers lets you manage proprietary drivers for your graphics card. This should appear in the notification area automatically immediately after installation if your hardware requires proprietary drivers.
Follow these instructions to activate the proprietary graphics driver:
1. Click the Hardware Drivers icon to run the Hardware Drivers program. If it’s not
visible, click System ➤ Administration ➤ Hardware Drivers.
2. Supply your password in the authorization dialog box and click OK.
3. In the Hardware Drivers window, check the Enabled box beside your graphics card
device driver.
4. A dialog box appears, asking you to confirm that you want to enable the driver. It
explains that enabling the driver enables visual effects on your desktop. Click the
Enable button.
5. The Summary dialog box appears to tell you what new software will be installed.
Click the Apply button.
6. The driver will be downloaded and installed. Then the Changes Applied dialog box
will appear to tell you that the changes are completed. Click the Close button.
7. In the Hardware Drivers window, click the Close button.
8. You need to restart the computer so that Ubuntu will use the new driver. Select
System ➤ Quit, and then click Restart.
Once the new graphics driver is installed, desktop visual effects should start working immediately. If you experience seemingly random system-wide crashes or freezing after installing a 3D graphics driver, consider reverting to your old setup by using the Hardware Drivers program
(System ➤ Administration ➤ Hardware Drivers) to disable the new driver.Unfortunately, in a small minority of cases, the proprietary driver can prove buggy.
■Tip On one of our test PCs, containing an nVidia GeForce 6600 graphics card, the Hardware Drivers program didn’t install the new driver as it should. This is probably a bug that might be fixed by the time you read this, but we got around it by manually installing the driver. The procedure is to open the Synaptic Package Manager (System ➤ Administration ➤ Synaptic Package Manager), search for the nvidia-glx-new package, and mark it for installation. Then reboot. When the system is up and running again, start Hard-ware Drivers, and once again put a check in the box alongside the graphics driver. If there’s already a check there, remove it and put it in again. Upon a second reboot, desktop visual effects should become operational.
Two modes of operation are available for desktop visual effects: Normal and Extra.Normal is the default and provides a good subset of the available effects: menus fade into view, program windows shrink when minimized, and so on. Extra provides a lot more effects, some of them rather extreme, such as wobbling when you click and move a window, and windows appearing to explode to the corners of the screen when maximized. To switch between the two settings, right-click the desktop, select Change Desktop Background,and then click the Visual Effects tab in the dialog box that appears.
Under Mac OS X, program windows appear to be “poured” into the Dock when minimized. In Windows Vista, when you press Alt+Tab to switch through open programs, the program windows are previewed
vertically in a graphical arrangement, and you can flick through them, rather like searching
through a card index. These effects are achieved using the 3D processing power of the computer’s graphics card, even though the effects aren’t necessarily 3D in nature.
■Note On a technical level, the technique is known as compositing. What you see on the screen is first drawn in the graphics card memory and then transferred to the screen, rather than everything simply being drawn directly onto the screen.
Ubuntu includes similar desktop visual effects, courtesy of a system called Compiz Fusion (www.compiz-fusion.org). However, all desktop visual effect systems have a couple requirements, and these apply to Ubuntu as well:
• For desktop effects to work, your graphics card (or motherboard graphics chipset)
must be comparatively recent. Examples include the ATI Radeon, nVidia GeForce,
and Intel GMA product lines. Most graphics cards manufactured within the last two
or three years with a graphics processing unit (GPU) should be adequate, and very
recent models definitely will work.
• The correct graphics drivers must be installed. Some of Ubuntu’s built-in graphics
drivers lack the necessary 3D functionality to support desktop effects. Currently,
Intel GMA and some ATI Radeon graphics cards are supported by default because Intel
and ATI provide open-source 3D-capable drivers. For other hardware, including
nVidia cards, you will need to manually install a proprietary driver, which is not
difficult to do.
■Note You only need to install the proprietary driver if you wish to utilize desktop visual effects. Ubuntu includes a default 2D graphics driver that provides excellent functionality for everyday desktop use.
Some proprietary 3D graphics drivers are provided under Ubuntu, but only if open-source equivalents are missing. It is hoped that open-source drivers will one day replace the need for proprietary drivers.
So do you actually need to install new drivers? If you find that desktop effects are working,
then the correct drivers are already installed. A good way to test this is to hold down Ctrl+Alt
and then tap the left or right arrow key. This will switch to the next virtual desktop. If the
entire desktop physically slides out of the way, then desktop effects are activated. If the
desktop remains static and a small dialog box appears in the center of the screen to let you
choose a virtual desktop, then desktop effects are not activated.
A utility called Hardware Drivers lets you manage proprietary drivers for your graphics card. This should appear in the notification area automatically immediately after installation if your hardware requires proprietary drivers.
Follow these instructions to activate the proprietary graphics driver:
1. Click the Hardware Drivers icon to run the Hardware Drivers program. If it’s not
visible, click System ➤ Administration ➤ Hardware Drivers.
2. Supply your password in the authorization dialog box and click OK.
3. In the Hardware Drivers window, check the Enabled box beside your graphics card
device driver.
4. A dialog box appears, asking you to confirm that you want to enable the driver. It
explains that enabling the driver enables visual effects on your desktop. Click the
Enable button.
5. The Summary dialog box appears to tell you what new software will be installed.
Click the Apply button.
6. The driver will be downloaded and installed. Then the Changes Applied dialog box
will appear to tell you that the changes are completed. Click the Close button.
7. In the Hardware Drivers window, click the Close button.
8. You need to restart the computer so that Ubuntu will use the new driver. Select
System ➤ Quit, and then click Restart.
Once the new graphics driver is installed, desktop visual effects should start working immediately. If you experience seemingly random system-wide crashes or freezing after installing a 3D graphics driver, consider reverting to your old setup by using the Hardware Drivers program
(System ➤ Administration ➤ Hardware Drivers) to disable the new driver.Unfortunately, in a small minority of cases, the proprietary driver can prove buggy.
■Tip On one of our test PCs, containing an nVidia GeForce 6600 graphics card, the Hardware Drivers program didn’t install the new driver as it should. This is probably a bug that might be fixed by the time you read this, but we got around it by manually installing the driver. The procedure is to open the Synaptic Package Manager (System ➤ Administration ➤ Synaptic Package Manager), search for the nvidia-glx-new package, and mark it for installation. Then reboot. When the system is up and running again, start Hard-ware Drivers, and once again put a check in the box alongside the graphics driver. If there’s already a check there, remove it and put it in again. Upon a second reboot, desktop visual effects should become operational.
Two modes of operation are available for desktop visual effects: Normal and Extra.Normal is the default and provides a good subset of the available effects: menus fade into view, program windows shrink when minimized, and so on. Extra provides a lot more effects, some of them rather extreme, such as wobbling when you click and move a window, and windows appearing to explode to the corners of the screen when maximized. To switch between the two settings, right-click the desktop, select Change Desktop Background,and then click the Visual Effects tab in the dialog box that appears.
Thursday, September 18, 2008
Installing Device Manager in Ubuntu
When using Windows, you might have come across Device Manager, the handy tool that lists your PC’s hardware. Ubuntu offers a similar piece of software, as shown in Figure but it isn’t installed by default.

Ubuntu’s Device Manager program can display just about everything you need to know about attached hardware.
After you can connect to the Internet (following the instructions in the “Getting Online” section of this chapter), you can install Device Manager using the Synaptic Package Manager (see the “Installing Software” section of this chapter), as follows:
1. Select System ➤ Administration ➤ Synaptic Package Manager.
2. Click the Search button on the toolbar, and then type gnome-device-manager in the
Search field. Click the Search button.
3. Click the program’s entry in the list of results. Select to mark it for installation (don’t worry if a dialog box appears telling you additional software needs to be installed).
4. Click Apply on the toolbar.
If your computer is not yet online, you’ll need to use a computer that is online (perhaps
another computer, or Windows XP if you dual-boot) to download the software, and then copy it across to your Ubuntu computer for installation. To download the software, visit the following two addresses in your browser. You will be prompted to download a file after typing each address:
http://us.archive.ubuntu.com/ubuntu/pool/universe/g/gnome-device-manager/gnome-device-manager_0.2-1_i386.deb
http://us.archive.ubuntu.com/ubuntu/pool/universe/g/gnome-device-manager/libgnome-device-manager0_0.2-1_i386.deb
After the files are downloaded, copy them to the desktop on your Ubuntu machine,using a floppy disk or maybe a USB memory stick. Then open a command-prompt window on the Ubuntu computer by clicking Applications ➤ Accessories ➤ Terminal. In the terminal window, type the following, hitting Enter after each line:
cd ~/Desktop
sudo dpkg –i libgnome-device-manager0_0.2-1_i386.deb
sudo dpkg –i gnome-device-manager_0.2-1_i386.deb
After you’ve installed Device Manager, you can open it by selecting
Applications ➤System Tools ➤ Device Manager.
You’ll need to click View ➤ Device Properties to ensure Device Manager adds the useful Properties tab.
Ubuntu’s Device Manager program can display just about everything you need to know about attached hardware.
After you can connect to the Internet (following the instructions in the “Getting Online” section of this chapter), you can install Device Manager using the Synaptic Package Manager (see the “Installing Software” section of this chapter), as follows:
1. Select System ➤ Administration ➤ Synaptic Package Manager.
2. Click the Search button on the toolbar, and then type gnome-device-manager in the
Search field. Click the Search button.
3. Click the program’s entry in the list of results. Select to mark it for installation (don’t worry if a dialog box appears telling you additional software needs to be installed).
4. Click Apply on the toolbar.
If your computer is not yet online, you’ll need to use a computer that is online (perhaps
another computer, or Windows XP if you dual-boot) to download the software, and then copy it across to your Ubuntu computer for installation. To download the software, visit the following two addresses in your browser. You will be prompted to download a file after typing each address:
http://us.archive.ubuntu.com/ubuntu/pool/universe/g/gnome-device-manager/gnome-device-manager_0.2-1_i386.deb
http://us.archive.ubuntu.com/ubuntu/pool/universe/g/gnome-device-manager/libgnome-device-manager0_0.2-1_i386.deb
After the files are downloaded, copy them to the desktop on your Ubuntu machine,using a floppy disk or maybe a USB memory stick. Then open a command-prompt window on the Ubuntu computer by clicking Applications ➤ Accessories ➤ Terminal. In the terminal window, type the following, hitting Enter after each line:
cd ~/Desktop
sudo dpkg –i libgnome-device-manager0_0.2-1_i386.deb
sudo dpkg –i gnome-device-manager_0.2-1_i386.deb
After you’ve installed Device Manager, you can open it by selecting
Applications ➤System Tools ➤ Device Manager.
You’ll need to click View ➤ Device Properties to ensure Device Manager adds the useful Properties tab.
Wednesday, September 17, 2008
Help Getting GUI on Ubuntu Server
Since you do not yet have Internet on that computer you can add cd-rom's as repositories and should be able to get the desktop installed by placing the cdrom in the drive and running
Code:sudo apt-cdrom add
If you have Internet access you will enter one of the following commands depending upon the desktop that you prefer you can do it with one simple command:
Gnome Desktop:Code:sudo apt-get install ubuntu-desktop or sudo aptitude install ubuntu-desktop
KDE Desktop: Code:sudo apt-get install kubuntu-desktop or sudo aptitude install kubuntu-desktop
XFCE Desktop:Code:sudo apt-get install xubuntu-desktop or sudo aptitude install xubuntu-desktop
Submitted by Aurora on Mon, 2007-10-22 18:16.
NB:- Warning Untested
Code:sudo apt-cdrom add
If you have Internet access you will enter one of the following commands depending upon the desktop that you prefer you can do it with one simple command:
Gnome Desktop:Code:sudo apt-get install ubuntu-desktop or sudo aptitude install ubuntu-desktop
KDE Desktop: Code:sudo apt-get install kubuntu-desktop or sudo aptitude install kubuntu-desktop
XFCE Desktop:Code:sudo apt-get install xubuntu-desktop or sudo aptitude install xubuntu-desktop
Submitted by Aurora on Mon, 2007-10-22 18:16.
NB:- Warning Untested
Using Windows File Transfer Tools
In many cases, people need to get files from Linux servers using Windows clients.Ifyour client operating system is Windows, you can use one of the following open source tools to get files from Linux servers:
❑ WinSCP (http://winscp.net) — Graphical scp, sftp, and FTP client for
Windows over SSH1 and SSH2 protocols.
❑ FileZilla (http://filezilla.sourceforge.net) — Provides graphical client
FTP and SFTP services in Windows, as well as offering FTP server features.
❑ PSCP (www.chiark.greenend.org.uk/~sgtatham/putty/) — Command line
scp client that is part of the PuTTY suite.
❑ PSFTP (www.chiark.greenend.org.uk/~sgtatham/putty/) — Command line
sftp client that is part of the PuTTY suite.
❑ WinSCP (http://winscp.net) — Graphical scp, sftp, and FTP client for
Windows over SSH1 and SSH2 protocols.
❑ FileZilla (http://filezilla.sourceforge.net) — Provides graphical client
FTP and SFTP services in Windows, as well as offering FTP server features.
❑ PSCP (www.chiark.greenend.org.uk/~sgtatham/putty/) — Command line
scp client that is part of the PuTTY suite.
❑ PSFTP (www.chiark.greenend.org.uk/~sgtatham/putty/) — Command line
sftp client that is part of the PuTTY suite.
Monday, September 15, 2008
Downloading Files with wget
Sometimes you need to download a file from a remote server using the command line. For example, you find a link to an RPM software package, but the link goes through several HTTP redirects that prevent rpm from installing straight from HTTP. Or you may want to script the automated download of a file, such as a log file, every night.The wget command can download files from web servers (HTTP and HTTPS) and FTP servers. With a server that doesn’t require authentication, a wget command can be as simple as the wget command and the location of the download file:
$ wget https://help.ubuntu.com/7.04/common/img/headerlogo.png
If, for example, an FTP server requires a login and password, you can enter that information on
the wget command line in the following forms:
$ wget ftp://user:password@ftp.example.com/path/to/file
$ wget --user=user --password=password ftp://ftp.example.com/path/to/file
For example:
$ wget ftp://chris:mykuulpwd@ftp.linuxtoys.net/home/chris/image.jpg
$ wget –-user=chris –-password=mykuulpwd \
ftp://ftp.linuxtoys.net/home/chris/image.jpg
You can use wget to download a single web page as follows:
$ wget http://www.wiley.com Download only the Web page
If you open the resulting index.html, you’ll have all sorts of broken links. To download all the images and other elements required to render the page properly, use the-p option:
$ wget -p http://www.wiley.com Download Web page and other elements
But if you open the resulting index.html in your browser, chances are you will still have all the broken links even though all the images were downloaded. That’s because the links need to be translated to point to your local files. So instead, do this:
$ wget -pk http://www.wiley.com Download pages and use local file names
And if you’d like wget to keep the original file and also do the translation, type this:
$ wget -pkK http://www.wiley.com Rename to local names, keep original
Sometimes an HTML file you download does not have an.html extension, but ends in .asp or .cgi instead. That may result in your browser not knowing how to open your local copy of the file. You can have wget append .html to those files using the -E option:
$ wget -E http://www.aspexamples.com Append .html to downloaded files
With the wget command, you can recursively mirror an entire web site. While copying files and directories for the entire depth of the server’s file structure, the -m option adds timestamping and keeps FTP directory listings. (Use this with caution, because it can take a lot of time and space.)
$ wget -m http://www.linuxtoys.net
Using some of the options just described, the following command line results in the most usable local copy of a web site:
$ wget -mEkK http://www.linuxtoys.net
If you have ever had a large file download (such as a CD or DVD image file) disconnect before it completed, you may find the -c option to wget to be a lifesaver. Using -c, wget resumes where it left off, continuing an interrupted file download. For example:
$ wget http://example.com/DVD.iso Begin downloading large file
...
95%[========== ] 685,251,583 55K/s Download killed before completion
$ wget -c http://example.com/DVD.iso Resume download where stopped
...
HTTP request sent, awaiting response... 206 Partial Content
Length: 699,389,952 (667), 691,513 (66M) remaining [text/plain]
Because of the continue feature (-c), wget can be particularly useful for those with slow Internet connections who need to download large files. If you have ever had a several-hour download get killed just before it finished, you’ll know what we mean. (Note that if you don’t use the -c when you mean to resume a file download, the file will be saved to a different file: the original name with a .1 appended to it.)
$ wget https://help.ubuntu.com/7.04/common/img/headerlogo.png
If, for example, an FTP server requires a login and password, you can enter that information on
the wget command line in the following forms:
$ wget ftp://user:password@ftp.example.com/path/to/file
$ wget --user=user --password=password ftp://ftp.example.com/path/to/file
For example:
$ wget ftp://chris:mykuulpwd@ftp.linuxtoys.net/home/chris/image.jpg
$ wget –-user=chris –-password=mykuulpwd \
ftp://ftp.linuxtoys.net/home/chris/image.jpg
You can use wget to download a single web page as follows:
$ wget http://www.wiley.com Download only the Web page
If you open the resulting index.html, you’ll have all sorts of broken links. To download all the images and other elements required to render the page properly, use the-p option:
$ wget -p http://www.wiley.com Download Web page and other elements
But if you open the resulting index.html in your browser, chances are you will still have all the broken links even though all the images were downloaded. That’s because the links need to be translated to point to your local files. So instead, do this:
$ wget -pk http://www.wiley.com Download pages and use local file names
And if you’d like wget to keep the original file and also do the translation, type this:
$ wget -pkK http://www.wiley.com Rename to local names, keep original
Sometimes an HTML file you download does not have an.html extension, but ends in .asp or .cgi instead. That may result in your browser not knowing how to open your local copy of the file. You can have wget append .html to those files using the -E option:
$ wget -E http://www.aspexamples.com Append .html to downloaded files
With the wget command, you can recursively mirror an entire web site. While copying files and directories for the entire depth of the server’s file structure, the -m option adds timestamping and keeps FTP directory listings. (Use this with caution, because it can take a lot of time and space.)
$ wget -m http://www.linuxtoys.net
Using some of the options just described, the following command line results in the most usable local copy of a web site:
$ wget -mEkK http://www.linuxtoys.net
If you have ever had a large file download (such as a CD or DVD image file) disconnect before it completed, you may find the -c option to wget to be a lifesaver. Using -c, wget resumes where it left off, continuing an interrupted file download. For example:
$ wget http://example.com/DVD.iso Begin downloading large file
...
95%[========== ] 685,251,583 55K/s Download killed before completion
$ wget -c http://example.com/DVD.iso Resume download where stopped
...
HTTP request sent, awaiting response... 206 Partial Content
Length: 699,389,952 (667), 691,513 (66M) remaining [text/plain]
Because of the continue feature (-c), wget can be particularly useful for those with slow Internet connections who need to download large files. If you have ever had a several-hour download get killed just before it finished, you’ll know what we mean. (Note that if you don’t use the -c when you mean to resume a file download, the file will be saved to a different file: the original name with a .1 appended to it.)
Converting Text Files to Different Formats
Text files in the Unix world use a different end-of-line character (\n) than those used in the DOS/Windows world (\r\n). You can view these special characters in a text file with the od command:
$ od –c –t x1 myfile.txt
So they will appear properly when copied from one environment to the other, it is
necessary to convert the files. Here are some examples:
$ unix2dos < myunixfile.txt > mydosfile.txt
$ cat mydosfile.txt | dos2unix > myunixfile.txt
The unix2dos example just shown above converts a Linux or Unix plain text file (myunixfile.txt) to a DOS or Windows text file (mydosfile.txt). The dos2unix example does the opposite by converting a DOS/Windows file to a Linux/Unix file. These commands require you to install the tofrodos package.
Tested on Ubuntu hardy heron
$ od –c –t x1 myfile.txt
So they will appear properly when copied from one environment to the other, it is
necessary to convert the files. Here are some examples:
$ unix2dos < myunixfile.txt > mydosfile.txt
$ cat mydosfile.txt | dos2unix > myunixfile.txt
The unix2dos example just shown above converts a Linux or Unix plain text file (myunixfile.txt) to a DOS or Windows text file (mydosfile.txt). The dos2unix example does the opposite by converting a DOS/Windows file to a Linux/Unix file. These commands require you to install the tofrodos package.
Tested on Ubuntu hardy heron
Wednesday, September 10, 2008
autoexec.bat
sulekha
which file in ubuntu 8.04 does the same purpose as, autoexec.bat file in windows ?
iaculallad
Any script file (with executable attribute) could be equivalent to autoexec, and you have to place it in the init.d directory for it to execute after boot process.
amoej1
Actually within ubuntu you can use the file /etc/rc.local for this
Code:
edb@lapedb:/etc/init.d$ cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0
This gets called from /etc/init.d/rc.local
which file in ubuntu 8.04 does the same purpose as, autoexec.bat file in windows ?
iaculallad
Any script file (with executable attribute) could be equivalent to autoexec, and you have to place it in the init.d directory for it to execute after boot process.
amoej1
Actually within ubuntu you can use the file /etc/rc.local for this
Code:
edb@lapedb:/etc/init.d$ cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
exit 0
This gets called from /etc/init.d/rc.local
Monday, September 8, 2008
Checking File Systems using badblocks
In Linux, instead of just having the scandisk utility you have in Windows, you can scan a physical device for bad blocks at a physical level with the badblocks command and scan a file system for errors at the logical level with the fsck command. Here’s how to scan for bad blocks:
$ sudo badblocks /dev/sda1 Physically scan hard disk for bad blocks
$ sudo badblocks -v /dev/sda1 Add verbosity to hard disk scan
Checking blocks 0 to 200781
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found.
By default, badblock does a safe read-only test of the blocks. You can also perform a
non-destructive read/write test. This is the slowest test, but the best one you can per-
form without destroying the data on the device. Add -s to see the ongoing progress:
$ sudo badblocks -vsn /dev/sda1 Check bad blocks, non-destructive
Checking for bad blocks in non-destructive read-write mode
From block 0 to 200781
Testing with random pattern: Pass completed, 0 bad blocks found.
The following command performs a faster, destructive read-write test:
WARNING! This will erase all the data on the partition.
$ sudo badblocks -vsw /dev/sda1 Check bad blocks, destructive
Checking for bad blocks in read-write mode
From block 0 to 200781
Testing with pattern 0xaa: done
Reading and comparing: done
Testing with pattern 0x55: done
Reading and comparing: done
Testing with pattern 0xff: done
Reading and comparing: done
Testing with pattern 0x00: done
Reading and comparing: done
Pass completed, 0 bad blocks found.
You can perform multiple badblocks passes; for example, this command line can be used to
burn in a drive and screen for hard drive infant mortality:
$ sudo badblocks -vswp 2 /dev/sda1
$ sudo badblocks /dev/sda1 Physically scan hard disk for bad blocks
$ sudo badblocks -v /dev/sda1 Add verbosity to hard disk scan
Checking blocks 0 to 200781
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found.
By default, badblock does a safe read-only test of the blocks. You can also perform a
non-destructive read/write test. This is the slowest test, but the best one you can per-
form without destroying the data on the device. Add -s to see the ongoing progress:
$ sudo badblocks -vsn /dev/sda1 Check bad blocks, non-destructive
Checking for bad blocks in non-destructive read-write mode
From block 0 to 200781
Testing with random pattern: Pass completed, 0 bad blocks found.
The following command performs a faster, destructive read-write test:
WARNING! This will erase all the data on the partition.
$ sudo badblocks -vsw /dev/sda1 Check bad blocks, destructive
Checking for bad blocks in read-write mode
From block 0 to 200781
Testing with pattern 0xaa: done
Reading and comparing: done
Testing with pattern 0x55: done
Reading and comparing: done
Testing with pattern 0xff: done
Reading and comparing: done
Testing with pattern 0x00: done
Reading and comparing: done
Pass completed, 0 bad blocks found.
You can perform multiple badblocks passes; for example, this command line can be used to
burn in a drive and screen for hard drive infant mortality:
$ sudo badblocks -vswp 2 /dev/sda1
Creating a File System on a Hard Disk Partition
Basic software packages you need in Ubuntu to do file system creation and checking
include util-linux (includes mkfs and other general utilities) and e2fsprogs (ext2/ext3-
specific tools). Specific mkfs commands for different file system types are included in
ntfsprogs (ntfs), dosfstools (msdos and vfat), xfsprogs (xfs), jfsutils (jfs), mtd-utils (jffs
and jffs2), and reiserfs-utils (reiserfs). The basic tools get installed with Ubuntu.
Here are examples of the mkfs command to create file systems (be sure to add -t option first):
$ sudo mkfs -t ext3 /dev/sdb1 Create ext3 file system on sba1
$ sudo mkfs -t ext3 -v -c /dev/sdb1 More verbose and scan for bad blocks
$ sudo mkfs.ext3 -c /dev/sdb1 Same result as previous command
If you would like to add a partition label to the new partition, use the -L option:
$ sudo mkfs.ext3 -c -L mypartition /dev/sdb1 Add mypartition label
mkfs -t vfat /dev/hda8
include util-linux (includes mkfs and other general utilities) and e2fsprogs (ext2/ext3-
specific tools). Specific mkfs commands for different file system types are included in
ntfsprogs (ntfs), dosfstools (msdos and vfat), xfsprogs (xfs), jfsutils (jfs), mtd-utils (jffs
and jffs2), and reiserfs-utils (reiserfs). The basic tools get installed with Ubuntu.
Here are examples of the mkfs command to create file systems (be sure to add -t option first):
$ sudo mkfs -t ext3 /dev/sdb1 Create ext3 file system on sba1
$ sudo mkfs -t ext3 -v -c /dev/sdb1 More verbose and scan for bad blocks
$ sudo mkfs.ext3 -c /dev/sdb1 Same result as previous command
If you would like to add a partition label to the new partition, use the -L option:
$ sudo mkfs.ext3 -c -L mypartition /dev/sdb1 Add mypartition label
mkfs -t vfat /dev/hda8
Working with File System Labels
The term label, in regards to disk partitions, can refer to two different things. A disk
label can be used as another name for a partition table, as seen in parted output. A
partition label can also be the name of an individual partition. To see a partition’s label,
use the e2label command: $ sudo e2label /dev/sda2
/home
To set the label on a partition:
$ sudo e2label /dev/sda2 mypartition
Bear in mind that /etc/fstab sometimes uses the partition label to mount the partition
as in the following example. Changing this label may render the system unbootable.
LABEL=/boot /boot ext3 defaults 1 2
To find a partition when you know only the label, type the following:
$ sudo findfs LABEL=mypartition
/dev/sda2
-------------------------------------------------------------------------------------------
The oldest method to refer to devices in always the same way is by adding a file system label.This label is stored in the file system and not in the metadata. Using file system labels is useful
for mounting devices, as the mount command will check for a label. However, you cannot depend on it in situations where you need to address the device itself and not the file system that is in it.
Typically, you will add a label to a file system when formatting it. For instance, to add a label to an Ext3 file system, you would use the following command:
mkfs.ext3 -L mylabel /dev/sda2
On most file systems, you can also set a label to an existing file system. On Ext2/Ext3, you would do this using the tune2fs utility:
tune2fs -L mylabel /dev/sda2
Once the file system label is set, you can use it when mounting the device. Just replace the name of the device by LABEL=labelname to do this. For instance, the following command would mount the file system that has the label mylabel:
mount LABEL=mylabel /mnt
label can be used as another name for a partition table, as seen in parted output. A
partition label can also be the name of an individual partition. To see a partition’s label,
use the e2label command: $ sudo e2label /dev/sda2
/home
To set the label on a partition:
$ sudo e2label /dev/sda2 mypartition
Bear in mind that /etc/fstab sometimes uses the partition label to mount the partition
as in the following example. Changing this label may render the system unbootable.
LABEL=/boot /boot ext3 defaults 1 2
To find a partition when you know only the label, type the following:
$ sudo findfs LABEL=mypartition
/dev/sda2
-------------------------------------------------------------------------------------------
The oldest method to refer to devices in always the same way is by adding a file system label.This label is stored in the file system and not in the metadata. Using file system labels is useful
for mounting devices, as the mount command will check for a label. However, you cannot depend on it in situations where you need to address the device itself and not the file system that is in it.
Typically, you will add a label to a file system when formatting it. For instance, to add a label to an Ext3 file system, you would use the following command:
mkfs.ext3 -L mylabel /dev/sda2
On most file systems, you can also set a label to an existing file system. On Ext2/Ext3, you would do this using the tune2fs utility:
tune2fs -L mylabel /dev/sda2
Once the file system label is set, you can use it when mounting the device. Just replace the name of the device by LABEL=labelname to do this. For instance, the following command would mount the file system that has the label mylabel:
mount LABEL=mylabel /mnt
Viewing and Changing File System Attributes
Using the tune2fs or dumpe2fs commands, you can view attributes of ext2 and ext3 file
systems. The tune2fs command can also be used to change file system attributes. Use the
swapfs command to create a swap partition. Here are examples (both commands produce the same output):
$ sudo tune2fs -l /dev/sda1 View tunable file system attributes
$ sudo dumpe2fs -h /dev/sda1 Same as tune2fs output
To change settings on an existing ext2 or ext3 file system, you can use the tune2fs command. The following command changes the number of mounts before a forced file system check:
$ sudo tune2fs -c 31 /dev/sda1 Sets # of mounts before check is forced
tune2fs 1.39 (29-May-2006)
Setting maximal mount count to 31
If you’d like to switch to forced file system checks based on time interval rather than number
of mounts, disable mount-count checking by setting it to negative 1 (-1):
$ sudo tune2fs -c -1 /dev/sda1
tune2fs 1.39 (29-May-2006)
Setting maximal mount count to -1
Use the -i option to enable time-dependent checking. Here are some examples:
$ sudo tune2fs -i 10 /dev/sda1 Check after 10 days
$sudo tune2fs -i 1d /dev/sda1 Check after 1 day
$sudo tune2fs -i 3w /dev/sda1 Check after 3 weeks
$sudo tune2fs -i 6m /dev/sda1 Check after 6 months
$sudo tune2fs -i 0 /dev/sda1 Disable time-dependent checking
Be sure you always have either mount-count or time-dependent checking turned on.
Use the -j option to turn an ext2 file system into ext3 (by adding a journal):
$ sudo tune2fs -j /dev/sda1 Add journaling to change ext2 to ext3
systems. The tune2fs command can also be used to change file system attributes. Use the
swapfs command to create a swap partition. Here are examples (both commands produce the same output):
$ sudo tune2fs -l /dev/sda1 View tunable file system attributes
$ sudo dumpe2fs -h /dev/sda1 Same as tune2fs output
To change settings on an existing ext2 or ext3 file system, you can use the tune2fs command. The following command changes the number of mounts before a forced file system check:
$ sudo tune2fs -c 31 /dev/sda1 Sets # of mounts before check is forced
tune2fs 1.39 (29-May-2006)
Setting maximal mount count to 31
If you’d like to switch to forced file system checks based on time interval rather than number
of mounts, disable mount-count checking by setting it to negative 1 (-1):
$ sudo tune2fs -c -1 /dev/sda1
tune2fs 1.39 (29-May-2006)
Setting maximal mount count to -1
Use the -i option to enable time-dependent checking. Here are some examples:
$ sudo tune2fs -i 10 /dev/sda1 Check after 10 days
$sudo tune2fs -i 1d /dev/sda1 Check after 1 day
$sudo tune2fs -i 3w /dev/sda1 Check after 3 weeks
$sudo tune2fs -i 6m /dev/sda1 Check after 6 months
$sudo tune2fs -i 0 /dev/sda1 Disable time-dependent checking
Be sure you always have either mount-count or time-dependent checking turned on.
Use the -j option to turn an ext2 file system into ext3 (by adding a journal):
$ sudo tune2fs -j /dev/sda1 Add journaling to change ext2 to ext3
Creating and Using Swap Partitions
Swap partitions are needed in Linux systems to hold data that overflows from your sys-
tem’s RAM. If you didn’t create a swap partition when you installed Linux, you can cre-
ate it later using the mkswap command. You can create your swap partition either on a regular
disk partition or in a file formatted as a swap partition. Here are some examples:
$ sudo mkswap /dev/sda1 Format sda1 as a swap partition
Setting up swapspace version 1, size = 205594 kB
To check your swap area for bad blocks, use the -c option to mkswap:
$ sudo mkswap -c /dev/sda1
If you don’t have a spare partition, you can create a swap area within a file:
$ sudo dd if=/dev/zero of=/tmp/swapfile count=65536
65536+0 records in
65536+0 records out
33554432 bytes (34 MB) copied, 1.56578 s, 21.4 MB/s
$ sudo chmod 600 /tmp/swapfile
$ sudo mkswap /tmp/swapfile
Setting up swapspace version 1, size = 67104 kB
The dd command above creates a 32MB file named swapfile. The chmod command locks down the permissions on the file, to avoid getting a warning from the swapon command down the road. The mkswap command formats the /tmp/swapfile file to be a swap partition.
After you have created a swap partition or swap file, you need to tell the system to use
the swap area you made using the swapon command. This is similar to what happens at boot time. Here are examples:
$ sudo swapon /dev/sda1 Turn swap on for /dev/sda1 partition
$ sudo swapon -v /dev/sda1 Increase verbosity as swap is turned on
$ sudo swapon -v /tmp/swapfile Turn swap on for the /tmp/swapfile file
You can also use the swapon command to see a list of your swaps files and partitions:
$ swapon -s View all swap files and partitions that are on
Filename Type Size Used Priority
/dev/sda5 partition 1020088 142764 -1
/tmp/swapfile file 65528 0 -6
To turn off a swap area, you can use the swapoff command:
$ sudo swapoff -v /tmp/swapfile
swapoff on /tmp/swapfile
Swap areas are prioritized. The kernel will swap first to areas of high priorities, and
then go down the list. Areas of the same priority get striped between. You can specify
the priority of your swap area as you enable it using the -p option:
$ sudo swapon -v -p 1 /dev/sda1 Assign top swap priority to sda1
to get complete swap space details:- type cat /proc/swaps
tem’s RAM. If you didn’t create a swap partition when you installed Linux, you can cre-
ate it later using the mkswap command. You can create your swap partition either on a regular
disk partition or in a file formatted as a swap partition. Here are some examples:
$ sudo mkswap /dev/sda1 Format sda1 as a swap partition
Setting up swapspace version 1, size = 205594 kB
To check your swap area for bad blocks, use the -c option to mkswap:
$ sudo mkswap -c /dev/sda1
If you don’t have a spare partition, you can create a swap area within a file:
$ sudo dd if=/dev/zero of=/tmp/swapfile count=65536
65536+0 records in
65536+0 records out
33554432 bytes (34 MB) copied, 1.56578 s, 21.4 MB/s
$ sudo chmod 600 /tmp/swapfile
$ sudo mkswap /tmp/swapfile
Setting up swapspace version 1, size = 67104 kB
The dd command above creates a 32MB file named swapfile. The chmod command locks down the permissions on the file, to avoid getting a warning from the swapon command down the road. The mkswap command formats the /tmp/swapfile file to be a swap partition.
After you have created a swap partition or swap file, you need to tell the system to use
the swap area you made using the swapon command. This is similar to what happens at boot time. Here are examples:
$ sudo swapon /dev/sda1 Turn swap on for /dev/sda1 partition
$ sudo swapon -v /dev/sda1 Increase verbosity as swap is turned on
$ sudo swapon -v /tmp/swapfile Turn swap on for the /tmp/swapfile file
You can also use the swapon command to see a list of your swaps files and partitions:
$ swapon -s View all swap files and partitions that are on
Filename Type Size Used Priority
/dev/sda5 partition 1020088 142764 -1
/tmp/swapfile file 65528 0 -6
To turn off a swap area, you can use the swapoff command:
$ sudo swapoff -v /tmp/swapfile
swapoff on /tmp/swapfile
Swap areas are prioritized. The kernel will swap first to areas of high priorities, and
then go down the list. Areas of the same priority get striped between. You can specify
the priority of your swap area as you enable it using the -p option:
$ sudo swapon -v -p 1 /dev/sda1 Assign top swap priority to sda1
to get complete swap space details:- type cat /proc/swaps
swap areas and priorities
Swap areas are prioritized. The kernel will swap first to areas of high priorities, and
then go down the list. Areas of the same priority get striped between.
The exact number really doesn't matter: it's all about RELATIVE priority. The highest priority partition gets swapped-to first, but if two (or more) partitions have the same priority, then the kernel alternates swapping between them. When they are on multiple disks, this has the effect of distributing the swap load, improving performance.
then go down the list. Areas of the same priority get striped between.
The exact number really doesn't matter: it's all about RELATIVE priority. The highest priority partition gets swapped-to first, but if two (or more) partitions have the same priority, then the kernel alternates swapping between them. When they are on multiple disks, this has the effect of distributing the swap load, improving performance.
Sunday, September 7, 2008
commonly used SHELL variables
BASH Shows path name of the bash command (/bin/bash).
BASH_VERSION The version number of the bash command.
CDPATH search path for the CD command
COLUMNS The width of the terminal line (in characters).
DISPLAY Identifies the X display where commands launched from the
current shell will be displayed (such as :0.0).
EUID Effective user ID number of the current user. usually the same as UID but can be
different when the user changes IDs, as with su command, which allows a user to
become an effective root userIt is based on the user entry in
/etc/passwd for the user
EXINIT initialization commands for the Ex/vi editor
GROUPS Lists groups of which the current user is a member.
HISTCMD Shows the current command’s history number.
HISTFILE Shows the location of your history file (usually located at $HOME/.bash_history).
HISTFILESIZE Total number of history entries that will be stored (default, 1000).
Older commands are discarded after this number is reached.
HISTCMD The number of the current command in the history list.
HOME Location of the current user’s home directory.
Typing the cd command with no options returns the shell to the home directory.
HOSTNAME The current machine’s host name.
HOSTTYPE Contains the computer architecture on which the Linux system is
running (i386, i486, i586, i686, x86_64, ppc, or ppc64).
LESSOPEN Set to a command that converts content other than plain text
(images, RPMs, zip files, and so on) so it can be piped through the
less command.
LINES Sets the number of lines in the current terminal
LOGNAME Holds the name of the current user.
LS_COLORS Maps colors to file extensions to indicate the colors the ls command
displays when encountering those file types.
MACHTYPE Displays information about the machine architecture, company, and
operating system (such as i686-redhat-linux-gnu)
MAILCHECK Checks for mail in the number of seconds specified (default is 60).
OLDPWD Directory that was the working directory before changing to the
current working directory.
OSTYPE Name identifying the current operating system (such as linux or linux-gnu)
PATH Colon-separated list of directories used to locate commands that you
type (/bin, /usr/bin, and $HOME/bin are usually in the PATH).
PPID Process ID of the command that started the current shell.
PWD The directory assigned as your current directory.
PS1 Primary shell prompt
PS2 secondary shell prompt
RANDOM Accessing this variable generates a random number between 0 and 32767.
SECONDS The number of seconds since the shell was started.
SHELL Contains the full path to the current shell.
SHELLOPTS Lists enabled shell options (those set to on)
SHLVL current shell level, number of shells invoked.
TERM terminal type
USER username
UID user ID of the current user
BASH_VERSION The version number of the bash command.
CDPATH search path for the CD command
COLUMNS The width of the terminal line (in characters).
DISPLAY Identifies the X display where commands launched from the
current shell will be displayed (such as :0.0).
EUID Effective user ID number of the current user. usually the same as UID but can be
different when the user changes IDs, as with su command, which allows a user to
become an effective root userIt is based on the user entry in
/etc/passwd for the user
EXINIT initialization commands for the Ex/vi editor
GROUPS Lists groups of which the current user is a member.
HISTCMD Shows the current command’s history number.
HISTFILE Shows the location of your history file (usually located at $HOME/.bash_history).
HISTFILESIZE Total number of history entries that will be stored (default, 1000).
Older commands are discarded after this number is reached.
HISTCMD The number of the current command in the history list.
HOME Location of the current user’s home directory.
Typing the cd command with no options returns the shell to the home directory.
HOSTNAME The current machine’s host name.
HOSTTYPE Contains the computer architecture on which the Linux system is
running (i386, i486, i586, i686, x86_64, ppc, or ppc64).
LESSOPEN Set to a command that converts content other than plain text
(images, RPMs, zip files, and so on) so it can be piped through the
less command.
LINES Sets the number of lines in the current terminal
LOGNAME Holds the name of the current user.
LS_COLORS Maps colors to file extensions to indicate the colors the ls command
displays when encountering those file types.
MACHTYPE Displays information about the machine architecture, company, and
operating system (such as i686-redhat-linux-gnu)
MAILCHECK Checks for mail in the number of seconds specified (default is 60).
OLDPWD Directory that was the working directory before changing to the
current working directory.
OSTYPE Name identifying the current operating system (such as linux or linux-gnu)
PATH Colon-separated list of directories used to locate commands that you
type (/bin, /usr/bin, and $HOME/bin are usually in the PATH).
PPID Process ID of the command that started the current shell.
PWD The directory assigned as your current directory.
PS1 Primary shell prompt
PS2 secondary shell prompt
RANDOM Accessing this variable generates a random number between 0 and 32767.
SECONDS The number of seconds since the shell was started.
SHELL Contains the full path to the current shell.
SHELLOPTS Lists enabled shell options (those set to on)
SHLVL current shell level, number of shells invoked.
TERM terminal type
USER username
UID user ID of the current user
Thursday, September 4, 2008
init vs telinit
when switching runlevels in ubuntu hardy, what exactly is the subtle difference between sudo telinit and sudo init ?
old soldier
init is not normally executed by a user process, and expects to have a process id of 1. If this is not the case, it will actually execute telinit( 8 ) and pass all arguments to that. See that manual page for further details.
use telinit because init just calls it anyways.
old soldier
init is not normally executed by a user process, and expects to have a process id of 1. If this is not the case, it will actually execute telinit( 8 ) and pass all arguments to that. See that manual page for further details.
use telinit because init just calls it anyways.
MySQL Clustering on Ubuntu
I spent some time getting MySQL clustering working with Ubuntu after reading a guide on Howto Forge. The guide however went into the details of compiling and installing MySQL from source so I’m creating this to show the steps needed to get it set up on a fresh Ubuntu installation.
For a correct setup you will need 3 machines. The first machine will serve as the management node, and the other two will be storage nodes.
At the time of writing, the current stable version of Ubuntu is 8.04.1 and the MySQL version that is installed is 5.0.51
During the configuration I log onto the machines and use the command
sudo su -
to gain permanent root access and saving myself from having to type sudo in front of every command. Use your own discretion.
Installing MySQL
Using apt this is straight forward. Just type the following command on all three machines to install MySQL server.
apt-get install mysql-server
Once asked to, set the root password to the MySQL database. You’ll need to remember this one. Once MySQL server is installed we’ll proceed to configure the management node.
Configuring the Management Node
Create and edit the file /etc/mysql/ndb_mgmd.cnf. Copy and paste the text bellow changing the ip addresses to match your setup as necessary.
[NDBD DEFAULT]
NoOfReplicas=2
DataMemory=80M # How much memory to allocate for data storage
IndexMemory=18M # How much memory to allocate for index storage
# For DataMemory and IndexMemory, we have used the
# default values. Since the "world" database takes up
# only about 500KB, this should be more than enough for
# this example Cluster setup.
[MYSQLD DEFAULT]
[NDB_MGMD DEFAULT]
[TCP DEFAULT]
# Section for the cluster management node
[NDB_MGMD]
# IP address of the management node (this system)
HostName=192.168.1.5
# Section for the storage nodes
[NDBD]
# IP address of the first storage node
HostName=192.168.1.6
DataDir=/var/lib/mysql-cluster
BackupDataDir=/var/lib/mysql-cluster/backup
DataMemory=512M
[NDBD]
# IP address of the second storage node
HostName=192.168.1.7
DataDir=/var/lib/mysql-cluster
BackupDataDir=/var/lib/mysql-cluster/backup
DataMemory=512M
# one [MYSQLD] per storage node
[MYSQLD]
[MYSQLD]
Configuring the Storage Nodes
As you can see in the file we created in the previous step, the cluster will be using /var/lib/mysql-cluster on the storage machines. This path is created when you install MySQL server but they are owned by root. We want to create the backup directory and change ownership to mysql.
mkdir /var/lib/mysql-cluster/backup
chown -R mysql:mysql /var/lib/mysql-cluster
Now we’ll need to edit the MySQL configuration so that the storage nodes will communicate with the Management Node.
Edit /etc/mysql/my.cnf
Search for [mysqld] and add the following.
[mysqld]
ndbcluster
# IP address of the cluster management node
ndb-connectstring=192.168.1.5
Then scroll down to the bottom until you see [MYSQL_CLUSTER]. Uncomment the line and edit so it looks like
[MYSQL_CLUSTER]
ndb-connectstring=192.168.1.5
The reason the connect string it found twice in the mysql file is because one is used by mysql server, and the other is used by the ndb data node app. Save the changes to the file.
Make sure you complete the changes on both data nodes.
Start the Management Node
Start the Management Node using
/etc/init.d/mysql-ndb-mgm restart
The process shouldn’t be running but using restart doesnt hurt. Once it is started we can access the management console using the command ndb_mgm. At the prompt type show; and you will see
ndb_mgm> show;
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 (not connected, accepting connect from 192.168.1.6)
id=3 (not connected, accepting connect from 192.168.1.7)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.1.5 (Version: 5.0.51)
[mysqld(API)] 2 node(s)
id=4 (not connected, accepting connect from any host)
id=5 (not connected, accepting connect from any host)
As you can see the management node is waiting for connections from the data nodes.
Start the Data Nodes
On the data nodes, issue the commands
/etc/init.d/mysql restart
/etc/init.d/mysql-ndb restart
Go back to the management node, type show; again, and now you should see something similar to
id=2 @192.168.1.6 (Version: 5.0.51, starting, Nodegroup: 0)
id=3 @192.168.1.7 (Version: 5.0.51, starting, Nodegroup: 0)
Once they have started properly, the show command should display
ndb_mgm> show;
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.1.6 (Version: 5.0.51, Nodegroup: 0, Master)
id=3 @192.168.1.7 (Version: 5.0.51, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.1.5 (Version: 5.0.51)
[mysqld(API)] 2 node(s)
id=4 @192.168.1.7 (Version: 5.0.51)
id=5 @192.168.1.6 (Version: 5.0.51)
Congratulations, your cluster is now setup.
Testing the cluster
Issue the following on both data nodes to create the test database. Since clustering is done on a table basis in MySQL we have to create the database manually on both data nodes.
$> mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database clustertest;
Query OK, 1 row affected (0.00 sec)
Once this i done, on ONE of the data nodes, create a test table and add an entry.
mysql> use clustertest;
Database changed
mysql> create table test (i int) engine=ndbcluster;
Query OK, 0 rows affected (0.71 sec)
mysql> insert into test values (1);
Query OK, 1 row affected (0.05 sec)
mysql> select * from test;
+------+
| i |
+------+
| 1 |
+------+
1 row in set (0.03 sec)
We’ve just created a table test, added a value to this table and made sure that the table contains one entry. Note that engine=ndbcluster must be used to let MySQL know that this table should be clustered among the data nodes. Let’s make sure that the table is infact created on the other data node, and contains one entry.
mysql> use clustertest;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+-----------------------+
| Tables_in_clustertest |
+-----------------------+
| test |
+-----------------------+
1 row in set (0.01 sec)
mysql> select * from test;
+------+
| i |
+------+
| 1 |
+------+
1 row in set (0.04 sec)
As you can see, the cluster is working.
Moving an existing database to the cluster
Now that we have the cluster working, we can easily change an existing database to be clustered. All you need to do is run the following command on each of the tables.
alter table my_test_table engine-ndbcluster;
The table, and all it’s data will be copied to the datanodes and you can now access/change then through any nodes in the cluster. Very simple.
source:- http://bieg.wordpress.com/2008/08/03/mysql-clustering-ubuntu/
Tested on Ubuntu Hardy 8.04
For a correct setup you will need 3 machines. The first machine will serve as the management node, and the other two will be storage nodes.
At the time of writing, the current stable version of Ubuntu is 8.04.1 and the MySQL version that is installed is 5.0.51
During the configuration I log onto the machines and use the command
sudo su -
to gain permanent root access and saving myself from having to type sudo in front of every command. Use your own discretion.
Installing MySQL
Using apt this is straight forward. Just type the following command on all three machines to install MySQL server.
apt-get install mysql-server
Once asked to, set the root password to the MySQL database. You’ll need to remember this one. Once MySQL server is installed we’ll proceed to configure the management node.
Configuring the Management Node
Create and edit the file /etc/mysql/ndb_mgmd.cnf. Copy and paste the text bellow changing the ip addresses to match your setup as necessary.
[NDBD DEFAULT]
NoOfReplicas=2
DataMemory=80M # How much memory to allocate for data storage
IndexMemory=18M # How much memory to allocate for index storage
# For DataMemory and IndexMemory, we have used the
# default values. Since the "world" database takes up
# only about 500KB, this should be more than enough for
# this example Cluster setup.
[MYSQLD DEFAULT]
[NDB_MGMD DEFAULT]
[TCP DEFAULT]
# Section for the cluster management node
[NDB_MGMD]
# IP address of the management node (this system)
HostName=192.168.1.5
# Section for the storage nodes
[NDBD]
# IP address of the first storage node
HostName=192.168.1.6
DataDir=/var/lib/mysql-cluster
BackupDataDir=/var/lib/mysql-cluster/backup
DataMemory=512M
[NDBD]
# IP address of the second storage node
HostName=192.168.1.7
DataDir=/var/lib/mysql-cluster
BackupDataDir=/var/lib/mysql-cluster/backup
DataMemory=512M
# one [MYSQLD] per storage node
[MYSQLD]
[MYSQLD]
Configuring the Storage Nodes
As you can see in the file we created in the previous step, the cluster will be using /var/lib/mysql-cluster on the storage machines. This path is created when you install MySQL server but they are owned by root. We want to create the backup directory and change ownership to mysql.
mkdir /var/lib/mysql-cluster/backup
chown -R mysql:mysql /var/lib/mysql-cluster
Now we’ll need to edit the MySQL configuration so that the storage nodes will communicate with the Management Node.
Edit /etc/mysql/my.cnf
Search for [mysqld] and add the following.
[mysqld]
ndbcluster
# IP address of the cluster management node
ndb-connectstring=192.168.1.5
Then scroll down to the bottom until you see [MYSQL_CLUSTER]. Uncomment the line and edit so it looks like
[MYSQL_CLUSTER]
ndb-connectstring=192.168.1.5
The reason the connect string it found twice in the mysql file is because one is used by mysql server, and the other is used by the ndb data node app. Save the changes to the file.
Make sure you complete the changes on both data nodes.
Start the Management Node
Start the Management Node using
/etc/init.d/mysql-ndb-mgm restart
The process shouldn’t be running but using restart doesnt hurt. Once it is started we can access the management console using the command ndb_mgm. At the prompt type show; and you will see
ndb_mgm> show;
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 (not connected, accepting connect from 192.168.1.6)
id=3 (not connected, accepting connect from 192.168.1.7)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.1.5 (Version: 5.0.51)
[mysqld(API)] 2 node(s)
id=4 (not connected, accepting connect from any host)
id=5 (not connected, accepting connect from any host)
As you can see the management node is waiting for connections from the data nodes.
Start the Data Nodes
On the data nodes, issue the commands
/etc/init.d/mysql restart
/etc/init.d/mysql-ndb restart
Go back to the management node, type show; again, and now you should see something similar to
id=2 @192.168.1.6 (Version: 5.0.51, starting, Nodegroup: 0)
id=3 @192.168.1.7 (Version: 5.0.51, starting, Nodegroup: 0)
Once they have started properly, the show command should display
ndb_mgm> show;
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.1.6 (Version: 5.0.51, Nodegroup: 0, Master)
id=3 @192.168.1.7 (Version: 5.0.51, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.1.5 (Version: 5.0.51)
[mysqld(API)] 2 node(s)
id=4 @192.168.1.7 (Version: 5.0.51)
id=5 @192.168.1.6 (Version: 5.0.51)
Congratulations, your cluster is now setup.
Testing the cluster
Issue the following on both data nodes to create the test database. Since clustering is done on a table basis in MySQL we have to create the database manually on both data nodes.
$> mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database clustertest;
Query OK, 1 row affected (0.00 sec)
Once this i done, on ONE of the data nodes, create a test table and add an entry.
mysql> use clustertest;
Database changed
mysql> create table test (i int) engine=ndbcluster;
Query OK, 0 rows affected (0.71 sec)
mysql> insert into test values (1);
Query OK, 1 row affected (0.05 sec)
mysql> select * from test;
+------+
| i |
+------+
| 1 |
+------+
1 row in set (0.03 sec)
We’ve just created a table test, added a value to this table and made sure that the table contains one entry. Note that engine=ndbcluster must be used to let MySQL know that this table should be clustered among the data nodes. Let’s make sure that the table is infact created on the other data node, and contains one entry.
mysql> use clustertest;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+-----------------------+
| Tables_in_clustertest |
+-----------------------+
| test |
+-----------------------+
1 row in set (0.01 sec)
mysql> select * from test;
+------+
| i |
+------+
| 1 |
+------+
1 row in set (0.04 sec)
As you can see, the cluster is working.
Moving an existing database to the cluster
Now that we have the cluster working, we can easily change an existing database to be clustered. All you need to do is run the following command on each of the tables.
alter table my_test_table engine-ndbcluster;
The table, and all it’s data will be copied to the datanodes and you can now access/change then through any nodes in the cluster. Very simple.
source:- http://bieg.wordpress.com/2008/08/03/mysql-clustering-ubuntu/
Tested on Ubuntu Hardy 8.04
Subscribe to:
Comments (Atom)