2014-01-22

FreeBSD 10.0 설치후 작업



FreeBSD 10.0 이 릴리즈된 기념으로, OS 설치후에 기본적으로 해야할 작업을 정리하였습니다. 기존에 9.1 에서 했던 것과 거의 비슷하고, 패키지 관리프로그램이 전격적으로 바뀐 것이 큰 특징입니다.

sshd 부팅시 자동시작 설정 : /etc/rc.conf
sshd_enable="yes"
sshd_config 수정 / 재시작 : root로 로그인하는 것은 보안상 문제가 있지만, 편의를 위해 일단 이렇게 해놓자.
# vi /etc/ssh/sshd_config
PasswordAuthentication yes
PermitRootLogin yes
# /etc/rc.d/sshd restart
이제, ssh 로 원격 접속한다.

root, toor 계정쉘을 bash로 변경
# pkg install bash; rehash; chsh -s bash root; chsh -s bash toor
# ln -s /usr/local/bin/bash /bin/bash
쉘을 바꾸었으니, 로그아웃하고 다시 로그인하자.

Linux Emulation 적용 (htop 에서 Linux 의 /proc 을 이용한다)
# echo 'linux_enable="YES"' >> /etc/rc.conf
# kldload linux; pkg install linux_base-f10
# echo 'linproc /compat/linux/proc linprocfs rw 0 0' >> /etc/fstab; mount linproc

필요한 패키지 설치
# pkg install tmux vim-lite ntp gnuls htop git curl wget gnu-watch portupgrade readline sqlite3 libxslt libxml2 openssl gmake

ntpd 적용/실행
# echo 'ntpd_enable="yes"' >> /etc/rc.conf; /etc/rc.d/ntpd start

gnuls alias 적용
# echo 'alias ls="gnuls --color=always"' >> /etc/profile; source /etc/profile

vim 적용
# echo 'alias vi="vim"' >> /etc/profile; source /etc/profile

언어 설정
# echo 'export LANG=ko_KR.UTF-8' >> /etc/profile; source /etc/profile

보안패치
# freebsd-update fetch; freebsd-update install