실시간 서버의 자원상태를 확인하는 scout realtime
1. 파일 curl 다운로드 ( 실제 파일 다운로드가 진행되지 않는다 2번으로 넘어가서 진행)
1 2 3 4 5 6 |
[root@xinet ~]# curl -L https://get.rvm.io | bash -s stable --ruby % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 22865 100 22865 0 0 15520 0 0:00:01 0:00:01 --:--:-- 15520 Downloading https://github.com/rvm/rvm/archive/1.27.0.tar.gz Downloading https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc |
2. 해당 파일을 다운로드 하려면 에러가 발생된다 수동으로 wget을 이용하여 파일을 다운로드 후 압축 해제 후 설치 진행
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
[root@xinet ~]# wget https://github.com/rvm/rvm/archive/1.27.0.tar.gz [root@xinet ~]# tar xvfz 1.27.0 [root@xinet ~]# cd rvm-1.27.0/ 설치를 진행하자 [root@xinet rvm-1.27.0]# ./install Creating group 'rvm' Installing RVM to /usr/local/rvm/ Installation of RVM in /usr/local/rvm/ is almost complete: * First you need to add all users that will be using rvm to 'rvm' group, and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`. * To start using RVM you need to run `source /etc/profile.d/rvm.sh` in all your open shell windows, in rare cases you need to reopen all shell windows. # Administrator, # # Thank you for using RVM! # We sincerely hope that RVM helps to make your life easier and more enjoyable!!! # # ~Wayne, Michal & team. In case of problems: https://rvm.io/help and https://twitter.com/rvm_io |
2. ruby를 설치하기 위해서 proifie 적용 ( /etc/profild.d/rvm.sh 파일을 생성되어 있다 이것을 적용하고 설치 진행
역기서 ruby 관련 설치 명령어 안내
rvm install 버전 -> 해당버전을 설치한다
ruby –version -> 해당버전을 확인한다
rvm list -> 설치된 ruby 목록을 출력한다
rvm remove ruby버전 -> 설치된 ruby 삭제
rvm info -> 현재 설정된 ruby의 자세한 설정 정보 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
[root@xinet rvm-1.27.0]# source /etc/profile.d/rvm.sh [root@xinet rvm-1.27.0]# rvm install 2.3.1 Searching for binary rubies, this might take some time. No binary rubies available for: centos/6/x86_64/ruby-2.3.1. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for centos. Installing requirements for centos. Installing required packages: libyaml-devel, readline-devel, libffi-devel, sqlite-devel......... Requirements installation successful. Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.3.1, this may take a while depending on your cpu(s)... ruby-2.3.1 - #downloading ruby-2.3.1, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 13.7M 100 13.7M 0 0 7191k 0 0:00:01 0:00:01 --:--:-- 9510k No checksum for downloaded archive, recording checksum in user configuration. ruby-2.3.1 - #extracting ruby-2.3.1 to /usr/local/rvm/src/ruby-2.3.1.... ruby-2.3.1 - #configuring.......................................................... ruby-2.3.1 - #post-configuration.. ruby-2.3.1 - #compiling...................................................................................... ruby-2.3.1 - #installing........................... ruby-2.3.1 - #making binaries executable.. Installed rubygems 2.5.1 is newer than 2.4.8 provided with installed ruby, skipping installation, use --force to force installation. ruby-2.3.1 - #gemset created /usr/local/rvm/gems/ruby-2.3.1@global ruby-2.3.1 - #importing gemset /usr/local/rvm/gemsets/global.gems............................................... ruby-2.3.1 - #generating global wrappers........ ruby-2.3.1 - #gemset created /usr/local/rvm/gems/ruby-2.3.1 ruby-2.3.1 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem list ruby-2.3.1 - #generating default wrappers........ ruby-2.3.1 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake). Install of ruby-2.3.1 - #complete Ruby was built without documentation, to build it run: rvm docs generate-ri |
3. 이제 ruby 가 설치되었으므로 scout realtime을 설치 하자
1 2 3 4 5 6 7 8 9 10 11 |
[root@xinet rvm-1.27.0]# gem install scout_realtime Fetching: server_metrics-1.2.14.gem (100%) Successfully installed server_metrics-1.2.14 Fetching: scout_realtime-1.0.5.gem (100%) Successfully installed scout_realtime-1.0.5 Parsing documentation for server_metrics-1.2.14 Installing ri documentation for server_metrics-1.2.14 Parsing documentation for scout_realtime-1.0.5 Installing ri documentation for scout_realtime-1.0.5 Done installing documentation for server_metrics, scout_realtime after 21 seconds 2 gems installed |
4. 설치가 완료되었면 scout realtime을 실행시키자
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@xinet rvm-1.27.0]# scout_realtime start start Daemon has started successfully To view in your browser, do ONE of the following: A) create an SSH tunnel: ssh -NL 5555:localhost:5555 user@ip_or_hostname (run that command on your own computer, not the server) then point your browser to: http://localhost:5555 --- OR --- B) open a port in your firewall: sudo iptables -A INPUT -p tcp --dport 5555 -j ACCEPT (run that command on your server) then point your browser to: http://your-ip-or-hostname:5555 * FYI, the log file is: /root/.scout/scout_realtime.log * "scout_realtime stop" to stop the daemon8.10.255 |
5. 방화벽에서 5555포트를 허용해야 한다 그리고 웹에서 실행하면 다음과 같이 실시간 서버 모니터링을 확인할수 있다
http://ip:5555