솔라리스 10에서 vmware-tools 설치

2009/02/10 00:14
1. VM –> Instal VMWare Tools
2. Click install
3. Launch –> Applications –> Utilities –> Terminal
4. cp /cdrom/vmwaretoos/vmware-solaris-tools.tar.gz /tmp/
5. cd /tmp
6. gunzip vmware-solaris-tools.tar.gz
7. tar xvf vmware-solaris-tools.tar
8. cd vmware-tools-distrib
9. ./vmware-install.pl
10. Enter to accept default directory at /usr/bin
11. Enter to accept default directory at /etc
12. Enter to accept default directory at /etc/init.d
13. Enter to accept default directory at /usr/sbin
14. Enter to accept default directory at /usr/lib/vmware-tools
15. Enter to accept creating the directory
16. Enter to accept default documentation directory at /usr/share/doc/vmware-tools
17. Enter to accept creating the directory
18. Enter to accept executing /usr/bin/vmware-cofnig-tools.pl
19. Enter to accept creation of /etc/X11/xorg.conf file
20. Enter the appropriate number that represent the correct resolution for your monitor.
21. Restart X session or reboot
이올린에 북마크하기

happyness Server Management ,

2009/02/10 00:14 2009/02/10 00:14
[로그인][오픈아이디란?]

The Complete RRDTool-based Graphing Solution Part III

2008/06/18 20:05
이제 기본적으로 cacti가 실행될 환경이 만들어 졌다.
순서대로 cacti를 설치한다.

1. 설치전 작업

$ ln -s /usr/local/rrdtool/bin/rrdtool /usr/local/bin/rrdtool
$ ln -s /usr/local/php/bin/php /usr/local/bin/php

rrdtool: /usr/local/rrdtool 에 설치되었다 가정
php: /usr/local/php 에 설치되었다 가정.

2. cacti 프로그램 압축해제
웹서비스가 될 저장소는 /data4/httpdata 로 정한다.
$ tar -xvzf cacti-0.8.7b.tar.gz
$ mv cacti-0.8.7b cacti

3. PHP 설정
/etc/php.ini 파일을 열어서 extension_dir을 찾아 extension_dir = "./"을  extension_dir = /etc/php.d 로 입력 /etc 하위에 php.d 디렉토리 생성 후 mysql.ini , snmp.ini를 생성한다.
$ mkdir /etc/php.d
$ touch /etc/php.d/mysql.ini
$ touch /etc/php.d/snmp.ini

mysql.ini에 아래와 같이 추가
; Enable mysql extension module
extension=mysql.so

snmp.ini에 아래와 같이 추가
; Enable snmp extension module
extension=snmp.so


참고: PHP 4.3.5 또는 이하 버전을 사용하는 경우 아래 라인을 추가하며, 그 이상 버전의 경우 삭제한다.
session.save_path=/tmp

템블릿을 업로딩 할 경우 아래 업로드 옵션이 설정되어 있는지 확인한다.
file_uploads = On

3. Apache 설정
Apache와 PHP가 정상적으로 설치된 경우 별도 설정할 것이 없으며, DirectoryIndexindex.php가 설정되어 있는지 확인 한후 Apache를 재시작 한다.

4. MySQL 설정
cacti가 설치된 디렉토리로 이동하여 데이터 베이스를 설정한다.
$ cd /data4/httpdata/cacti
$ mysql -u root -p
mysql> create database cacti;
mysql> use cacti;
mysql> source cacti.sql;
mysql> GRANT ALL ON cacti.* TO
cactiuser@localhost IDENTIFIED BY 'cacti';
mysql> flush privileges;


5. cacti 데이터 베이스 환경설정
다운받아 압축을 푼 cacti 디렉토리의 include/config.php 파일을 열어 위에서 생성한 접속정보를 넣어준다.
# Edit include/config.php and specify the database type, name, host, user and password for your Cacti configuration.
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";


6. crontab 설정
데이터를 수집하기 위해 /ect/crontab 을 열어 아래 라인을 추가한다. 5분에 한번씩 데이터를 수집한다.
*/5 * * * * httpdusr php /data4/httpdata/cacti/poller.php > /dev/null 2>&1

