Apr 22 2010

phpPgAdmin 사용하기

분류: .Mac, Database, How to, PHP, PostgreSQL최 태현 @ 5:50 오후

If your PostgreSQL server is running on the same server as the webserver, phpPgAdmin’s default configuration will work “out-of-the-box”; if not, you’ll need to edit the configuration file located at conf/config.inc.php. It should be self-explanatory. There’s also a “backup” copy of the installation file “conf/config.inc.php-dist“.

One problem which occurs quite often is the error message “Login disallowed for security reasons“, which occurs when trying to login as a user with an empty password, a common situation on (presumably well-protected) development machines. To enable this kind of login, set the option $conf['owned_only'] in conf/config.inc.php to true.

‘extra_login_security’ =

If extra login security is true, then logins via phpPgAdmin with no password or certain usernames (pgsql, postgres, root, administrator)
will be denied.


Apr 08 2010

Mac OS X Snow Leopard 에서 Oracle 10.g 설치하기

분류: .Mac, How to, Oracle최 태현 @ 12:29 오전

1996년인가  대전광역시 중소기업지원정보시스템 구축사업을 하면서 대전광역시에 오라클을 처음으로 도입했었습니다.

그당시 Ingres DB가 행정망용으로 사용되고 있었는데  Sun Enterprise 에 오라클 DB를 올렸던 기억이 납니다. 그 당시만해도

오라클사에서는 도입만해줘도 무슨 요구든지 들어줬는데 지금은 너무 배짱을 부리는것 같습니다. 유지보수비가 장난이 아니더군요. 그것도 유지보수계약 체결하기 전까지의 모든 비용을 요구하면서… 입맛이 씁쓸합니다.

물론 1998년인가 1999년도에 대전광역시에 시정도우미 라는 내부 인트라넷 서비스를 만들면서 Linux ( 당시 알짜 리눅스 였던것 같은데..)에 MySQL, PHP 를 386PC에 설치하면서 Free Software로 방향을 전환했습니다.

오째든 장난삼아 Oracle을 MacBook에 올려봤습니다.

( 원문 Site 입니다.     ray_apps_blog )

Continue reading “Mac OS X Snow Leopard 에서 Oracle 10.g 설치하기”


Dec 19 2009

Apache2 Error…

분류: Apache2, How to, Server, Ubuntu, Web Server최 태현 @ 10:24 오전

시스템 upgrade후 다음과 같은 오류메세지가 나오면서 apache 접속이 되지 않았다. 그 이유는??? 아직 모르겠다.

starting httpd: (98)address already in use: make_sock: could not bind to address [::]:80
(98)address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
unable to open logs
[failed]

어째든 80port를 무언가 잡아먹는것 같아서 확인해 보니까

