출처 :
http://1kko.com/2460502지난 2일간 우분투를 경험하며 설정한 결과, 나중을 위해서, 또 다른분들을 위해서라도 정리를 해놓는것이 편리할 것이라 생각을 했습니다. 그동안
검색을 하느라 많은 시간을 들였는데, 정작 써놓고 보니 몇줄 되지 않네요.
처음에는 제가 알아볼 수 있도록 써놨지만, 포스팅을 하려고
마음먹은 후 이미 알고 있는 것도 추가하고, 주석도 달고 제목도 달았습니다. 부디 보기에 편하셨으면 좋겠네요.
여기서 찾지 못하는
답은 검색해보면 나올것이라 생각합니다.
설치한 우분투 버전은 Ubuntu 6.06 LTS x86 - Server Edition 입니다.
다운로드 링크: http://www.ubuntu.com/getubuntu/download
----------------------------------------------------------------------------
처음
부팅 후 root(루트) 패스워드 지정
$sudo passwd root
Password:
<- 현재 로그인한 유저의 비밀번호 입력
New Password: <- root의 새로운
password
Re-Enter Password: <- root의 새로운 password 재입력
이후 일반 유저에서 root로 가려면
$su -
Password:
----------------------------------------------------------------------------
내부
IP를 따로 사용해야 할 경우
/etc/networking/interfaces의 내용중 comment부분을 아래처럼 치환
# iface eth1 inet dhcp
iface eth1 inet static
address
192.168.32.132
netmask 255.255.255.0
network
192.168.32.0
broadcast 192.168.32.255
gateway
192.168.32.2
이후 networking 데몬 restart.
$sudo /etc/init.d/networking restart
-----------------------------------------------------------------------------
iso이미지를
마운트하기
*가끔 패키지 설치시에 ubuntu-server CD를 요구하는 경우가 있을때
유용하다
$sudo mount -t iso9660 -o loop myimage.iso /cdrom
----------------------------------------------------------------------------
FTP
Server 설치
$sudo apt-get install vsftpd
ftp 설정파일 위치 ->
/etc/vsftpd.conf
보안을 위해 vsftpd.conf를 수정
$sudo vi /etc/vsftpd.conf
::수정할 부분::
anonymous_enable=NO //기본값이 YES 이므로 NO로 변경
local_enable=YES
//주석 제거
write_enable=YES //주석 제거
chroot_local_user=YES //주석제거 상위디렉토리 접금 제한
vsftp데몬 재시작
$sudo /etc/init.d/vsftpd
restart
-----------------------------------------------------------------------------
APM
설치
$sudo apt-get install mysql-common
$sudo apt-get install
mysql-server
$sudo apt-get install apache2
$sudo apt-get install
php5
$sudo apt-get install php5-mysql
Apache2 설정파일 위치
/etc/apache2/apache2.conf <-기본 설정 파일
/etc/apache2/
하위에 보면 각종 설정파일이 분리되어 있습니다.
Apache2 데몬 재시작 명령어
$sudo apache2ctl restart
-----------------------------------------------------------------------------
SSH(secure
shell) 설치
$sudo apt-get install ssh
보안을 위해 /etc/ssh/sshd_config에서
PermitRootLogin 항목을 yes(default)에서 no로
바꿔준다
----------------------------------------------------------------------------
webmin
설치
webmin은 apt-get에 포함되어 있지 않으므로 따로 받아 설치한다.
$wget http://belnet.dl.sourceforge.net/sourceforge/webadmin/webmin_1.290.deb
$sudo
dpkg -i webmin_1.290.deb
http://servername:10000
%080317추가 안될경우 홈페이지 참고: http://www.webmin.com/deb.html
-----------------------------------------------------------------------------
설치
후 관리
$sudo apt-get upgrade //기존 패키지 Upgrade
$sudo apt-get
update //새로운 패키지 정보 Update
-----------------------------------------------------------------------------
ab
: Apache HTTP Server Benchmarking tools
-----------------------------------------------------------------------------
아파치
포트 변경
/etc/apache2/httpd.conf에서
Listen 80을 원하는 포트로
변경
-----------------------------------------------------------------------------
아파치
VirtualHost 설정
/etc/apache2/httpd.conf에서
<VirtualHost *>
ServerName my.domain.com
ServerAdmin
me@my.domain.com
DocumentRoot /home/www/
#특정 directory에만 옵션을 줄 때.
(textcube를 위해 추가한 항목)
<Directory "/home/www/tc">
Options FollowSymLinks
AllowOverride FileInfo
</Directory>
</VirtualHost>
-----------------------------------------------------------------------------
Putty에서
한글 사용
Window > Appearance > Font settings에서 굴림체로
변경
Window > Translation > Character set translaton on received data에서
UTF-8로 변경
$export
LANG=ko_KR.UTF-8
-----------------------------------------------------------------------------
색상이
나오지 않을때 및 alias 고정 지정방법
홈디렉토리의 .profile을 수정
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
.
~/.bashrc
fi
fi
mesg n
#alias 를 고정으로 지정하기
alias ll="ls
-l"
-----------------------------------------------------------------------------
midnight
commander (mc)설치방법
ubuntu universe 패키지에만 포함되어 있으므로
/etc/apt/source.list를 수정한다
끝에 universe를 추가해 준다.
deb http://kr.archive.ubuntu.com/ubuntu/
dapper main restricted universe
deb-src http://kr.archive.ubuntu.com/ubuntu/
dapper main restricted universe
패키지리스트 업데이트 후 설치
$sudo apt-get update;
apt-get install
mc
-----------------------------------------------------------------------------
원하는
패키지(꾸러미) 찾는 방법
$apt-cache search
pkgname
-----------------------------------------------------------------------------
ACPI로
강제 설정방법. (자동 전원꺼짐이 되지 않을 때)
/boot/grub/menu.lst 중 acpi=force를 추가
title Ubuntu, kernel 2.6.15-26-server
root
(hd0,0)
kernel /vmlinuz-2.6.15-26-server root=/dev/hda2 ro quiet
splash acpi=force
initrd
/initrd.img-2.6.15-26-server
savedefault
boot
-----------------------------------------------------------------------------
Samba
설치
$sudo apt-get install samba
-----------------------------------------------------------------------------
samba에서
euc-kr을 사용하여야 할 때
/etc/samba/smb.conf에서 아래 항목을 추가한다.
unix charset = euc-kr
-----------------------------------------------------------------------------
convmv로
EUC-KR 파일명을 UTF-8로 변환하기
apt-get install convmv
convmv --notest -f euc-kr -t utf-8 -r
<directory>
http://blueb.net/blog/trackback/1198