서버 설정 · 3 min read · Dec 04, 2025

완벽한 설정 - Mandriva 2006 무료 에디션 - 페이지 5

MySQL (4.1)

*urpmi MySQL MySQL-client libmysql14-devel

    • /etc/init.d/mysqld start*

이제 네트워킹이 활성화되었는지 확인하십시오. 실행하십시오

netstat -tap

다음과 같은 줄이 표시되어야 합니다:

| tcp 0 0 *:mysql *:* LISTEN 6621/mysqld |

그렇지 않으면 /etc/sysconfig/mysqld를 편집하고 변수 MYSQLD_OPTIONS에서 –skip-networking을 제거하십시오:

| # (oe) Remove --skip-networking to enable network access from # non local clients. Access from localhost will still work. MYSQLD_OPTIONS="" # (oe) set TMPDIR and TMP environment variables TMPDIR="${datadir}/.tmp" TMP="${TMPDIR}" |

그리고 MySQL 서버를 재시작하십시오:

/etc/init.d/mysqld restart

실행하십시오

mysqladmin -u root password yourrootsqlpassword
mysqladmin -h server1.example.com -u root password yourrootsqlpassword

사용자 root의 비밀번호를 설정합니다 (그렇지 않으면 누구나 MySQL 데이터베이스에 접근할 수 있습니다!).

SMTP-AUTH 및 TLS가 포함된 Postfix

urpmi cyrus-sasl libsasl2 libsasl2-devel libsasl2-plug-plain libsasl2-plug-anonymous libsasl2-plug-crammd5 libsasl2-plug-digestmd5 libsasl2-plug-gssapi libsasl2-plug-login postfix imap

postconf -e ‘smtpd_sasl_local_domain =’
postconf -e ‘smtpd_sasl_auth_enable = yes’
postconf -e ‘smtpd_sasl_security_options = noanonymous’
postconf -e ‘broken_sasl_auth_clients = yes’
postconf -e ‘smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination’
postconf -e ‘inet_interfaces = all’
postconf -e ‘mydomain = example.com’
postconf -e ‘myhostname = server1.$mydomain’
postconf -e ‘mydestination = /etc/postfix/local-host-names, localhost.example.com’

touch /etc/postfix/local-host-names

/etc/postfix/sasl/smtpd.conf를 편집하십시오. 다음과 같아야 합니다:

| # SASL library configuration file for postfix # all parameters are documented into: # /usr/share/doc/cyrus-sasl-2.*/options.html # The mech_list parameters list the sasl mechanisms to use, # default being all mechs found. mech_list: plain login # To authenticate using the separate saslauthd daemon, (e.g. for # system or ldap users). Also see /etc/sysconfig/saslauthd. pwcheck_method: saslauthd saslauthd_path: /var/lib/sasl2/mux # To authenticate against users stored in sasldb. #pwcheck_method: auxprop #auxprop_plugin: sasldb #sasldb_path: /var/lib/sasl2/sasldb2 |

mkdir /etc/postfix/ssl
cd /etc/postfix/ssl/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr
openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
openssl rsa -in smtpd.key -out smtpd.key.unencrypted
mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650

postconf -e ‘smtpd_tls_auth_only = no’
postconf -e ‘smtp_use_tls = yes’
postconf -e ‘smtpd_use_tls = yes’
postconf -e ‘smtp_tls_note_starttls_offer = yes’
postconf -e ‘smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key’
postconf -e ‘smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt’
postconf -e ‘smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem’
postconf -e ‘smtpd_tls_loglevel = 1’
postconf -e ‘smtpd_tls_received_header = yes’
postconf -e ‘smtpd_tls_session_cache_timeout = 3600s’
postconf -e ‘tls_random_source = dev:/dev/urandom’

이제 Postfix, saslauthd, imap 및 pop3를 시작하십시오:

chkconfig imap on
chkconfig imaps on
chkconfig ipop3 on
chkconfig pop3s on
/etc/init.d/postfix restart
/etc/init.d/saslauthd restart
/etc/init.d/xinetd restart