$ sudo netstat -anp | grep 80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      3836/apache2
unix  2      [ ACC ]     STREAM     LISTENING     6380     2540/amavisd (maste /var/lib/amavis/amav

apache2가 왜그런지 모르게 별도로 뜨고 있었다. 우선 다음과 같이 Process를 kill하고 다시 올렸다. 시간있을때 이유를 찾아봐야 겠다.

$ ps aux|grep 3836/apache2
solove    4360  0.0  0.0   3368   800 pts/0    R<+  10:10   0:00 grep 3836/apache2
solove@sage:~$ ps aux|grep apache2
root      3820  0.0  0.0   1872   588 tty8     S+   10:03   0:00 /bin/sh -e /etc/rc2.d/S91apache2 start
root      3831  0.0  0.0   1872   532 tty8     S+   10:03   0:00 /bin/sh /usr/sbin/apache2ctl start
root      3836  0.0  0.2  24336  6584 tty8     S+   10:03   0:00 /usr/sbin/apache2 -k start
solove    4363  0.0  0.0   3368   796 pts/0    R<+  10:10   0:00 grep apache2

$ sudo killall apache2
$ ps aux|grep apache2
solove    4407  0.0  0.0   3368   800 pts/0    R<+  10:11   0:00 grep apache2
solove@sage:~$ sudo /etc/init.d/apache2 restart
* Restarting web server apache2                                                                                                       Apache/2.2.11 mod_ssl/2.2.11 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide the pass phrases.

Server trac.sourceforge.kr:443 (RSA)
Enter pass phrase:

OK: Pass Phrase Dialog successful.


Nov 13 2009

Oracle SQL Developer 설치하기

분류: Database, How to, Ubuntu최 태현 @ 11:38 오전

Oracle SQL Developer is a free SQL development environment from Oracle. It provides a graphical tool to interact with your database. Furthermore, it is a complete standalone application thus neither SQL*Plus or Oracle Database Client software need to be installed beforehand in order to use it.

It does however, require that the Sun Java 6 JDK be installed on your system. Install it by typing:
sudo apt-get install sun-java6-jdk

Note:
You may also use OpenJDK

To obtain the installable package, navigate to Oracle’s SQL Developer download page at:
http://www.oracle.com/technology/software/products/sql/index.html

You must agree to the OTN License Agreement for SQL Developer in order to download the software. Once doing so, choose the Accept License Agreement radio button.

Scroll down and select the package entitled ‘Oracle SQL Developer RPM for Linux’ to download the package.

Note:
If you do not have an account with the Oracle Technology Network, go ahead and create one. It’s free and also required in order to download the package.

Next we will convert the .rpm to a .deb to install it in Ubuntu. We’ll do this by using an application called ‘alien’. Install it by typing:
sudo apt-get install alien

Next, navigate to where you saved the SQL Developer .rpm package and type:
sudo alien -k –scripts sqldeveloper*.rpm

This will create a .deb package ready to be installed into our system. We do so by typing:
sudo dpkg -i sqldeveloper*.deb

Oracle SQL Developer is now installed. However, in order to run it, we need to point it to the JDK. Failure to do so, will result in the following message when trying to run Oracle SQL Developer:

Oracle SQL Developer
Copyright (c) 2008, Oracle. All rights reserved.

Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path will be stored in ~/.sqldeveloper/jdk

Looking at the message we can see that it’s trying to obtain the JDK path by reading a file called ‘jdk’ in a directory called ‘~/.sqldeveloper’. Let’s resolve this dependency.

First we’ll create the missing directory by typing:
mkdir -p ~/.sqldeveloper

Next we’ll create an empty jdk file by typing:
touch ~/.sqldeveloper/jdk

Edit this file and input the path to the JDK by typing:
gedit ~/.sqldeveloper/jdk
and pasting into it:
/usr/lib/jvm/java-6-sun

You may now run Oracle SQL Developer by typing:
sqldeveloper
Or by going to:
Applications > Programming > SQL Developer

You may also go ahead and delete the .rpm downloaded and subsequent .deb that was created.

Tags: , ,


Jul 04 2009

PHP include_path 설정하기

분류: How to, PHP최 태현 @ 1:08 오전
  1. Edit your PHP configuration file. Inside that file is a directive section for “Paths and Directories.” You can change that value to whatever you like or add to (or eliminate) the default like this:
    include_path = .:/usr/local/lib/php:./include

    The above must be entered all on one line, with no linebreaks. The above will cause php scripts to search for a directory named “include”, and will look for it under the current directory of the running script in addition to the default, which is to first search the current directory and then search the /usr/local/lib/php directory (which is a system directory that is not writeable by you and is reserved for things like PEAR).

    The format of the include_path variable is a list of directories separated with a colon. A “.” (a period) in the include path means the current directory, and allows for relative includes. More information is available here.

    Use the function ini_set(). For example if you wanted to set your PHP include_path to “.:../:./include:../include” then you would do this in your PHP code:

    ini_set(”include_path”, “.:../:./include:../include”);

    You can also use ini_set() to affect other PHP settings like auto_prepend_file, auto_append_file, error_reporting, etc.

Tags: ,


Jun 19 2009

Trac에서 한글설정

분류: CDE, How to, Trac최 태현 @ 9:26 오전

Trac과 Subversion을 연동하여 설치하고 기존 프로그램 Source를 옮겼는데 한글이 깨져나와서 찾아 봤습니다.

  • cd  /data1/u-service.kr/trac/lavendar/conf
  • sudo vi trac.ini
  • 다음 부문을 하단부의 [trac] 부문에 추가

default_charset = euc-kr

utf8을 선호한다면 이부분을 euc-kr를 utf8로 바꾸면 됩니다.

크득~크득~ 잘 나옵니다. 이런 기분때문에 삽질하는게 아닐까요?????

Tags:


Jun 12 2009

Oracle xe 환경설정하기(Tora 접속방법)

분류: Database, How to, Ubuntu최 태현 @ 4:21 오전
  1. Go to the following directory:

    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin

  2. Look for the following scripts:
    • oracle_env.csh (for C or tcsh shell)
    • oracle_env.sh (for Bourne, Bash, or Korn shell)
  3. Run the appropriate script for your shell. For example:
    • Bourne, Bash, or Korn shell:
      $ . ./oracle_env.sh
    • C or tcsh shell:
      % source oracle_env.csh

You may also want edit your login or profile files so that these environment variables are set properly each time you log in or open a new shell.

For Bourne, Bash, or Korn shell, enter the following line into the .bash_profile (to log in) or .bashrc file (to open a new shell):

. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

For C or tcsh shell, enter the following line into the .login file (to log in) or .cshrc file (to open a new shell):

source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.csh

Tags: ,


Jun 12 2009

Oracle 접속오류 해결방법

분류: Database, How to최 태현 @ 1:47 오전

Why I got ORA-27121: unable to determine size of
shared memory segment ?

A. The full erros stack:
ERROR:
ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory
segment
Linux Error: 13: Permission denied

This is caused by Oracle installer not setting setuid
on $ORACLE_HOME/bin/oracle.

To fix do:
$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle

Tags: , ,


Jun 11 2009

Tora With Oracle, MySQL

분류: Database, Desktop, How to최 태현 @ 9:54 오후

The “tora” database client package in Feisty Fawn comes with Postgres support, and MySQL if you have the libraries. This How-To shows you how to build Oracle Instantclient 10g support into tora.

This is client only. You will not install the whole Oracle database.

BTW, if you don’t have time to build the whole thing, here is the .deb package I built using this How-To. It’s x386 only, and you’ll need to have instantclient installed before you can use it.

tora_1.3.22-5_i386.deb is an updated .deb package for instantclient 11.1.0.1 and tora 1.3.22.

Continue reading “Tora With Oracle, MySQL”

Tags: , ,


Jun 11 2009

Oracle 10g 설치하기

분류: Database, How to, Ubuntu최 태현 @ 8:42 오후

OCI를 ubuntu에서 설치해보고 아예 오라클 자체를 Desktop에 설치하고 study할때 써보기로 맘 먹었습니다.

  • $ sudo vi /etc/sources.list <- 다음 라인을 맨 끝에 추가
  • deb http://oss.oracle.com/debian unstable main non-free
  • $ sudo wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add -
    $ sudo apt-get update
    $ sudo apt-get install oracle-xe-universal
  • $ sudo /etc/init.d/oracle-xe configure <- 웹 관리 포트 및 리스너 포트, 비밀번호 등을 설정. sid는 기본 xe로 설정되어 있음.
  • $ 웹 브라우저에서 http://localhost:8080/apex 로 접속해서 시험해본다.
  • $ sudo vi /etc/environment
    ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    PATH=$PATH:$ORACLE_HOME/bin
    export ORACLE_HOME
    export ORACLE_SID=XE
    export NLS_LANG=’KOREAN_KOREA.AL32UTF8
  • $ source /etc/environment
  • $ sqlplus ’sys /as sysdba’ 로 접속해서 테스트 해본다.
  • $ sudo /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/nls_lang.sh

첫줄의 #!/bin/sh를 #!/bin/bash로 변경한다.

참고사이트 : http://nameslayer.tistory.com/286

http://ids.snu.ac.kr/wiki/Oracle_Express_Edition

Tags: ,


뒷 쪽 »