본문 바로가기

IT/linux

[X][ubuntu] Ubuntu 설치

ubuntu server 설치


작성자 : Kei

환경 : ubuntu 16.04.2 LTS 

설치시 선택 : GRUB 설치 선택


// 0. 기본 명령어

// 종료

# shutdown -h now


// 재부팅

# reboot


// 1. ubuntu server minimal 설치시 해야할 작업


// root 패스워드 설정

$ sudo passwd root


// package update하기

# apt-get update


// ssh 설치

# apt-get install openssh-server


// root계정으로 ssh 접속을 위한 설정파일 수정, 우회접속시 수정 불필요

#  vi /etc/ssh/sshd_config


# Authentication:

LoginGraceTime 120

# PermitRootLogin without-password

# PermitRootLogin prohitbit-password

PermitRootLogin yes

StrictModes yes


// ssh 재시작 해줌

# service ssh restart


// 방화벽 설정

-- 상태 확인 (처음 설치시 inactive 되어 있음)

# ufw status


-- 활성화

# ufw enable


-- 방화벽 포트 정보 보기

-- ufw status verbose


-- 포트 열기

# ufw allow 22/tcp


// AppArmor 삭제 (SELINUX와 비슷)

# service apparmor stop 

# update-rc.d -f apparmor remove 

# apt-get remove apparmor apparmor-utils


// system clock 동기화

# apt-get install ntp ntpdate


// crontab 설정 

-- crontab 설치 (설치시 활성화 되어 있음)

# apt-get install cron 

-- crontab 서비스 시작

# service cron start

-- crontab 확인

# crontab -l -u username


// ubuntu vim 이상할시

-- vim 제거시 (패키지 확인)

# apt-get remove vim-common

-- vim 패키지 확인

# vim 

-- vim 설치

# apt-get install vim 


// hostname 변경

# hostname  새로운호스트네임

# vi /etc/hostname의 값을 변경

# hostname -F /etc/hostname

# vi /etc/hosts

127.0.1.1 ubuntu14


// 네트워크 설정 

# vi /etc/network/interfaces

# The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 192.168.1.151 netmask 255.255.252.0 gateway 192.168.1.1 dns-nameservers 192.168.1.5 192.168.1.1 auto eth1 iface eth1 inet static address 192.168.1.152 netmask 255.255.252.0 gateway 192.168.1.1


-- IP변경 후 reboot

# reboot 



// vm-tools 설치 (VMware 사용시)

# sudo apt-get remove open-vm-tools

# sudo apt-get install open-vm-tools-desktop



등록일 : 2016.03.09

수정일 : 2017.04.03 (ubuntu version update 16.04.2 LTS)

'IT > linux' 카테고리의 다른 글

[ubuntu] Ubuntu에 docker 설치  (0) 2017.04.12
[X][linux] crontab 수정  (0) 2016.10.20
[X][docker] CentOS에 docker설치  (0) 2016.01.13
[CentOS] naver yobi 설치  (0) 2015.12.03
[LINUX] heartbeat 설치  (1) 2015.12.01