참고: httpduser는 Apache를 실행하는 사용자로 등록하였으나, 그렇지 않은 경우, rralog 디렉토리를 httpduser가 쓰기 가능한 권한을 설정해야 한다.

7. cacti 시작
http://[yourdomain]/cacti 로 접속한다.
최초 접속하게 되면 기본 환경설정 페이지가 나타나며, 이 스텝을 완료하고 난후 cacti에 로그인 할 수 있다. 접속 계정은 admin/admin이며, 최초 접속시 암호를 변경해야 한다.
cacti step 1
[Step 1: 최초 접속화면]


cacti step 2
[Step 2: 신규설치 인지 업그레이드인지 선택, 여기서는 신규설치 선택]


cacti step 3
[Step 3: cacti가 사용할 기본 프로그램 위치 설정]

RRDTool Utility Version은 1.2.x를 선택한다. 아직 1.3.0은 지원되지 않고 있다.

cacti step 4
[Step 4: 첫 로그인 화면, admin/admin으로 로그인한다.]


cacti step 5
[Step 5: 암호를 재설정하라는 메시지가 출력된다]


cacti step 6
[Step 6: 환경설정이 모두 끝나 cacti의 첫 화면이 나타났다.]


이올린에 북마크하기(0) 이올린에 추천하기(0)

happyness Server Management ,

2008/06/18 20:05 2008/06/18 20:05
[로그인][오픈아이디란?]

The Complete RRDTool-based Graphing Solution Part II

2008/06/15 16:16
여기서는 cacti가 동작하기 위한 필요 팩키지 설치에 대하여 알아본다.
각 배포본에 따른 환경이 조금씩 다를 수 있으며,  오래된 배포본일 수록 설치된 팩키지를 업그레이드 해야 할 수도 있다.

본 설치환경은 Fedora Core 4이다.

리눅스에서 cacti 실행환경 및 의존성
cacti         cacti-0.8.7b.tar.gz
  Apache       httpd-2.0.63.tar.gz
    PHP     php-4.4.8.tar.gz
  MySQL       mysql-5.0.51b.tar.gz
  RRDTool       rrdtool-1.3.0.tar.gz
    cairo     cairo-1.6.4.tar.gz
      pixman   pixman-0.11.4.tar.gz
      freetype   freetype-2.3.6.tar.gz
      fontconfig   fontconfig-2.6.0.tar.gz
    pango     pango-1.21.0.tar.gz
      glib2   glib-2.16.3.tar.gz
  Net-SNMP       net-snmp-5.4.1.1.tar.gz
    beecrypt     beecrypt-devel-4.1.2-8.i386.rpm
    elfutils-libelf-devel     elfutils-libelf-devel-0.108-1.i386.rpm

프로그램 설치
1. 사전 작업
버전 업그레이드 및 설치시 라이브러리를 참조하지 못하는 팩키지는 삭제한후 소스를 다운받아 build한다.
fontconfig-2.2.3-13
freetype-2.1.9-2
freetype-devel-2.1.9-2
glib2-devel-2.6.6-1
glib2-2.6.6-1
pango-1.8.1-2


삭제 방법: 의존성으로 인하여 다른 팩키지를 삭제할 수 있으므로 --nodeps 옵션을 준다.
# rpm -e --nodeps fontconfig-2.2.3-13


2. 설치
컴파일시 라이브러리를 찾지 못 할 수 있으므로 아래와 같이 설정한다.
# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig


각 라이브러리는 의존성 및 버전에 영향을 받으므로 최하단 부터 설치한다.
rrdtool-1.3rc9
cairo-1.6.4
pixman-0.11.4
freetype-2.3.5
fontconfig-2.6.0
- 소스 컴파일한 위치에서 fontconfig.pc 파일을 /usr/local/lib/pkgconfig로 복사
pango-1.21.2
glib-2.15.4

net-snmp-5.4.1.1
컴파일시 Perl 버전과 매치되지 않아 메시지가 출력되면 아래와 같이 세팅한다.
버전을 맞추어도 된다.
# export NETSNMP_DONT_CHECK_VERSION=1

아래 패키지가 필요하다 다운받아 설치한다.
beecrypt-devel-4.1.2-8.i386.rpm
elfutils-libelf-devel-0.108-1.i386.rpm

./configure
./make
./make install

