"2017년 제타위키 신규서버 구축과정"의 두 판 사이의 차이

 
(사용자 2명의 중간 판 27개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
;2017년 제타위키 신규서버 구축과정
* 2017년 ~ 2018년, VM 기반으로 새 서버를 구축하는 과정
* 2019년, 컨테이너로 전환하여 더 이상 이 방식을 사용하지 않음
==웹서버==
==웹서버==
* [[우분투 apt update]]
* [[우분투 apt update]]
4번째 줄: 9번째 줄:
** [[우분투 아파치 설치]]
** [[우분투 아파치 설치]]
*** [[a2enmod rewrite]]
*** [[a2enmod rewrite]]
** [[우분투 php-apcu 설치]]
** [[우분투 php-curl 설치]]
** [[우분투 php-curl 설치]]
** [[우분투 php-gmp 설치]]
** [[우분투 php-gmp 설치]]
** [[우분투 php-mbstring 설치]]
** [[우분투 php-mbstring 설치]]
** [[우분투 php-mcrypt 설치]]
** [[우분투 php-mcrypt 설치]]
** [[우분투 php-memcache 설치]]
** [[우분투 php-mysql 설치]]
** [[우분투 php-mysql 설치]]
** [[우분투 php-xml 설치]]
** [[우분투 php-xml 설치]]
** [[우분투 php-zip 설치]]
** [[우분투 php-zip 설치]]
** [[우분투 php-memcache 설치]]
** [[우분투 php-redis 설치]]
* [[우분투 nmap 설치]]
* [[우분투 nmap 설치]]
* [[우분투 composer 설치]]
* [[우분투 composer 설치]]
18번째 줄: 25번째 줄:
<source lang='bash'>
<source lang='bash'>
apt update
apt update
apt install -y nmap fio
apt install -y nmap fio zabbix-agent
apt install -y make g++
apt install -y imagemagick
apt install -y mariadb-client
dpkg --configure -a
dpkg --configure -a
apt install -y python-software-properties
apt install -y python-software-properties
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
apt update
apt update
apt install -y php7.1
apt install -y php7.1 php-apcu php7.1-curl php7.1-gd php7.1-gmp php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-xml php7.1-zip
apt install -y php-curl php-gmp php-mbstring php-mcrypt php-memcache php-mysql php-xml php-zip
apt install -y php-memcache php-redis
a2enmod rewrite
a2enmod rewrite
chmod +rx /usr/bin/python2.7
chmod +rx /usr/bin/python2.7
33번째 줄: 43번째 줄:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
apt install -y nodejs
apt install -y nodejs
apt install -y supervisor
</source>
</source>


38번째 줄: 49번째 줄:
<source lang='console'>
<source lang='console'>
root@zetaweb:~# php -v
root@zetaweb:~# php -v
PHP 7.1.7-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jul  7 2017 09:41:45) ( NTS )
PHP 7.1.12-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 29 2017 10:03:25) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
     with Zend OPcache v7.1.7-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
     with Zend OPcache v7.1.12-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
root@zetaweb:~# apache2 -v
root@zetaweb:~# apache2 -v
Server version: Apache/2.4.18 (Ubuntu)
Server version: Apache/2.4.18 (Ubuntu)
Server built:  2017-06-26T11:58:04
Server built:  2017-09-18T15:09:02
root@zetaweb:~# composer -V
root@zetaweb:~# composer -V
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Composer version 1.4.2 2017-05-17 08:17:52
Composer version 1.5.5 2017-12-01 14:42:57
root@zetaweb:~# npm -v
root@zetaweb:~# npm -v
3.10.10
3.10.10
60번째 줄: 71번째 줄:
<source lang='bash'>
<source lang='bash'>
apt update
apt update
apt install -y nmap fio
apt install software-properties-common
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish5/script.deb.sh | sudo bash
apt update
apt install -y varnish hitch letsencrypt
apt install -y nmap fio zabbix-agent
</source>
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish60lts/script.deb.sh | sudo bash
<source lang='bash'>
apt install -y varnish hitch
openssl dhparam -out /etc/hitch/dhparam.pem 2048
openssl dhparam -out /etc/hitch/dhparam.pem 2048
letsencrypt certonly --standalone \
-d zetawiki.com \
-d www.zetawiki.com
</source>
</source>
* 확인
* 확인
<source lang='console'>
<source lang='console'>
root@zetav:~# varnishd -V
root@zetav:~# varnishd -V
varnishd (varnish-5.2.1 revision 67e562482)
varnishd (varnish-6.0.3 revision 7d1ded3aa033a018317dbafc61587026ea2ef8a3)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2019 Varnish Software AS
</source>
</source>
<source lang='console'>
<source lang='console'>
root@zetav:~# hitch -V
root@zetav:~# hitch -V
hitch 1.1.1
hitch 1.4.4
</source>
<source lang='console'>
root@zetav:~# letsencrypt --version
letsencrypt 0.4.1
</source>
</source>


