서버 설정 · 3 min read · Feb 06, 2026
완벽한 서버 - Gentoo 2007.0 - 페이지 4
7 소프트웨어 설치
선택적으로 명령줄에서의 시간을 더 편안하게 만들기 위해 몇 가지를 설치할 수 있습니다. “완벽한 설정”에 실질적인 기능 차이는 없습니다. 이전에 chroot 시스템에 vim을 설치했더라도, 이 방법으로 설치해야 제대로 설치됩니다.
emerge --ask --verbose gentoolkit vim이제 기본 편집기를 변경할 수 있습니다. nano를 원하지 않는 경우:
vi /etc/rc.confEDITOR 속성을 원하는 값으로 변경하십시오. 이는 다음 로그인 시 적용되며, 지금 입력할 수도 있습니다,
source /etc/rc.conf우리는 이미 필요한 대부분의 개발 파일을 가지고 있으며, 필요한 다른 파일들은 주요 소프트웨어를 설치할 때 가져올 것입니다. Gentoo에서는 다른 배포판에서 일반적으로 볼 수 있는 패키지와 패키지-dev 버전 간의 구분이 없습니다.
emerge --ask --verbose expect fetchmail ncftp netkit-telnetd unzip zip8 관리자 사용자 생성
시스템 작동에 엄격히 필요하지는 않지만, 이는 다른 배포판의 완벽한 설정과 표준화됩니다. 우리는 administrator라는 사용자를 생성하고 그 사용자가 sudo를 사용할 수 있도록 허용할 것입니다.
groupadd -g 1000 administrator
useradd --create-home --gid administrator --groups wheel --shell /bin/bash administrator
passwd administrator비밀번호를 입력한 후, sudo를 설치합니다.
emerge --ask --verbose sudowheel 그룹의 모든 사용자가 사용할 수 있도록 sudo를 설정합니다.
visudo이 줄의 주석을 제거하십시오:
# %wheel ALL=(ALL) ALL이렇게 보여야 합니다,
[...]
# Uncomment to allow people in group wheel to run all commands
%wheel ALL=(ALL) ALL
[...] 저장하고 종료합니다.
그런 다음 원하신다면, root의 비밀번호를 제거할 수 있습니다:
passwd --delete root9 쿼터
9.1 커널 구성
커널에 쿼터 지원이 필요하며, 쿼터 파일 형식 버전 2가 필요합니다.
표준 Gentoo 커널은 쿼터 지원이 없습니다. 이 HowTo를 따라 기본 설치를 했다면 이미 설정했을 것이므로 다음 섹션으로 건너뛰어도 됩니다. 그렇지 않다면 지금 해야 합니다. 이 지침은 genkernel 사용자용입니다. 나머지 사용자들은 아마 이미 무엇을 해야 할지 알고 있을 것입니다.
genkernel --no-clean --no-mrproper --menuconfig all파일 시스템으로 들어가 쿼터 지원을 선택하고, 모듈이 아닌 커널에 빌드되도록 선택합니다. 쿼터 형식 v2 지원을 선택합니다.


저장하고 종료한 후, 커널 구성을 저장하고 빌드를 재개합니다.
재부팅합니다.
9.2 사용자 공간 구성
emerge --ask --verbose quota/etc/conf.d/quota를 편집하고 QUOTACHECK_OPTS에 m을 추가합니다. 제 설정은 다음과 같습니다:
# /etc/conf.d/quota: config file for /etc/init.d/quota
# Note: if your console is hooked up to a serial terminal,
# you prob want to drop the '-v' from the OPTS vars below.
# Run quotacheck ?
RUN_QUOTACHECK="yes"
# Options for quotacheck
QUOTACHECK_OPTS="-avugm"
# Options for quotaon
QUOTAON_OPTS="-avug"
# Options for quotaoff
QUOTAOFF_OPTS="-avug"/etc/fstab를 편집합니다. 제 설정은 다음과 같습니다 (마운트 지점 /가 있는 파티션에 usrquota, grpquota를 추가했습니다):
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
#
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda1 /boot ext2 noauto,noatime 1 2
/dev/hda3 / ext3 noatime,usrquota,grpquota 0 1
/dev/hda2 none swap sw 0 0
/dev/cdrom /mnt/cdrom audo noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 쿼터 시스템을 시작합니다.
mount -o remount /
/etc/init.d/quota start
rc-update add quota boot10 DNS 서버
실행합니다,
echo "net-dns/bind resolvconf" >> /etc/portage/package.use
emerge --ask --verbose bind보안상의 이유로 BIND를 chrooted로 실행하고 싶으므로 다음 단계를 수행해야 합니다.
emerge --config bind
echo alias rndc='rndc -k /chroot/dns/etc/bind/rndc.key' >> ~/.bash_profile
source ~/.bash_profile
rm --recursive --force /etc/bind
ln --symbolic /chroot/dns/etc/bind /etc/bindBIND의 로그를 포함하도록 로깅 데몬을 구성할 필요는 없습니다. 이미 설정되어 있습니다.
따라서 시작합니다.
/etc/init.d/named start
rc-update add named default11 MySQL
Gentoo의 기본 USE 플래그는 MySQL이 모든 것에 대해 UTF-8 문자 집합을 기본으로 선택하여 설치되도록 합니다. ISPConfig를 설치할 경우 다음 줄을 입력해야 ISPConfig 웹 인터페이스가 작동합니다:
echo "dev-db/mysql latin1" >> /etc/portage/package.use개별 데이터베이스는 여전히 UTF-8과 같은 다른 인코딩을 사용할 수 있습니다.
실행합니다,
emerge --ask --verbose mysql시간이 좀 걸릴 것이며, 완료되면,
emerge --config dev-db/mysql
데이터베이스에 설정할 루트 비밀번호를 입력하고 완료되도록 합니다.

MySQL이 localhost뿐만 아니라 모든 인터페이스에서 수신 대기하도록 하려면 /etc/mysql/my.cnf를 편집하고 bind-address = 127.0.0.1 줄의 주석을 제거합니다:
MySQL 시작
/etc/init.d/mysql start
rc-update add mysql default새 게시물을 받은 편지함에서 받기
스팸은 없습니다. 언제든지 구독 해지 가능합니다.