PHP
net-snmp를 사용하려면 snmp 기능을 사용하기 위해 '--with-snmp' 옵션을 사용해야 한다.
snmp 옵션이 사용되었는지는 phpinfo() 함수를 이용하여 알 수 있다.


3. 환경설정
net-snmp
    컴파일후 소스 디렉토리에 있는 EXAMPLE.conf를 /usr/local/share/snmp에 snmpd.conf로 복사한다.
cp EXAMPLE.CONF /usr/local/share/snmp

   /etc/init.d 에 snmpd 파일을 아래와 같이 생성한다.
#!/bin/sh
#
# Start snmpd
#
start() {
export LD_LIBRARY_PATH=.:/lib:/usr/lib:/usr/local/lib
echo "Starting SNMPD"
/usr/local/sbin/snmpd -c /usr/local/share/snmp/snmpd.conf
}
stop() {
echo "Stopping SNMPD"
killall snmpd > /dev/null 2>&1
killall snmpd > /dev/null 2>&1
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
cleanup)
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?


이로서 cacti를 사용할 기본적인 팩키지를 모두 설치했다.
다음 Part에서 cacti를 설치해본다.

이올린에 북마크하기(0) 이올린에 추천하기(0)

happyness Server Management ,

2008/06/15 16:16 2008/06/15 16:16
[로그인][오픈아이디란?]

The Complete RRDTool-based Graphing Solution Part I

2008/06/14 01:03
시스템 모니터링 툴로 MRTG를 대체하는 RRDTool이 있고, 이것을 많이 사용하고 있다. 초보인 나로서는 RRDTool을 설치하고, 설정하여 그래핑하는 일은 쉬운일이 아니다.
이런 일련의 일을 보다 쉽게 시스템 상황을 그래프화 할 수 있는 cacti툴은 Apache, PHP, MySQL, NET-SNMP 기반으로 동작하며, MySQL을 이용한 데이터 소스 관리, RRDTool을 이용한 그래프 생성, 사용자 관리등을 지원한다. 특히 템플릿을 통한 데이터소스 및 그래프 지원은 cacti를 무한히 확장할 수 있도록 도와준다.

What is cacti
cacti
Cacti is a complete frontend to RRDTool, it stores all of the necessary information to create graphs and populate them with data in a MySQL database. The frontend is completely PHP driven. Along with being able to maintain Graphs, Data Sources, and Round Robin Archives in a database, cacti handles the data gathering. There is also SNMP support for those used to creating traffic graphs with MRTG.


Data Sources
To handle data gathering, you can feed cacti the paths to any external script/command along with any data that the user will need to "fill in", cacti will then gather this data in a cron-job and populate a MySQL database/the round robin archives.

Data Sources can also be created, which correspond to actual data on the graph. For instance, if a user would want to graph the ping times to a host, you could create a data source utilizing a script that pings a host and returns it's value in milliseconds. After defining options for RRDTool such as how to store the data you will be able to define any additional information that the data input source requires, such as a host to ping in this case. Once a data source is created, it is automatically maintained at 5 minute intervals.

Graphs
Once one or more data sources are defined, an RRDTool graph can be created using the data. Cacti allows you to create almost any imaginable RRDTool graph using all of the standard RRDTool graph types and consolidation functions. A color selection area and automatic text padding function also aid in the creation of graphs to make the process easier.

Not only can you create RRDTool based graphs in cacti, but there are many ways to display them. Along with a standard "list view" and a "preview mode", which resembles the RRDTool frontend 14all, there is a "tree view", which allows you to put graphs onto a hierarchical tree for organizational purposes.

User Management
Due to the many functions of cacti, a user based management tool is built in so you can add users and give them rights to certain areas of cacti. This would allow someone to create some users that can change graph parameters, while others can only view graphs. Each user also maintains their own settings when it comes to viewing graphs.

Templating
Lastly, cacti is able to scale to a large number of data sources and graphs through the use of templates. This allows the creation of a single graph or data source template which defines any graph or data source associated with it. Host templates enable you to define the capabilities of a host so cacti can poll it for information upon the addition of a new host.


이올린에 북마크하기(0) 이올린에 추천하기(0)

happyness Server Management ,

2008/06/14 01:03 2008/06/14 01:03
[로그인][오픈아이디란?]