88번째 줄: 93번째 줄:
<source lang='bash'>
<source lang='bash'>
apt update
apt update
apt install -y nmap fio
apt install -y nmap fio zabbix-agent
apt install -y python-software-properties
apt install -y python-software-properties
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
94번째 줄: 99번째 줄:
apt update
apt update
apt install -y mariadb-server
apt install -y mariadb-server
apt install -y python3-swiftclient
</source>
</source>
* 확인
* 확인
103번째 줄: 109번째 줄:
mariadb-server/xenial-updates,xenial-updates,xenial-security,xenial-security,now 10.0.31-0ubuntu0.16.04.2 all [installed]
mariadb-server/xenial-updates,xenial-updates,xenial-security,xenial-security,now 10.0.31-0ubuntu0.16.04.2 all [installed]
mariadb-server/xenial,xenial 10.0.24-7 all
mariadb-server/xenial,xenial 10.0.24-7 all
root@db:~# swift --version
python-swiftclient 3.0.0
</source>
</source>


115번째 줄: 123번째 줄:
root@mc:~# memcached -V
root@mc:~# memcached -V
memcached 1.4.25
memcached 1.4.25
</source>
==Zabbix==
{{소스헤더|서버}}
<source lang='bash'>
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
dpkg -i zabbix-release_3.2-1+xenial_all.deb
rm -f zabbix-release_3.2-1+xenial_all.deb
apt update
apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-agent php-bcmath php-mbstring php-xml
</source>
{{소스헤더|클라이언트}}
<source lang='bash'>
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
dpkg -i zabbix-release_3.2-1+xenial_all.deb
rm -f zabbix-release_3.2-1+xenial_all.deb
apt update
apt install -y zabbix-agent
</source>
==workstation==
<source lang='bash'>
apt install multitail
</source>
</source>



2019년 10월 20일 (일) 19:22 기준 최신판

1 개요[ | ]

2017년 제타위키 신규서버 구축과정
  • 2017년 ~ 2018년, VM 기반으로 새 서버를 구축하는 과정
  • 2019년, 컨테이너로 전환하여 더 이상 이 방식을 사용하지 않음

2 웹서버[ | ]

apt update
apt install -y nmap fio zabbix-agent
apt install -y make g++
apt install -y imagemagick
apt install -y mariadb-client
dpkg --configure -a
apt install -y python-software-properties
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
apt update
apt install -y php7.1 php-apcu php7.1-curl php7.1-gd php7.1-gmp php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-xml php7.1-zip
apt install -y php-memcache php-redis
a2enmod rewrite
chmod +rx /usr/bin/python2.7
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
apt install -y nodejs
apt install -y supervisor
  • 확인
root@zetaweb:~# php -v
PHP 7.1.12-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 29 2017 10:03:25) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.12-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
root@zetaweb:~# apache2 -v
Server version: Apache/2.4.18 (Ubuntu)
Server built:   2017-09-18T15:09:02
root@zetaweb:~# composer -V
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Composer version 1.5.5 2017-12-01 14:42:57
root@zetaweb:~# npm -v
3.10.10

3 Varnish서버[ | ]

apt update
apt install software-properties-common
apt update
apt install -y nmap fio zabbix-agent
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish60lts/script.deb.sh | sudo bash
apt install -y varnish hitch
openssl dhparam -out /etc/hitch/dhparam.pem 2048
  • 확인
root@zetav:~# varnishd -V
varnishd (varnish-6.0.3 revision 7d1ded3aa033a018317dbafc61587026ea2ef8a3)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2019 Varnish Software AS
root@zetav:~# hitch -V
hitch 1.4.4

4 DB서버[ | ]

apt update
apt install -y nmap fio zabbix-agent
apt install -y python-software-properties
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.kaist.ac.kr/mariadb/repo/10.1/ubuntu xenial main'
apt update
apt install -y mariadb-server
apt install -y python3-swiftclient
  • 확인
root@db:~# mysql -V
mysql  Ver 15.1 Distrib 10.0.31-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
root@db:~# apt list mariadb-server -a
Listing... Done
mariadb-server/xenial-updates,xenial-updates,xenial-security,xenial-security,now 10.0.31-0ubuntu0.16.04.2 all [installed]
mariadb-server/xenial,xenial 10.0.24-7 all
root@db:~# swift --version
python-swiftclient 3.0.0

5 Memcache서버[ | ]

apt update
apt install -y nmap fio
apt install -y memcached
  • 확인
root@mc:~# memcached -V
memcached 1.4.25

6 Zabbix[ | ]

서버
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
dpkg -i zabbix-release_3.2-1+xenial_all.deb
rm -f zabbix-release_3.2-1+xenial_all.deb
apt update
apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-agent php-bcmath php-mbstring php-xml
클라이언트
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
dpkg -i zabbix-release_3.2-1+xenial_all.deb
rm -f zabbix-release_3.2-1+xenial_all.deb
apt update
apt install -y zabbix-agent

7 workstation[ | ]

apt install multitail

8 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}