728x90
수동으로 MySQL  설치하는 방법입니다.
 
http://www.mysql.org/downloads/mysql/5.0.html#win32
 
실행

cd C:\mysql-5.0.37-win32\bin

C:\mysql-5.0.37-win32\bin>mysqld.exe
 
설치 확인

cd C:\mysql-5.0.37-win32\bin

C:\mysql-5.0.37-win32\bin>mysqladmin version
mysqladmin  Ver 8.41 Distrib 5.0.37, for Win32 on ia32
Copyright (C) 2000-2006 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          5.0.37-community
Protocol version        10
Connection              localhost via TCP/IP
TCP port                3306
Uptime:                 43 sec

Threads: 1  Questions: 1  Slow queries: 0  Opens: 12  Flush tables: 1  Open tabl
es: 6  Queries per second avg: 0.023
 
mysqlshow

C:\mysql-5.0.37-win32\bin>mysqlshow
+--------------------+
|     Databases      |
+--------------------+
| information_schema |
| test               |
+--------------------+

C:\mysql-5.0.37-win32\bin>mysqlshow test
Database: test
+--------+
| Tables |
+--------+
+--------+
 
MY_DB라는 데이타베이스 생성

C:\mysql-5.0.37-win32\bin>mysqladmin -uroot create MY_DB

C:\mysql-5.0.37-win32\bin>mysqlshow
+--------------------+
|     Databases      |
+--------------------+
| information_schema |
| test               |
+--------------------+
 
중지

C:\mysql-5.0.37-win32\bin>mysqladmin -u root shutdown
 
PATH 에 추가

C:\mysql-5.0.37-win32\bin
 
C:\Windows\mysql.ini 작성

[mysqld]
# set basedir to your installation path
basedir=C:\mysql-5.0.37-win32
# set datadir to the location of your data directory
datadir=C:\mysql-5.0.37-win32\data
 
NT 서비스 등록

C:\mysql-5.0.37-win32\bin>mysqld-nt.exe --install MySQL --defaults-file=%WINDIR%\mysql.ini
Service successfully installed.
 
NT 서비스 제거

C:\mysql-5.0.37-win32\bin>mysqld-nt.exe --remove
Service successfully removed.
728x90
728x90
Install
	
1. Registry 등록
(HKLM\Software\Firebird Project\Firebird Server\Instances)

C:\Firebird\bin>instreg.exe install
Firebird has been successfully installed in the registry.

2. NT 서비스 등록

C:\Firebird\bin>instsvc.exe install
Service "Firebird Server - DefaultInstance" successfully created.

※ CS(Classic Server) 인 경우

C:\Firebird\bin>instsvc.exe install -classic
Service "Firebird Server - DefaultInstance" successfully created.

