Ubuntu

ubuntu 12.04 설치, root 활성화, openssh 설치

Naan 2013. 7. 19. 17:38
320x100

가상화 구축때문에 ubuntu 설치해봤다.

http://www.ubuntu.com/download/alternative-downloads

위 사이트에서 원하는 버전을 다운받으면 된다.

desktop 버전과 server 버전이 있는데

초보들은 desktop 을 다운 받으면 된다.


USB에 담아서 설치 해보도록 하자.

http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

위 경로에서 다운 받거나

Universal-USB-Installer-1.9.3.7.exe

실행을 하면 위와 같이 뜬다.

위와 같이 설정을 하고 create 누르면 USB 에 설치가 된다.

설치가 다 되면 PC에 연결해서 USB 부팅으로 설치를 하면 된다.

설치 방법은 간단하니 생략


1. root 활성화

우선 터미널을 열자 아무리 찾아봐도 터미널이 없다 대략난감하다....

alt+ctrl+t 누르면 터미널이 열린다.


ubuntu 는 기본적으로 root가 비활성화 되어 있다. 활성화 시켜주자.

test@test:~$ sudo passwd root

패스워드를 입력하면 root가 활성화 된다.


2. apt-get 저장소 변경

기본 설정되어 있는 저장소는 너무 느리다. 변경해주자

root@test:~# vi /etc/apt/sources.list

#deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ dists/precise/main/binary-i386/


#deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ dists/precise/restricted/binary-i386/

#deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release amd64 (20130213)]/ precise main restricted


# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

# newer versions of the distribution.

deb http://kr.archive.ubuntu.com/ubuntu/ precise main restricted

deb-src http://kr.archive.ubuntu.com/ubuntu/ precise main restricted


## Major bug fix updates produced after the final release of the

## distribution.

deb http://kr.archive.ubuntu.com/ubuntu/ precise-updates main restricted

deb-src http://kr.archive.ubuntu.com/ubuntu/ precise-updates main restricted


## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team. Also, please note that software in universe WILL NOT receive any

## review or updates from the Ubuntu security team.

deb http://kr.archive.ubuntu.com/ubuntu/ precise universe

deb-src http://kr.archive.ubuntu.com/ubuntu/ precise universe

deb http://kr.archive.ubuntu.com/ubuntu/ precise-updates universe

deb-src http://kr.archive.ubuntu.com/ubuntu/ precise-updates universe


## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

## team, and may not be under a free licence. Please satisfy yourself as to

## your rights to use the software. Also, please note that software in

## multiverse WILL NOT receive any review or updates from the Ubuntu

## security team.

deb http://kr.archive.ubuntu.com/ubuntu/ precise multiverse

deb-src http://kr.archive.ubuntu.com/ubuntu/ precise multiverse

deb http://kr.archive.ubuntu.com/ubuntu/ precise-updates multiverse

deb-src http://kr.archive.ubuntu.com/ubuntu/ precise-updates multiverse


## N.B. software from this repository may not have been tested as

## extensively as that contained in the main release, although it includes

## newer versions of some applications which may provide useful features.

## Also, please note that software in backports WILL NOT receive any review

## or updates from the Ubuntu security team.

deb http://kr.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse

deb-src http://kr.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse


deb http://security.ubuntu.com/ubuntu precise-security main restricted

deb-src http://security.ubuntu.com/ubuntu precise-security main restricted

deb http://security.ubuntu.com/ubuntu precise-security universe

deb-src http://security.ubuntu.com/ubuntu precise-security universe

deb http://security.ubuntu.com/ubuntu precise-security multiverse

deb-src http://security.ubuntu.com/ubuntu precise-security multiverse


## Uncomment the following two lines to add software from Canonical's

## 'partner' repository.

## This software is not part of Ubuntu, but is offered by Canonical and the

## respective vendors as a service to Ubuntu users.

# deb http://archive.canonical.com/ubuntu precise partner

# deb-src http://archive.canonical.com/ubuntu precise partner


## This software is not part of Ubuntu, but is offered by third-party

## developers who want to ship their latest software.

deb http://extras.ubuntu.com/ubuntu precise main

deb-src http://extras.ubuntu.com/ubuntu precise main


원본 파일을 저렇게 되어 있다.
주소를 변경해주자.
:%s/kr.archive.ubuntu.com/ftp.daum.net/g[엔터]
:%s/security.ubuntu.com/ftp.daum.net/g[엔터]
:%s/extras.ubuntu.com/ftp.daum.net/g[엔터]
변경하고 저장하고 나오자


3. openssh-server 설치

ubuntu 는 기본적으로 ssh가 안깔려 있다. 설치를 해줘야 한다.

깔기 위해서는 apt-get를 이용해서 설치를 해야 한다.(리눅스 yum과 같음)

root@test:~# apt-get install openssh-server 

Reading package lists... Done

Building dependency tree

Reading state information... Done

Package openssh-server is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package openssh-server has no installation candidate

위와 같이 에러가 뜬다.

미러 사이트에서 정보를 못받아와서 그렇다.

그러니 apt-get update 를 해주어야 한다.

root@test:~# apt-get update

혹시 

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)

E: Unable to lock directory /var/lib/apt/lists/

위와 같이 에러가 뜬다면

root@test:~# rm /var/lib/apt/list/lock 삭제 해주면 된다.

저장소 업데이트가 끝났으니

root@test:~# apt-get install openssh-server








320x100