본문으로 이동

미디어위키 1.45 안정화가 거의 끝났습니다. 다만 Flow 확장 기능 관련 이슈가 있어서 대체하는 작업을 수행할 계획입니다.

  1. 큰숲백과:청사진에서 위키 발전의 대략적인 방향성을 제시했습니다. 의견이 있으신 분은 큰숲백과토론:청사진에서 의견을 남겨주시면 좋겠습니다.
  2. 기능상의 오류로 지원하지 않고 있는 기능에 대해서는 큰숲백과토론:이슈 트래커에 요약했습니다. 참고하시기 바랍니다.
  3. 데이터베이스 덤프 받고싶으신 분은 큰숲백과 가입 후에 사용자토론:Bigforest에 의견 남겨주시면 ftp 주소, 계정, 비밀번호를 특수:EmailUser를 통해서 공개할 예정입니다.

작은숲:위키노트/CentOS 설정: 두 판 사이의 차이

큰숲백과, 나무를 보지 말고 큰 숲을 보라.
잔글 문자열 찾아 바꾸기 - "<source" 문자열을 "<syntaxhighlight" 문자열로
잔글 Utolee90님이 CentOS 설정 문서를 작은숲:위키노트/CentOS 설정 문서로 이동했습니다: 제목 변경
 
(같은 사용자의 중간 판 3개는 보이지 않습니다)
1번째 줄: 1번째 줄:
[[위키노트:CentOS|CentOS]]를 새로 설치하고 나서 기본 설정.
[[작은숲:위키노트/CentOS|CentOS]]를 새로 설치하고 나서 기본 설정.
== 시스템 및 데몬 설정 ==
== 시스템 및 데몬 설정 ==
=== 호스트 네임 설정 ===
=== 호스트 네임 설정 ===
7번째 줄: 7번째 줄:
HOSTNAME=green.example.com
HOSTNAME=green.example.com
...
...
</source>
</syntaxhighlight>
<code>/etc/hosts</code>
<code>/etc/hosts</code>
<syntaxhighlight lang="cfg">
<syntaxhighlight lang="cfg">
14번째 줄: 14번째 줄:
218.0.0.17      red  red.example.com
218.0.0.17      red  red.example.com
218.0.0.18      white white.example.com
218.0.0.18      white white.example.com
</source>
</syntaxhighlight>
=== 시작 데몬 설정 ===
=== 시작 데몬 설정 ===
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# ntsysv
# ntsysv
</source>
</syntaxhighlight>
=== sshd 설정 ===
=== sshd 설정 ===
<code>/etc/ssh/sshd_config</code>
<code>/etc/ssh/sshd_config</code>
25번째 줄: 25번째 줄:
PermitRootLogin no
PermitRootLogin no
...
...
</source>
</syntaxhighlight>
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# service sshd restart
# service sshd restart
</source>
</syntaxhighlight>
=== [[위키노트:Iptables|Iptables] 설정 ===
=== [[작은숲:위키노트/Iptables|Iptables] 설정 ===
<code>/etc/sysconfig/iptables</code>
<code>/etc/sysconfig/iptables</code>
<syntaxhighlight lang="cfg">
<syntaxhighlight lang="cfg">
54번째 줄: 54번째 줄:
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
...
...
</source>
</syntaxhighlight>
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# service iptables restart
# service iptables restart
</source>
</syntaxhighlight>
=== NTP 설치 및 설정 ===
=== NTP 설치 및 설정 ===
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# yum install ntp
# yum install ntp
</source>
</syntaxhighlight>
<code>/etc/ntp.conf</code>
<code>/etc/ntp.conf</code>
<syntaxhighlight lang="cfg">
<syntaxhighlight lang="cfg">
68번째 줄: 68번째 줄:
server ntp.postech.ac.kr
server ntp.postech.ac.kr
server ntp.xbsd.kr
server ntp.xbsd.kr
</source>
</syntaxhighlight>
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# ntpdate kr.pool.ntp.org
# ntpdate kr.pool.ntp.org
74번째 줄: 74번째 줄:
# chkconfig ntpd on
# chkconfig ntpd on
# ntpq -p
# ntpq -p
</source>
</syntaxhighlight>
=== [[위키노트:MySQL|MySQL]] 설치 및 설정 ===
=== [[위키노트:MySQL|MySQL]] 설치 및 설정 ===
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
81번째 줄: 81번째 줄:
# cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
# cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
# vi /etc/my.cnf
# vi /etc/my.cnf
</source>
</syntaxhighlight>
<syntaxhighlight lang="cfg">
<syntaxhighlight lang="cfg">
[client]
[client]
101번째 줄: 101번째 줄:
default-character-set = utf8
default-character-set = utf8
...
...
</source>
</syntaxhighlight>
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# service mysqld start
# service mysqld start
107번째 줄: 107번째 줄:
# service mysqld restart
# service mysqld restart
# mysql -u root -p mysql
# mysql -u root -p mysql
</source>
</syntaxhighlight>
<syntaxhighlight lang="mysql">
<syntaxhighlight lang="mysql">
CREATE DATABASE something;
CREATE DATABASE something;
GRANT ALL PRIVILEGES ON something.* TO 'someone'@'%' IDENTIFIED BY 'anything' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON something.* TO 'someone'@'%' IDENTIFIED BY 'anything' WITH GRANT OPTION;
FLUSH PRIVILEGES;
FLUSH PRIVILEGES;
</source>
</syntaxhighlight>
== 같이 보기 ==
== 같이 보기 ==
* [[Postfix]]
* [[Postfix]]
* [[Yum 저장소 설정]]
* [[Yum 저장소 설정]]
* [[위키노트:Quota 설정]]
* [[작은숲:위키노트/Quota 설정]]
* [[iptables 설정]]
* [[iptables 설정]]
* [[위키노트:Bind 설정|Bind 설정]
* [[작은숲:위키노트/Bind 설정|Bind 설정]
{{리눅스}}
{{리눅스}}
[[분류:위키노트/공유]]
[[분류:위키노트/공유]]
124번째 줄: 124번째 줄:
[[분류:시스템 도구]]
[[분류:시스템 도구]]
[[분류:위키노트/소프트웨어 설정]]
[[분류:위키노트/소프트웨어 설정]]
[[분류:소프트웨어 설치]]{{퍼온문서|위키노트|{{#invoke:string|replace|{{PAGENAME}}|위키노트:|}}}}[[분류:위키노트에서 가져온 문서]]
[[분류:위키노트/소프트웨어 설치]]{{퍼온문서|위키노트|{{#invoke:string|replace|{{PAGENAME}}|위키노트:|}}}}[[분류:위키노트에서 가져온 문서]]

2022년 5월 7일 (토) 14:53 기준 최신판

CentOS를 새로 설치하고 나서 기본 설정.

시스템 및 데몬 설정

호스트 네임 설정

/etc/sysconfig/network

...
HOSTNAME=green.example.com
...

/etc/hosts

218.0.0.15      black black.example.com
218.0.0.16      green green.example.com
218.0.0.17      red   red.example.com
218.0.0.18      white white.example.com

시작 데몬 설정

# ntsysv

sshd 설정

/etc/ssh/sshd_config

...
PermitRootLogin no
...
# service sshd restart

[[작은숲:위키노트/Iptables|Iptables] 설정

/etc/sysconfig/iptables

...
-A RH-Firewall-1-INPUT -m state --state INVALID -j DROP
...
# sshd
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp -s 218.0.0.15 --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp -s 218.0.0.16 --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp -s 218.0.0.17 --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp -s 218.0.0.18 --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j DROP
# domain, rndc
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 53 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 953 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 953 -j ACCEPT
# mysqld
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
# block heavy requests
-A RH-Firewall-1-INPUT -m recent --update --seconds 600 --name TOO_MANY_REQUESTS -j DROP
-A RH-Firewall-1-INPUT -m hashlimit --hashlimit 10/s --hashlimit-burst 24 --hashlimit-mode srcip --hashlimit-name HTTP_REQ_LIMIT -j ACCEPT
-A RH-Firewall-1-INPUT -m recent --set --name TOO_MANY_REQUESTS -j DROP
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
...
# service iptables restart

NTP 설치 및 설정

# yum install ntp

/etc/ntp.conf

...
server kr.pool.ntp.org
server ntp.postech.ac.kr
server ntp.xbsd.kr
# ntpdate kr.pool.ntp.org
# service ntpd start
# chkconfig ntpd on
# ntpq -p

MySQL 설치 및 설정

# yum install mysql mysql-server mysql-connector-odbc mysql-devel
# mv /etc/my.cnf /etc/my.cnf-dist
# cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
# vi /etc/my.cnf
[client]
...
default-character-set = utf8
[mysqld]
...
thread_concurrency = 4
init_connect = SET collation_connection = utf8_general_ci
init_connect = SET NAMES utf8
default-character-set = utf8
character-set-server = utf8
collation-server = utf8_general_ci
[mysqldump]
...
default-character-set = utf8
[mysql]
...
default-character-set = utf8
...
# service mysqld start
# mysqladmin -u root password 'password'
# service mysqld restart
# mysql -u root -p mysql
CREATE DATABASE something;
GRANT ALL PRIVILEGES ON something.* TO 'someone'@'%' IDENTIFIED BY 'anything' WITH GRANT OPTION;
FLUSH PRIVILEGES;

같이 보기

이 작은숲 문서의 출처는 위키노트의 위키노트/CentOS 설정 문서입니다.