Test

Powered by Blogger.

Monday 24 November 2014

Installing software on linux from windows using cygwin

 

If you are using SSH client to connect to Linux server from your Windows laptop, sometimes it may be necessary to launch UI application on the remote Linux server, but to display the UI on the windows laptop. Following are two typical reasons to perform this activity:

Install software on Linux from Windows: To launch a UI based installer to install software on remote Linux server from windows laptop. For e.g. A DBA might want to install the Oracle on the Linux server where only the SSH connection to the remote server is available and not the console.Launch Linux X client software on Windows:To launch X Client software (for e.g. xclock) located on your remote Linux server to the Windows laptop.

Cygwin can be used to perform the above activities. Following 15 steps explains how to install Cygwin and launch software installers on Linux from Windows. Go to Cygwin and download the setup.exe. Launch the setup.exe on the Windows and follow the steps mentioned below.

1. Welcome Screen. Click next on the Cygwin installation welcome screen.

2. Choose a download source. Select the 'Install from internet' option

3. Choose Installation directory. I selected C:\cygwin as shown below. This is the location where the Cygwin software will be installed on the Windows.

4. Select Local Package Install directory. This is the directory where the installation files will be downloaded and stored.

5. Select Connection Type. If you are connected to internet via proxy, enter the information. If not, select 'Direct Connection'.

6. Choose a download site. You can either choose a download site that is closer to you or leave the default selection.

7. Download Progress. This screen will display the progress of the download.

8. Select Packages to install. I recommend that you leave the default selection here.

9. Installation Progress. This screen will display the progress of the installation.

10. Installation Completion.

11. Start the Cygwin Bash Shell on Windows.Click on cygwin icon on the desktop (or) Click on Start -> All Programs -> Cygwin -> Cygwin Bash shell, which will display the Cygwin Bash Shell window.

12. Start the X Server on Windows. From the Cygwin Bash Shell, type startx to start the X Server as shown below. Once the X Server is started, leave this window open and do not close it.

13. Xterm window: startx from the above step will open a new xterm window automatically as shown below.

14. SSH to the remote Linux host from the Xterm window as shown below. Please note that you should pass the -Y parameter to ssh.-Y parameter enables trusted X11 forwarding.

jsmith@windows-laptop ~ $ ssh -Y -l jsmith remote-host <This is from the xterm on windows laptop> jsmith@remotehost's password: Warning: No xauth data; using fake authentication data for X11 forwarding. Last login: Thu Jun 12 22:36:04 2008 from 192.168.1.102 /usr/bin/xauth: creating new authority file /home/jsmith/.Xauthority [remote-host]$ xclock & <Note that you are starting xclock on remote linux server> [1] 12593 [remote-host]$

15. xclock on windows laptop. From the Linux host, launch the xclock software as shown above, which will display the xclock on the windows laptop as shown below.

Use the same method explained above to launch any software installer on Linux (for e.g. Oracle database installer) and get it displayed on the Windows laptop.

FTP using Filezilla

Welcome to the FileZilla Client tutorial. In this tutorial, you will learn how to

Connect to an FTP server,Download and upload files,Use the site manager.

If you already know how to use an FTP client, you may want to read the more advanced usage instructionsinstead.

We assume that you already installed and started FileZilla Client (installation instructions).

Connecting to a server

The first thing to do is connecting to a server.

This is our (fictional) login data - please use your own data instead if you want to actively follow the tutorial.

Hostname: example.org Username: john Password: 7PjU#.J3

We will use the quickconnect bar for establishing the connection:

Enter the hostname into the quickconnect bar's Host:field, the username into the Username: field as well as the password into the Password: field. You may leave the Port: field empty unless your login information specifies a certain port to use. Now click onQuickconnect.

Note: If your login information specifies a protocol like SFTP or FTPS, enter the hostname as follows:sftp://hostname or ftps://hostnamerespectively.

FileZilla will now try to connect to the server. If all works well, you will notice that the right "column" switched from Not connected to any server to displaying a list of files and directories.

Navigating and window layout

Legend: 1. Toolbar, 2. Quick connect bar, 3. Message log, 4. Local pane, 5. Remote pane, 6. Transfer queue (Full-size version)

The next step is to get familiar with FileZilla's window layout.

