본문 바로가기

Linux

[리눅스] Install MongoDB on CentOS6 or Linux Install MongoDB on or CentOS6 Linux 1. Configure the package management system (yum) vim /etc/yum.repos.d/mongodb.repo $ vim /etc/yum.repos.d/mongodb.repo [mongodb-org-2.6] name=MongoDB 2.6 Repository baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ gpgcheck=0 enabled=1 2. Install the MongoDB packages and associated tools yum install -y mongodb-org 3-1. Run MongoDB Community Ed.. 더보기
[리눅스] CentOS 7에서 방화벽(firewalld) 설정하기 CentOS 7에서 방화벽(firewalld) 설정하기 방화벽 실행 여부 확인 firewall-cmd --state $ firewall-cmd --state not running 방화벽 실행 systemctl start firewalld.service 방화벽 실행 여부 확인 firewall-cmd --state $ firewall-cmd --state running FTP 서비스 추가 firewall-cmd --add-service=ftp $ firewall-cmd --add-service=ftp success public에 속한 모든 서비스/포트 목록 출력 firewall-cmd --zone=public --list-all $ firewall-cmd --zone=public --list-all publ.. 더보기
[리눅스] CentOS 7 런레벨(runlevel) 변경 CentOS 7 런레벨(runlevel) 변경 1. RunLevel config 파일 (CentOS 7 부터 systemctl 명령을 통해 RunLevel를 변경하도록 안내) vim /etc/inittab # inittab is no longer used when using systemd. # # ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM. # # Ctrl-Alt-Delete is handled by /usr/lib/systemd/system/ctrl-alt-del.target # # systemd uses 'targets' instead of runlevels. By default, there are two main targets: # .. 더보기
[리눅스] Ansible 일반 계정으로 배포하기 Ansible 일반 계정으로 배포하기 [Control Machine] 1. ansiadmin 계정 ssh keygen 생성 ssh-keygen -t rsa -b 4096 -C "ansiadmin@ass01" 2. ansiadmin 계정 키 교환(192.168.0.252 서버로 배포) ssh-copy-id [email protected] 3. yaml 파일 수정 $ cat roles/common/tasks/main.yml ----- --- # This playbook contains common plays that will be run on all nodes. - name: Install ntp yum: name=ntp state=present tags: ntp become: yes become.. 더보기
Ansible을 설치하고 구성하는 방법 Ansible을 설치하고 구성하는 방법 1. EPEL 패키지 설치 EPEL은 Extra Packages for Enterprise Linux의 약어로 여러 추가 소프트웨어를 제공합니다. sudo yum install epel-release 2. Ansible 패키지 설치 sudo yum install ansible 3. Ansible 버전 확인 ansible --version ansible 2.2.1.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides 4. SSH Keygen 설정 ssh-keygen -t rsa -b 4096 -C "root@ass01" 5. Ansible 키 교환 us.. 더보기
[리눅스] nginx + tomcat(멀티 인스턴스) 설치 nginx + tomcat(멀티 인스턴스) 설치 1. nginx 설치 yum install pcre-devel zlib-devel openssl-devel mkdir /app cd /app/ tar xvfz nginx-1.10.3.tar.gz cd nginx-1.10.3 ./configure --prefix=/app/nginx --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module make && make install cd /app/nginx/sbin/ /app/nginx/sbin/nginx ps -ef | grep nginx $ ps -ef | grep nginx root 12446 1 0 17:33 ? 0.. 더보기
OpenSSL을 소스 코드를 사용하여 컴파일하고 업그레이드하는 방법 OpenSSL을 소스 코드를 사용하여 컴파일하고 업그레이드하는 방법 다운로드 링크(https://www.openssl.org/source/) 1. OpenSSL 소스 코드 다운로드 및 압축 해제 wget https://www.openssl.org/source/openssl-1.1.0e.tar.gz tar xvfz openssl-1.1.0e.tar.gz 2. 컴파일 및 설치 cd openssl-1.1.0e ./config make make install which openssl $ which openssl /usr/local/bin/openssl 3. 라이브러리 등록 export LD_LIBRARY_PATH=/usr/local/lib64 (or) ln -s /usr/local/lib64/libssl.so... 더보기
[리눅스] Citrix Xen 호스트 이름 변경 Citrix Xen 호스트 이름 변경 xe host-list [root@xenserver-woaicbud ~]$ xe host-list uuid ( RO) : 232407a8-fe8b-4574-842e-b5f2b2123b50 name-label ( RW): mgt-xenserver01 name-description ( RW): Default install xe host-set-hostname-live host-uuid=232407a8-fe8b-4574-842e-b5f2b2123b50 host-name=mgt-xenserver01 [root@xenserver-woaicbud ~]$ xe host-set-hostname-live host-uuid=232407a8-fe8b-4574-842e-b5f2b2123b.. 더보기