APM 설치하기

2007/04/27 18:13

Linux 박스에 APM을 설치하면서 설치 순서 및 설정 방법을 정리하였다.
프로그램 소스를 이용하여 설치하는 방법을 사용하였으며, 해당소스는 해당 사이트에서 최신 버전을 다운받았다. 설치는 root로 진행.

1. mysql
사용자를 등록하지 않고 root 사용자를 사용해도 되겠지만, 우선 프로그램을 설치하기전에 사용자와 그룹을 등록해야 한다.
등록할 사용자는 자신이 원하는 ID를 주면 되겠다. 여기서는 mysqld를 사용한다.

설치 디렉토리, 문자셑, 사용할 사용자를 설정하여 컴파일, 설치한다.

#./configure --prefix=/usr/local/mysql --with-charset=euckr --with-mysqld-user=mysqld
#make
#make install

설치가 끝났다면 최초의 데이터베이스를 생성한다.
옵션을 지정하지 않으면 컴파일시 지정한 디렉토리인 /usr/local/mysql 하에 생기게된다.
아래는 mysql의 시작 디렉토리, 데이터 디렉토리, 데몬을 시작하는 사용자 옵션을 주었다.

#./scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/data/mysqld/var --user=mysqld

데이터 베이스가 설치되었다면 데이터 베이스 실행한다.
mysql이 서버가 재시작할때 마다 시작하고 싶다면 재시작 방법을 따른다.
#/usr/local/mysql/bin/mysqld_safe --basedir=/usr/local/mysql --datadir=/home/mysqld/var --user=mysqld &

=> mysql이 자동으로 시작될 수 있도록 등록
#cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
#chkconfig --add mysqld
#/etc/init.d/mysql start

mysql이 정상적으로 설치되고, 실행되었다면 mysql의 root 유저 암호를 변경한다.
#/usr/local/mysql/bin/mysqladmin -u root password 'new-pwd'
#/usr/local/mysql/bin/mysqladmin -u root -h servername password 'new-pwd'


2. apache
mysql과 같이 apache에 사용할 사용자와 그룹을 등록한다.

설치 디렉토리, PHP를 사용할 예정이므로  `--enable-module=so --enable-shared=max`을 주었다.

#./configure --prefix=/usr/local/apache --enable-module=so --enable-shared=max --enable-rewrite
#make
#make install

apache에 사용할 사용자를 /usr/local/apache/conf/httpd.conf를 열어 User, Group을 찾아 수정한다.

<IfModule !mpm_netware_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User httpd
Group mgrgrp
</IfModule>

apache도 mysql과 마찬가지로 서버 재시작시 자동으로 시작될 수 있도록 등록한다.
#cp /usr/local/apache/bin/apachectl /etc/init.d/httpd

chkconfig가 apache 스크립트를 인식하지 못하기 때문에 httpd를 열어 아래와 같이 추가한다.
# Comments to support chkconfig on RedHat Linux
# chkconfig: 2345 90 90
# description: A very fast and reliable WebServer engine.

위와 같이 등록한 후 httpd 추가한다.
#chkconfig --add httpd
#/etc/init.d/httpd start


3. php
사용할 프로그램이 PHP5를 지원하지 않아 PHP 4.4.6을 설치하였다.

apache를 사용하는 옵션 --with-apache는 기본으로 /usr/local/apache로 되어 있으므로 생략해도 된다.
#./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs
#make
#make install

php.ini는 소스(php-4.4.6)로 설치한 경우 기본 경로가 /usr/local/php/lib이므로 이곳으로 복사한다.
#cp php.ini-dist /usr/local/php/lib/php.ini

httpd.conf를 열어 php와 관련된 부분을 추가한다.
PHP를 로드하는 `LoadModule php4_module modules/libphp4.so`은 PHP를 설치할때 자동으로 추가되므로 type만 추가해주도록 한다.

    AddType application/x-httpd-php .php .html .inc
    AddType application/x-httpd-php-source .phps

설정을 저장한 후 apache 재시작한다.
#/etc/init.d/httpd restart

이올린에 북마크하기(0) 이올린에 추천하기(0)

happyness Server Management , ,

2007/04/27 18:13 2007/04/27 18:13
[로그인][오픈아이디란?]