Here is a quick introduction: Below thetoolbar (1) and quick connect bar (2), themessage log (3) displays transfer and connection related messages. Below, you can find the file listings. The left column (local pane, 4) displays the local files and directories, i.e. the stuff on the PC you're using FileZilla on. The right column (server pane, 5) displays the files and directories on the server you are connected to. Both columns have a directory tree at the top and a detailed listing of the currently selected directory's contents at the bottom. You can easily navigate either of the trees and lists by clicking around like in any other file manager. At the bottom of the window, thetransfer queue (6) lists the to-be-transferred and already transferred files.

Transferring files

Now we will upload these files (or the ones you choose, respectively):

website/ +- index.html +- images/ +- image01.jpg +- image02.jpg

Uploading

First - in the local pane - bring the directory into view which contains data to be uploaded (e.g.index.html and images/). Now, navigate to the desired target directory on the server (using the server pane's file listings). To upload the data, select the respective files/directories and drag them from thelocal to the remote pane. You will notice that the files will be added to the transfer queue at the bottom of the window and soon thereafter get removed again - since they were (hopefully, if nothing went wrong) just uploaded to the server. The uploaded files and directories should now be displayed in the server content listing at the right side of the window.

Local and remote file listings after uploading the example files

Note: If you don't like using drag-and-drop, you can also right click on files/directories (in the lower local pane) and select Upload to upload them - or simply double-click a file entry (this does not work for directories).

Note (advanced): If you enable filtering and upload a complete directory, only the not-filtered-out files and directories inside this directory will be transferred.

Downloading

Downloading files, or complete directories, works essentially the same way as uploading - you just drag the files/directories from the remote pane to the local pane this time, instead of the other way round.

Note: In case you (accidentally) try to overwrite a file during upload or download, FileZilla will by default display a dialog asking what to do (overwrite, rename, skip...).

Using the site manager

Now that you are confident in transferring files (if not, practice a little bit), you might want to add the server information to the site manager to make it easy to reconnect to this server. To do this, select Copy current connection to Site Manager... in the File menu. The site manager will be opened and a new entry will be created with all the important information already filled in. You will notice that the entry's name is selected and highlighted - you can enter some descriptive name so you will later on find your server again (enter something like domain.com FTP server for example - you can rename it later if you wish). Now close the dialog by clicking on OK.

The next time you want to connect to this server, you can simply select it in the site manager and clickConnect.

RSS

Categories

Followers

Blog Archive

rTechIndia

RtechIndia->technology ahead

rtech

rtechindia

RtechIndia

Go rtechindia

Go rtechindia

RtechIndia

Monday 24 November 2014

Installing software on linux from windows using cygwin

 

If you are using SSH client to connect to Linux server from your Windows laptop, sometimes it may be necessary to launch UI application on the remote Linux server, but to display the UI on the windows laptop. Following are two typical reasons to perform this activity:

Install software on Linux from Windows: To launch a UI based installer to install software on remote Linux server from windows laptop. For e.g. A DBA might want to install the Oracle on the Linux server where only the SSH connection to the remote server is available and not the console.Launch Linux X client software on Windows:To launch X Client software (for e.g. xclock) located on your remote Linux server to the Windows laptop.

Cygwin can be used to perform the above activities. Following 15 steps explains how to install Cygwin and launch software installers on Linux from Windows. Go to Cygwin and download the setup.exe. Launch the setup.exe on the Windows and follow the steps mentioned below.

1. Welcome Screen. Click next on the Cygwin installation welcome screen.

2. Choose a download source. Select the 'Install from internet' option

3. Choose Installation directory. I selected C:\cygwin as shown below. This is the location where the Cygwin software will be installed on the Windows.

4. Select Local Package Install directory. This is the directory where the installation files will be downloaded and stored.

5. Select Connection Type. If you are connected to internet via proxy, enter the information. If not, select 'Direct Connection'.

6. Choose a download site. You can either choose a download site that is closer to you or leave the default selection.

7. Download Progress. This screen will display the progress of the download.

8. Select Packages to install. I recommend that you leave the default selection here.

9. Installation Progress. This screen will display the progress of the installation.

10. Installation Completion.

11. Start the Cygwin Bash Shell on Windows.Click on cygwin icon on the desktop (or) Click on Start -> All Programs -> Cygwin -> Cygwin Bash shell, which will display the Cygwin Bash Shell window.

12. Start the X Server on Windows. From the Cygwin Bash Shell, type startx to start the X Server as shown below. Once the X Server is started, leave this window open and do not close it.

13. Xterm window: startx from the above step will open a new xterm window automatically as shown below.

14. SSH to the remote Linux host from the Xterm window as shown below. Please note that you should pass the -Y parameter to ssh.-Y parameter enables trusted X11 forwarding.

jsmith@windows-laptop ~ $ ssh -Y -l jsmith remote-host <This is from the xterm on windows laptop> jsmith@remotehost's password: Warning: No xauth data; using fake authentication data for X11 forwarding. Last login: Thu Jun 12 22:36:04 2008 from 192.168.1.102 /usr/bin/xauth: creating new authority file /home/jsmith/.Xauthority [remote-host]$ xclock & <Note that you are starting xclock on remote linux server> [1] 12593 [remote-host]$

15. xclock on windows laptop. From the Linux host, launch the xclock software as shown above, which will display the xclock on the windows laptop as shown below.

Use the same method explained above to launch any software installer on Linux (for e.g. Oracle database installer) and get it displayed on the Windows laptop.

FTP using Filezilla

Welcome to the FileZilla Client tutorial. In this tutorial, you will learn how to

Connect to an FTP server,Download and upload files,Use the site manager.

If you already know how to use an FTP client, you may want to read the more advanced usage instructionsinstead.

We assume that you already installed and started FileZilla Client (installation instructions).

Connecting to a server

The first thing to do is connecting to a server.

This is our (fictional) login data - please use your own data instead if you want to actively follow the tutorial.

Hostname: example.org Username: john Password: 7PjU#.J3

We will use the quickconnect bar for establishing the connection:

Enter the hostname into the quickconnect bar's Host:field, the username into the Username: field as well as the password into the Password: field. You may leave the Port: field empty unless your login information specifies a certain port to use. Now click onQuickconnect.

Note: If your login information specifies a protocol like SFTP or FTPS, enter the hostname as follows:sftp://hostname or ftps://hostnamerespectively.

FileZilla will now try to connect to the server. If all works well, you will notice that the right "column" switched from Not connected to any server to displaying a list of files and directories.

Navigating and window layout

Legend: 1. Toolbar, 2. Quick connect bar, 3. Message log, 4. Local pane, 5. Remote pane, 6. Transfer queue (Full-size version)

The next step is to get familiar with FileZilla's window layout.

Here is a quick introduction: Below thetoolbar (1) and quick connect bar (2), themessage log (3) displays transfer and connection related messages. Below, you can find the file listings. The left column (local pane, 4) displays the local files and directories, i.e. the stuff on the PC you're using FileZilla on. The right column (server pane, 5) displays the files and directories on the server you are connected to. Both columns have a directory tree at the top and a detailed listing of the currently selected directory's contents at the bottom. You can easily navigate either of the trees and lists by clicking around like in any other file manager. At the bottom of the window, thetransfer queue (6) lists the to-be-transferred and already transferred files.

Transferring files

Now we will upload these files (or the ones you choose, respectively):

website/ +- index.html +- images/ +- image01.jpg +- image02.jpg

Uploading

First - in the local pane - bring the directory into view which contains data to be uploaded (e.g.index.html and images/). Now, navigate to the desired target directory on the server (using the server pane's file listings). To upload the data, select the respective files/directories and drag them from thelocal to the remote pane. You will notice that the files will be added to the transfer queue at the bottom of the window and soon thereafter get removed again - since they were (hopefully, if nothing went wrong) just uploaded to the server. The uploaded files and directories should now be displayed in the server content listing at the right side of the window.

Local and remote file listings after uploading the example files

Note: If you don't like using drag-and-drop, you can also right click on files/directories (in the lower local pane) and select Upload to upload them - or simply double-click a file entry (this does not work for directories).

Note (advanced): If you enable filtering and upload a complete directory, only the not-filtered-out files and directories inside this directory will be transferred.

Downloading

Downloading files, or complete directories, works essentially the same way as uploading - you just drag the files/directories from the remote pane to the local pane this time, instead of the other way round.

Note: In case you (accidentally) try to overwrite a file during upload or download, FileZilla will by default display a dialog asking what to do (overwrite, rename, skip...).

Using the site manager

Now that you are confident in transferring files (if not, practice a little bit), you might want to add the server information to the site manager to make it easy to reconnect to this server. To do this, select Copy current connection to Site Manager... in the File menu. The site manager will be opened and a new entry will be created with all the important information already filled in. You will notice that the entry's name is selected and highlighted - you can enter some descriptive name so you will later on find your server again (enter something like domain.com FTP server for example - you can rename it later if you wish). Now close the dialog by clicking on OK.

The next time you want to connect to this server, you can simply select it in the site manager and clickConnect.