'CentOS'에 해당되는 글 2건

  1. 2017.09.27 [Cassandra] 설치
  2. 2016.03.24 [LINUX] CentOS 리눅스 yum 사용법
2017. 9. 27. 19:56

0. 환경

 OS: Centos 6

 uname : Linux HyBoostF80 2.6.32-696.3.1.el6.x86_64 #1 SMP Tue May 30 19:52:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


1. 기본 RPM 설치 (http://cassandra.apache.org/download/)

Installation from RPM packages

  • For the <release series> specify the major version number, without dot, and with an appended x.
  • The latest <release series> is 311x.
  • For older releases, the <release series> can be one of 30x22x, or 21x.
  • (Not all versions of Apache Cassandra are available, since building RPMs is a recent addition to the project.)

  • Add the Apache repository of Cassandra to /etc/yum.repos.d/cassandra.repo, for example for the latest 3.11 version:
[cassandra]
name=Apache Cassandra
baseurl=https://www.apache.org/dist/cassandra/redhat/311x/
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.apache.org/dist/cassandra/KEYS
  • Install Cassandra, accepting the gpg key import prompts:
sudo yum install cassandra

Start Cassandra (will not start automatically):

service cassandra start

Systemd based distributions may require to run systemctl daemon-reload once to make Cassandra available as a systemd service. This should happen automatically by running the command above.

Make Cassandra start automatically after reboot:

chkconfig cassandra on

Please note that official RPMs for Apache Cassandra only have been available recently and are not tested thoroughly on all platforms yet. We appreciate your feedback and support and ask you to post details on any issues in the corresponding Jira ticket.



2. cqlsh 에러 처리(https://stackoverflow.com/questions/35197362/unable-to-open-cqlsh-apache-cassandra-importerror-no-module-named-cqlshlib)

다음과 같이 에러가 나오면 
---------------------------------------------------------------------------------------------------------

./cqlsh.py

Traceback (most recent call last):

  File "./cqlsh.py", line 168, in <module>

    from cqlshlib import cql3handling, cqlhandling, pylexotron, sslhandling, cqlshhandling

ImportError: No module named cqlshlib

------------------------------------------------------------------------------------------------------


cqlshlib 라이브러리를 찾을수 없다는 에러이다..

cqlsh.py 파일을 열어서 

---------------------------------------------------------------------------------------------------------

...
import sys
...
from uuid import UUID
sys.path.append("/usr/lib/python2.7/site-packages")  #cqlshlib  파일의 위치를 찾아서 넣어준다.

---------------------------------------------------------------------------------------------------------


Posted by citrine
2016. 3. 24. 09:36

>> 업데이트 목록 보기
# yum list updates 

>> 업데이트 목록의 다운로드 및 업데이트 설치
# yum update –y 

>> 설치된 rpm 패키지 목록 보기
# rpm -qa 
# yum list installed 

>> gcc 패키지 설치여부 확인
# rpm -qa | grep gcc 
# yum list installed gcc 

>> gcc 패키지 설치
# yum install gcc gcc-c++ 

>> gcc 패키지 업데이트
# yum update gcc gcc-c++ 

>> 패키지 이름으로 검색
# yum list 패키지명 
# yum list 정규식 
# yum list gcc 
# yum list gcc* 

>> 여러개의 패키지를 설치
# yum install gcc gcc-c++ 

>> 패키지 삭제
# yum remove gcc gcc-c++ 

>> 설치 가능한 모든 패키지 보기
# yum list all 

>> 패키지 그룹 보기
# yum grouplist 

>> 그룹 패키지 설치
# yum groupinstall "Development Tools" 

>> 그룹 패키지 업데이트
# yum groupupdate "Development Tools" 

>> 그룹 패키지 삭제
# yum groupremove "Development Tools" 

>> 아키텍처 지정 설치 
# yum install mysql.i386 

>> 파일 보유 패키지명 확인
# rpm -qf /etc/passwd 
# yum whatprovides /etc/passwd 

>> 맨페이지 보기
# man yum 

>> yum 미러 서버중 속도가 빠른 서버를 자동으로 찾아서 연결 (yum fastestmirror 패키지를 설치)
Cent OS 4.X 
# yum install yum-plugin-fastestmirror -y 
Cent OS 5.X 
# yum install yum-fastestmirror –y 

>> rpmforge 저장소 사용
기본제공 rpm이외의 추가적인 rpm 패키지를 사용하고자 한다면 rpmforge를 이용

Posted by citrine