2012年2月29日星期三

Use screen in linux

http://thesystemadministrator.net/cpanel/how-to-install-and-use-screen-in-linux

Ever faced a problem with your ssh connection dying in middle of an installation Or in middle of data transfer ? scp rsync stopping in middle due to a ” Connection Closed ” message ?

Linux has a solution for you for this very scenario. It has a utility that allows you to run any task in the background , without worrying about the connection breaking down due to internet or network cable or any other issue, its called screen. screen will keep things running for you in the background and you can again connect to the screen process and the task would be running as it is. So how do we install and use it ? . Lets start with the installation.

Installing screen :

You can check if screen binary already exist by using below command :

root@CentOS5Server [~]# which screen
/usr/bin/screen
root@CentOS5Server [~]#

If it is already available you are good to go and can move on next step of utilizing this binary/utility.

If its not installed on your machine then you can install it using simple yum command on CentOS , RHEL or any RHEL family distros. You can do it as follows :


yum install screen

2012年2月12日星期日

2012年2月8日星期三

Sun Java6 JDK has No Installation Candidate

http://codingexplorer.wordpress.com/2010/10/08/sun-java6-jdk-has-no-installation-candidate-on-ubuntu-10-04/

You can resolve the problem by performing either of the following steps:

  • Install the OpenJDK
    yee@chimney:~$ sudo apt-get install openjdk-6-jdk
  • Install sun-java6 packages from the Canonical Partner Repository
    1. Adding a new source
      sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
    2. Run an update for the new repository
      sudo apt-get update
    3. Now you can install the Sun JDK
      sudo apt-get install sun-java6-jdk

Old Ubuntu can not update??

404 on apt-get update


Edit "/etc/apt/sources.list"
Feisty has expired and no longer support. Therefore, the repos have been moved to http://old-releases.ubuntu.com/.

You need to replace the current repos in your /etc/apt/sources.list with the new repos, http://old-releases.ubuntu.com/.

Code:
deb http://old-releases.ubuntu.com/ubuntu feisty main restricted ..... .....
After that, do "sudo apt-get update" again.

You can get through the "failed to fetch" problem.