SMTP-AUTH 및 TLS가 제대로 작동하는지 확인하려면 다음 명령을 실행하십시오:

telnet localhost 25

Postfix 메일 서버에 연결한 후 다음을 입력하십시오:

ehlo localhost

다음 줄이 표시되면

250-STARTTLS

250-AUTH

모든 것이 정상입니다.

quit를 입력하여 시스템의 셸로 돌아갑니다.

PHP5가 포함된 Apache2

urpmi apache2-mod_php libphp5_common5 php-bz2 php-calendar php-ctype php-curl php-date_time php-devel php-dio php-dom php-eaccelerator php-enchant php-esmtp php-event php-exif php-fam php-ffmpeg php-fileinfo php-filepro php-ftp php-gd php-gettext php-gmp php-iconv php-id3 php-idn php-imap php-imlib2 php-mailparse php-mbstring php-mcache php-mcrypt php-mhash php-ming php-mysql php-mysqli php-ncurses php-newt php-odbc php-oggvorbis php-pam_auth php-pcntl php-pcre php-pear-Net_IDNA php-posix php-pspell php-readline php-recode php-session php-shmop php-simplexml php-snmp php-soap php-sockets php-sqlite php-ssh2 php-sysvmsg php-sysvsem php-sysvshm php-tclink php-tcpwrap php-tidy php-xml php-xmlrpc php-zip php5-ini curl libcurl3-devel perl-libwww-perl ImageMagick (1줄!)

다음과 같은 메시지가 표시되면:

Missing signature ((no key found) OK)
Do you want to continue installation ? (y/N)

Y로 응답하는 것이 안전합니다.

이제 ISPConfig를 나중에 설치할 것이므로 PHP를 전역적으로 비활성화해야 합니다. ISPConfig에서는 사이트별로 PHP를 활성화/비활성화할 수 있습니다. 지금 PHP를 전역적으로 비활성화하지 않으면 ISPconfig에서 지정한 것과 관계없이 PHP가 항상 활성화됩니다! ISPConfig를 설치하지 않으려면 이제 Apache/PHP5 설치 및 구성이 완료되었습니다!

/etc/httpd/modules.d/70_mod_php.conf를 편집하고 AddType 줄을 주석 처리하십시오:

| LoadModule php5_module extramodules/mod_php5.so PHPINIDir /etc # AddType application/x-httpd-php .php # AddType application/x-httpd-php .php3 # AddType application/x-httpd-php .php4 # AddType application/x-httpd-php .php5 # AddType application/x-httpd-php .phtml # AddType application/x-httpd-php-source .phps DirectoryIndex index.php index.phtml index.php3 index.php4 index.php5 |

/etc/httpd/conf/mime.types를 편집하고 다음 줄을 주석 처리하십시오:

| #application/x-perl perl pl #application/x-php php php3 php4 |

/etc/httpd/conf/httpd.conf를 편집하고 LoadModule 섹션에 다음 줄을 추가하십시오:

| LoadModule php5_module extramodules/mod_php5.so |

(비록 이 줄이 이미 /etc/httpd/modules.d/70_mod_php.conf에 있지만, 그렇지 않으면 httpd -t 명령이 Syntax OK 대신 오류를 보고할 것이기 때문에 매우 중요합니다. ISPConfig에서 생성한 가상 호스트에 php_admin_flag safe_mode On과 같은 줄이 포함되어 있을 경우!)

( 참고: ISPConfig 2.1.1 또는 이전 버전을 설치할 예정이라면, 다음을 추가하는 것이 좋습니다:

| Options +Includes -Indexes AllowOverride None AllowOverride Indexes AuthConfig Limit FileInfo Order allow,deny Allow from all Deny from all |

/etc/httpd/conf/httpd.conf의 끝에 지금 추가하더라도 필요하지 않습니다.)

Apache를 재시작하십시오:

/etc/init.d/httpd restart

Share: X/Twitter LinkedIn

새 게시물을 받은 편지함에서 받기

스팸은 없습니다. 언제든지 구독 해지 가능합니다.