3. Client 라이브러리 설치

  • fbclient.dll 인스톨 C:\Firebird\bin>instclient.exe i f FBCLIENT.DLL has been installed to the System directory.
  • gds32.dll 인스톨 C:\Firebird\bin>instclient i g GDS32.DLL has been installed to the System directory. Uninstallation 1. NT 서비스 종료 C:\Firebird\bin>instsvc.exe stop Service "Firebird Server - DefaultInstance" successfully stopped. 2. NT 서비스 제거 C:\Firebird\bin>instsvc.exe remove Service "Firebird Server - DefaultInstance" successfully deleted. 3. Registry 정보 제거 C:\Firebird\bin>instreg.exe remove Firebird has been successfully deleted from the registry. 4. Client 라이브러리 제거
  • fbclient.dll 제거 C:\Firebird\bin>instclient r f The FBCLIENT.DLL has been removed from the System directory.
  • gds32.dll 제거 C:\Firebird\bin>instclient r g The GDS32.DLL has been removed from the System directory. 접속 C:\Firebird\bin>fbserver.exe -a C:\Firebird\bin>gsec -user sysdba -password masterkey GSEC> Changing the SYSDBA password C:\Firebird\bin>gsec -user sysdba -pass masterkey -mo sysdba -pw asdf1234 사용자 생성 GSEC> add testuser -pw testpw 사용자 조회 GSEC> di user name uid gid full name ------------------------------------------------------------------------------------------ SYSDBA 0 0 Sql Server Administrator TESTUSER 0 0 GSEC> quit 데이타베이스 생성 C:\Firebird>bin\isql Use CONNECT or CREATE DATABASE to specify a database SQL> create database 'C:\Firebird\data\test.fdb' user 'TESTUSER' password 'testpw' page_size 8192 default character set UNICODE_FSS; 데이타베이스 접속 C:\Firebird>bin\isql Use CONNECT or CREATE DATABASE to specify a database SQL> connect 'C:\Firebird\data\test.fdb' user 'TESTUSER' password 'testpw'; Database: 'C:\Firebird\data\test.fdb', User: TESTUSER SQL>
  • 728x90
    728x90
    참고 사이트

    http://www.hqunix.com/wp/?p=266
    http://blog.naver.com/ladom/60026225972
    http://www.linux.com/guides/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/chap27sec224.shtml

    사용자 만들기

    C:\Documents and Settings\bluesanta>net user postgres 1234 /add
    명령을 잘 실행했습니다.

    postgres 사용자로 cmd 실행하기

    C:\Documents and Settings\bluesanta>runas /user:postgres cmd
    postgres의 암호 입력:
    cmd을(를) 사용자 "SHRYU\postgres"(으)로 시작하려고 합니다...

    데이타베이스 생성

    C:\WINDOWS\system32>cd \pgsql

    C:\pgsql>path C:\pgsql\lib;%path%

    C:\pgsql>bin\initdb -D data -E unicode --no-locale
    이 데이터베이스 시스템에서 만들어지는 파일들은 그 소유주가 "postgres" id로
    지정될 것입니다. 또한 이 사용자는 서버 프로세스의 소유주가 됩니다.

    데이터베이스 클러스터는 C 로케일로 초기화 될 것입니다.

    data 디렉토리 만드는 중 ...완료
    data/global 디렉토리 만드는 중 ... 완료
    data/pg_xlog 디렉토리 만드는 중 ... 완료
    data/pg_xlog/archive_status 디렉토리 만드는 중 ... 완료
    data/pg_clog 디렉토리 만드는 중 ... 완료
    data/pg_subtrans 디렉토리 만드는 중 ... 완료
    data/pg_twophase 디렉토리 만드는 중 ... 완료
    data/pg_multixact/members 디렉토리 만드는 중 ... 완료
    data/pg_multixact/offsets 디렉토리 만드는 중 ... 완료
    data/base 디렉토리 만드는 중 ... 완료
    data/base/1 디렉토리 만드는 중 ... 완료
    data/pg_tblspc 디렉토리 만드는 중 ... 완료
    max_connections 초기값을 선택하는 중 ...100
    shared_buffers 초기값을 선택하는 중 ...1000
    환경설정 파일을 만드는 중 ...완료
    data/base/1 안에 template1 데이터베이스를 만드는 중 ...완료
    initializing pg_authid ... 완료
    시스템 테이블들을 위한 제한 없는 로우 크기를 활성화 하고 있음 ...완료
    initializing dependencies ... 완료
    시스템 뷰들을 만드는 중 ... 완료
    pg_description 자료 입력 중 ...완료
    인코딩 변환규칙(conversion)들을 만드는 중 ...완료
    내장객체들의 접근 권한을 설정 중 ... 완료
    information schema 만드는 중 ...완료
    template1 데이터베이스 vacuum 작업 중 ...완료
    template1 데이터베이스를 template0 데이터베이스로 복사 중 ...완료
    copying template1 to postgres ... 완료

    경고: 로컬 연결의 인증 방법을 "trust" 방식을 지정했습니다.
    이 값을 바꾸려면, pg_hba.conf 파일을 수정하든지,
    다음번 initdb 명령을 사용할 때, -A 옵션을 사용해서 인증방식을 지정할 수 있습니다
    .

    Success. You can now start the database server using:

        "bin\postmaster" -D "data"
    or
        "bin\pg_ctl" -D "data" -l logfile start


    C:\pgsql>

    NT 서비스에 등록

    C:\Documents and Settings\shryu>cd \pgsql\bin

    C:\pgsql\bin>pg_ctl register -N postmaster -U postgres -P 1234 -D c:\pgsql\data

    PostgreSQL 서버 실행하기

    C:\pgsql\bin>net start postmaster
    postmaster 서비스를 시작합니다..
    postmaster 서비스가 잘 시작되었습니다.

    커맨드 실행

    c:\pgsql\bin\psql -U postgres template1

    외부 스크립트 실행

    c:\pgsql\bin\psql -U postgres < D:\DB_DDL\data.20061014.sql

    Port 수정

    C:\pgsql\data\postgresql.conf

    # 제거후, 수정하고 싶은 Port 번호로 변경하고 데이타베이스 재실행

    #port = 5432

    리눅스 서비스로 등록

    - 서비스에 등록

    [root@localhost ~]# cp postgresql-8.1.4/contrib/start-scripts/linux /etc/rc.d/init.d/postgresql
    [root@localhost ~]# chmod 755 /etc/rc.d/init.d/postgresql
    [root@localhost ~]# chkconfig --add postgresql
    [root@localhost ~]# chkconfig --level 2345 postgresql on

    - /etc/rc.d/init.d/postgresql 수정

    prefix, PGDATA의 경로를 설치되어 있는 경로로 설정합니다.

    prefix=/usr/local/pgsql-8.1.4
    PGDATA=/usr/local/pgsql-8.1.4/data

    - SELinux 비활성화(방화벽으로 실행이 안될경우 사용)

    /etc/selinux/config에 SELINUX=disabled 설정
    728x90

    + Recent posts