2011. 10. 21.

ntp client 연동

solaris10 의 경우 서비스 enable
# svcadm enable svc:/network/ntp:default


Linux 종류의 경우 rc script 수정 (해당 내용은 rc script 참고)


< client 설정>


# cp /etc/inet/ntp.client /etc/inet/ntp.conf
# vi /etc/inet/ntp.conf


# ident "@(#)ntp.client 1.3     00/07/17 SMI"
#
# /etc/inet/ntp.client
#
# An example file that could be copied over to /etc/inet/ntp.conf; it
# provides a configuration for a host that passively waits for a server
# to provide NTP packets on the ntp multicast net.
#

#multicastclient 224.0.1.1 <-- 주석 처리

server xxx.xxx.xxx.xxx <-- 원하는 서버 추가
driftfile /etc/ntp.drift <-- driftfile 위치


<확인>
#ntpq -p


     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 xxx.xxx.xxx.xxx  .GPS.            1 u   11   64    7    -0.14  -171803 3875.37
 xxx.xxx.xxx.xxx   .GPS.            1 u   10   64    7    11.57  -171803 3875.67


date









solaris 시각 설정 - ntpdate



# ntpdate xxx.xxx.xxx.xxx

crontab -e

0 02 * * * ntpdate xxx.xxx.xxx.xxx > /dev/null 2> /dev/null

solaris 시간 설정 - rdate


rdate time.bora.net


crontab에 등록


# 새벽 2시에 시간을 동기화 한다.


0 02 * * * rdate 203.254.163.74 > /dev/null 2> /dev/null 

2011. 10. 17.

초간단 mysql insert from text


텍스트 파일을 mysql db에 넣는 방법


1) 명령어 script
# cat import.sql
load data local infile "./user.txt" into table member (필드이름,필드이름,필드이름들...);


2 data file
# cat user.txt

date time MME01 0 349 0.00 680 0.00
date time MME01 1 354 0.00 647 0.00
date time MME01 2 328 0.00 644 0.00
date time MME01 6 395 0.00 726 0.00
date time MME01 7 381 0.00 720 0.00

solaris10 apache2 설정

솔라리스10에서 아파치 설정하기
우선 첫째 솔라리스10에는 아파치가 포함되어있습니다.

보통 이미 구동되고 있으나 약간의 설정이 필요합니다.


1. 아파치 중지

# svcadm disable svc:/network/http:apache2

2. 심플하게 example을 설정으로 복사한다음 일부분만 수정합니다.(쉽습니다.)

# cp /etc/apache2/httpd.conf-example /etc/apache2/httpd.conf

3. 이제 설정 파일을 편집해야지요

/etc/apache2/httpd.conf 을 보다보면

### Section 2: 'Main .... 를 찾으세요.  그바로 다음에 user와 group 을 수정합니다.

User nobody
Group nobody

4. 어드민 메일 주소도 변경하시구요.

ServerAdmin admin@gmail.com (예 입니다.)

5. 아래 설정 값을 Off에서 On으로 변경 합니다.

UseCanonicalName On

7. 아래 'Options Indexes' 부분을 찾아 아래와 같게 수정합니다.

Options Indexes FollowSymLinks MultiViews

8. 아래와 같이 설정하면 서버의 각 사용자 home의 WWW 디렉토리에서 webpage를 만들 수 있습니다. (WWW 디렉토리 권한는 755로 부탁 드립니다.)


UserDir WWW


9. 사용자 page에서 CGI를 사용하게 해 줍니다.


Options +ExecCGI


10.CGI를 enable 시킵니다.

AddHandler cgi-script .cgi .pl

11. web 서버를 enable 시킵니다.
# svcadm enable svc:/network/http:apache2

여기까지 간단 설정입니다.

2011. 10. 14.

Error: Kernel driver not installed (rc=-1908)






CentOS6 VirtualBox4.1.4 설치 후




vboxdrv 가 load 되지 않았다고 뜰때..




아래 실패 case



[root@nuk]# /etc/init.d/vboxdrv setup

Stopping VirtualBox kernel modules [ OK ]

Uninstalling old VirtualBox DKMS kernel modules [ OK ]

Trying to register the VirtualBox kernel modules using DKMSError! echo

Your kernel headers for kernel 2.6.32-131.12.1.el6.i686 cannot be found at

/lib/modules/2.6.32-131.12.1.el6.i686/build or /lib/modules/2.6.32-131.12.1.el6.i686/source.

[실패]

(Failed, trying without DKMS)

Recompiling VirtualBox kernel modules [실패]

(Look at /var/log/vbox-install.log to find out what went wrong)







yum install kernel-pae-devel 하고난 후 성공 case
[root@nuk]# /etc/init.d/vboxdrv setupStopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel modules [ OK ]
Trying to register the VirtualBox kernel modules using DKMS[ OK ]
Starting VirtualBox kernel modules [ OK ]

2011. 10. 13.

solaris 10 기본 mysql 설정법



cat /etc/sfw/mysql/README.solaris.mysql <- 여기에 나온거 그대로 하면 끝
<아래 내용>
To use mysql a number of post-install procedures need to be made by root.
The following steps are derived from the mysql manual (manual.ps, manual.txt or manual_toc.html) found in the /usr/sfw/src/mysql/Docs directory.
Initialise the database tables.
/usr/sfw/bin/mysql_install_db
Create mysql user and group and change data directory group.
groupadd mysql
useradd -g mysql mysql
chgrp -R mysql /var/mysql
chmod -R 770 /var/mysql
installf SUNWmysqlr /var/mysql d 770 root mysql
MySQL reads configuration files from different places in the following order.

Filename                Purpose
---------               ---------
/etc/my.cnf             Global options

DATADIR/my.cnf          Server-specific options

defaults-extra-file     The file specified with
                        --defaults-extra-file=path

~/.my.cnf               User-specific options
Optionally copy a mysql daemon configuration file to configuration directory.
Note there are other configuration profiles available.
For default solaris installation DATADIR is /var/mysql.# cp /usr/sfw/share/mysql/my-medium.cnf /var/mysql/my.cnf
Start mysql daemon by hand
/usr/sfw/sbin/mysqld_safe --user=mysql &
Optionally perform the following steps for automatic start and stop of mysql daemon at boot and shutdown.
Link boot time start up script from rc3.d and rc[012S].d
ln /etc/sfw/mysql/mysql.server /etc/rc3.d/S99mysql
ln /etc/sfw/mysql/mysql.server /etc/rc0.d/K00mysql
ln /etc/sfw/mysql/mysql.server /etc/rc1.d/K00mysql
ln /etc/sfw/mysql/mysql.server /etc/rc2.d/K00mysql
ln /etc/sfw/mysql/mysql.server /etc/rcS.d/K00mysql
reboot
mysql <- 정상 동작 확인
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.0.15-log
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql>

사회 동향] 코로나19 서울 확진자 발생 추이

선거 이후에도 증가 없이 줄어들기를 바라며, 그래프 보여 주는데가 없어서 갱신중 4/17 updated