728x90
반응형
- 개요
- 서버 구축 순서를 아래에 기재한다.
- 순서 / 이관
- 이관 서버에 신규 볼륨을 어태치한다.
- 서버에서 볼륨의 마운트를 실시한다.
-
confluence데이터 백업infra-misc-3 # mkdir /backup infra-misc-3 # mkfs -t ext4 /dev/xvdj infra-misc-3 # mount /dev/xvdj /backup/
-
mysql데이터의 fulldump/etc/init.d/tomcat6 stop cd /var/data/ tar -zcf /backup/confluence.tar.gz confluence
-
볼륨의 분리mysqldump -u root -p -x --all-databases > /backup/dump.sql
-
AWS 콘솔에서 볼륨 디태치를 실시한다.umount /backup
- EC2를 작성한다.
CentOS7, HVM가상을 선택한다. - ansible 로 초기 세팅 진행
- AWS 콘솔에서 볼륨 어태치 한다.
- 볼륨의 마운트를 실시한다.
-
[root@infra-misc-6 ~]# mount /dev/xvdf /backup/ ls -lh /backup/ total 74G -rw-r--r-- 1 500 500 70G Nov 3 00:29 confluence.tar.gz -rw-r--r-- 1 500 500 3.7G Nov 8 22:52 dump.sql -rw-r--r-- 1 500 500 163M Nov 2 17:11 jdk-8u144-linux-x64.rpm -rw-r--r-- 1 root root 977K Nov 8 19:21 mysql-connector-java-5.1.44-bin.jar
- JAVA1.8설치
-
rpm -ivh jdk-8u144-linux-x64.rpm alternatives --config java
- tomcat8설치
-
useradd -s /sbin/nologin tomcat curl -O http://ftp.yz.yamagata-u.ac.jp/pub/network/apache/tomcat/tomcat-8/v8.0.47/bin/apache-tomcat-8.0.47.tar.gz tar zxvf apache-tomcat-8.0.47.tar.gz mv apache-tomcat-8.0.47 /opt/ chown -R tomcat:tomcat /opt/apache-tomcat-8.0.47
- tomcat8기동 서비스의 설정
-
vi /etc/systemd/system/tomcat.service ------------------------------------------ [Unit] Description=Apache Tomcat 8 After=network.target [Service] User=tomcat Group=tomcat Type=oneshot PIDFile=/opt/apache-tomcat-8.0.47/tomcat.pid RemainAfterExit=yes ExecStart=/opt/apache-tomcat-8.0.47/bin/startup.sh ExecStop=/opt/apache-tomcat-8.0.47/bin/shutdown.sh ExecReStart=/opt/apache-tomcat-8.0.47/bin/shutdown.sh;/opt/apache-tomcat-8.0.47/bin/startup.sh [Install] WantedBy=multi-user.target ------------------------------------------ chmod 755 /etc/systemd/system/tomcat.service systemctl enable tomcat
- mysql5.6설치
-
yum remove mariadb-libs rm -rf /var/lib/mysql/ yum localinstall http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm -y yum repolist all | grep mysql yum install yum-utils yum-config-manager --disable mysql57-community yum-config-manager --enable mysql56-community yum info mysql-community-server yum -y install mysql-community-server mysqld --version systemctl enable mysqld
- my.cnf의 수정
-
-
cat /etc/my.cnf ----------------------------------------------- [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mysqld according to the # instructions in http://fedoraproject.org/wiki/Systemd ## Character and Collation Options ------------------------------------------------------------- character-set-server = utf8 #collation-server = utf8_general_ci collation-server = utf8_bin default-storage-engine = InnoDB explicit_defaults_for_timestamp = TRUE ## Event Scheduler Options --------------------------------------------------------------------- event-scheduler = OFF # or # skip-event-scheduler ## Connection Options -------------------------------------------------------------------------- back_log = 100 max_connections = 200 thread_cache_size = 50 table_open_cache = 512 max_allowed_packet = 256M # thread_concurrency = 16 max_connect_errors = 999999 wait_timeout = 28800 skip-name-resolve ## Memory Options ------------------------------------------------------------------------------ query_cache_size = 64M max_heap_table_size = 32M tmp_table_size = 4M query_cache_limit = 2M group_concat_max_len = 1024 # Session Scope Buffers # - IF YOU WANT TO USE THESE BUFFERS, # ACTIVATE IT IN SESSION SCOPE USING SET <parameter_name>=<values> sort_buffer_size = 512K join_buffer_size = 512K read_buffer_size = 128K read_rnd_buffer_size = 128K ## Log Options --------------------------------------------------------------------------------- log-warnings = 1 # Slow Query Log log_slow_admin_statements slow_query_log = 1 long_query_time = 0.5 ## InnoDB Options ------------------------------------------------------------------------------ innodb_buffer_pool_size = 4G innodb_file_per_table = 1 innodb_autoextend_increment = 100 innodb_log_files_in_group = 2 innodb_log_buffer_size = 16M innodb_log_file_size = 1024M innodb_lock_wait_timeout = 50 innodb_flush_method = O_DIRECT innodb_flush_log_at_trx_commit = 1 innodb_support_xa = OFF innodb_use_sys_malloc = 1 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
- mysql데이터 임포트
-
systemctl start mysqld mysql -u root < /backup/dump.sql systemctl stop mysqld systemctl start mysqld
Confluence설치
728x90
wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-5.10.8.tar.gz tar zxvf atlassian-confluence-5.10.8.tar.gz cd atlassian-confluence-5.10.8/ chown -R tomcat:tomcat confluence mv confluence /opt/apache-tomcat-8.0.47/webapps/ vi /opt/apache-tomcat-8.0.47/webapps/confluence/WEB-INF/classes/confluence-init.properties - # confluence.home=/var/data/confluence/ + confluence.home=/var/data/confluence/ cp -p /backup/mysql-connector-java-5.1.44-bin.jar /opt/apache-tomcat-8.0.47/webapps/confluence/WEB-INF/lib/
- Confluence데이터 복구
-
mkdir /var/data cd /var/data tar zxvf /backup/confluence.tar.gz chown -R tomcat:tomcat confluence
- nginx인스톨
-
yum install nginx --enablerepo=epel systemctl enable nginx
- 기존 설정 파일 사본
-
cd /etc/nginx mv nginx.conf nginx.conf-`date +%F` scp infra@infra-misc-3:/etc/nginx/nginx.conf . scp infra@infra-misc-3:/etc/nginx/cocone-kr-ssl-sha2.pem . scp infra@infra-misc-3:/etc/nginx/cocone-ssl-sha2.pem . cd conf.d/ scp infra@infra-misc-3:/etc/nginx/conf.d/v_portal.naver.com.conf . scp infra@infra-misc-3:/etc/nginx/conf.d/v_portal.naver.com.conf . mkdir /var/log/nginx/portal mkdir /var/log/nginx/portal-kr chown -R nginx:nginx /var/log/nginx
- 폰트의 수정
-
로그 출력 설정https://portal.cocone.jp/confluence/pages/viewpage.action?pageId=36078372yum install ipa-gothic-fonts.noarch ipa-pgothic-fonts.noarch ipa-mincho-fonts.noarch ipa-pmincho-fonts.noarch mkdir /usr/java/jdk1.8.0_144/jre/lib/fonts/fallback cd /usr/java/jdk1.8.0_144/jre/lib/fonts/fallback cp /usr/share/fonts/*/* .
- 업데이트 처리 개시
-
systemctl start nginx systemctl start tomcat
- 인덱스, 저널 파일 삭제
-
systemctl stop tomcat cd /var/data/confluence/ rm -rf index/* journal/* rm -rf bundled-plugins plugins-cache plugins-osgi-cache plugins-temp mysql -u root -p mysql> use confluence mysql> SELECT COUNT(entry_id) FROM journalentry; mysql> DELETE FROM journalentry; mysql> quit systemctl stop mysqld systemctl start mysqld systemctl start tomcat
- 인덱스의 재구축
admin사용자로 로그온하고, 일반 설정의 콘텐츠 관리보다 인덱스의 재구축을 실시한다. - Add-on의 UPDATE
admin 사용자로 로그인하며 일반 설정의 "Management Add-on", 무료 범위 모두 UPDATE. 또한 이용 불가 플러그인은 Disable로 한다. - 캐시 클리어
admin 사용자로 로그인하고, 일반 설정의 캐시 관리에서, 「모두 삭제」를 실시한다.
728x90
300x250
'IT > Confluence' 카테고리의 다른 글
Confluence 업그레이드 절차 (0) | 2021.08.17 |
---|---|
Confluence mysql percona backup 설정 (0) | 2021.08.12 |
Confluence Upgrade (0) | 2021.08.09 |
Confluence 설정 (0) | 2021.08.09 |
Confluence Maintenance (index 재구축, 캐쉬 클리어) (0) | 2021.08.09 |