자료는 있지만 꼭 맞는 자료는 없다.
웹개발자로 살면 오라클 설치는 피할 수 없는 임무중 하나인듯 하다.
centos 6.6을 먼저 설치했다.
인터넷을 설정하고 필수 팩키지를 설치한다.
yum groupinstall "X Window System"
yum install glibc.i686
yum install compat-gcc-32
yum install compat-db
yum install libaio-devel
yum install sysstat
4. Changing redhat-release file
One of the first checks performed by the Oracle Universal Installer
(OUI) is to determine if the host platform is supported. The OUI uses
the file /etc/redhat-release to determine the platform. For the
case of Red Hat Enterprise Linux, Oracle Database 10g Release 2 expects
either RHEL 3 or RHEL/OEL 4.
The easiest way to get around this error is to modify the
/etc/redhat-release file replacing the current release information
(CentOS release 5 (Final)) with the following:
redhat-4
Before modifying /etc/redhat-release, make a backup copy of
the file and ensure to replace the original one after the Oracle
installation and patch process has been completed.
cp /etc/redhat-release /etc/redhat-release.original
echo "redhat-4" > /etc/redhat-release
After all these configurations, you should get this result:
export EDITOR=vim
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9204
export ORACLE_OWNER=oracle
export ORACLE_TERM=xterm
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib:$LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/usr/sbin:$ORACLE_HOME/Apache/bin:$PATH
export NLS_LANG=KOREAN_KOREA.KO16KSC5601
export LANG=C
export THREADS_FLAG=native
#SID
export ORACLE_SID=TESTDB
Installing an SSH server on Windows 2000 or Windows XP
Cygwin is a collection of free software tools originally developed by Cygnus Solutions to allow various versions of Microsoft Windows to act somewhat like a UNIX system. It is a Linux-like environment for Windows that consists of two parts - a DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial POSIX system call functionality and a collection of tools.Install Cygwin and the SSH server
In order to install the OpenSSH sshd server on Windows you will need to do the following:- Log on to Windows as an Administrator
- Create the folder C:\Cygwin
- Download Cygwin's setup.exe from here and save it in C:\Cygwin
- Launch the installer by double clicking on C:\Cygwin\setup.exe
- It is possible that you will get an Open File - Security Warning
- Simply click the Run button if you do
- Click Next
- Select Install from Internet and click Next
- At the Choose Installation Directory screen:
- Choose C:\Cygwin as the Root Directory
- Select Install For: All Users (RECOMMENDED)
- Click Next
- Choose C:\Cygwin as the Local Package Directory
- Click Next
- At the Select Connection Type menu - choose Direct Connection unless you know you are using another setting
- Click Next
- Choose a Download Site
- Click Next
- At the Cygwin Setup - Select packages Screen - click on the View button for "Full" view (the default view is "Category").
- Scroll down to find the package "openssh: The OpenSSH server and client programs" in the Package column. Click on the word "skip" so that a checked box appears in the Bin? column
- Scroll down to find the package "tcp_wrappers: Tools providing host-based access restrictions on tcp services" in the Package column. Click on the word "skip" so that a checked box appears in the Bin? column.
- Scroll down to find the package "vim: Vi Mproved - enhanced vi editor" in the Package column. Click on the word "skip" so that a checked box appears in the Bin? column.
- Click Next to begin the installation process
- Click Finish to close the installer
Configuring the SSH server
- Right click on My Computer --> Properties --> Advanced --> Environment Variables
- The upper portion contains a list of User variables and the lower
portion contains a list of System variables. Click the New button
underneath the System variables section to add a new system variable and
add:
- Variable name: cygwin
- Variable value: ntsec
- Click OK to create the variable
- Click OK to close the Edit User Variable screen
- Click OK to close the Environmental Variables screen
- Click OK to close the System Properties screen
- Open a Cygwin window by launching C:\Cygwin\cygwin.bat - a black screen will appear. At the prompt type: ssh-host-config
- When the script asks "Should privilege separation be used?", answer yes
- When the script asks to "Create a new local account 'sshd'?", answer yes
- When the script asks to "Install sshd as a service?", answer yes
- When the script asks to "Enter the value of CYGWIN for the daemon:", answer ntsec
Starting the SSH server
- To start the sshd service, open a Cygwin window and type one of the following commands (they both accomplish the same thing):
- net start sshd
- cygrunsrv --start sshd
- In order to harmonize Windows user information with Cygwin - open a
Cygwin window and type in the following commands (separately):
- mkpasswd --local > /etc/passwd
- mkgroup --local > /etc/group
Configure the Windows Firewall
If you are running Windows XP Service Pack 2 or Service Pack 3 - you have to configure the Windows Firewall to allow SSH traffic through it- Click on Start --> Control Panel --> Windows Firewall --> Exceptions Tab
- Click the Add Port... button
- Name: SSH
- Port Number: 22
- TCP
- Click OK to add the SSH exception to the firewall
- Click OK to close the Windows Firewall screen
Executing UNIX commands within a DOS window
If you want to be able to execute certain UNIX commands within a DOS command prompt window, do the following:- Right click on My Computer --> Properties --> Advanced --> Environment Variables
- In the System variables section, highlight the Path variable and click the Edit button
- Append the System variable by adding ;C:\Cygwin\bin to the end of the existing variable string
- Click OK to close the Edit System Variable screen
- Click OK to close the Environmental Variables screen
- Click OK to close the System Properties screen
Names with spaces
If you have a Windows username that contains a space, you could expand the [space] into \[space] or use quotes. For example: If the Windows username is Ezra Cornell, you could log in with either of the following commands:- ssh Ezra\ Cornell@localhost
- ssh "Ezra Cornell"@localhost
Reinstalling the SSH server
If you re-install Cygwin or run ssh-host-config when sshd is already installed, ssh-host-config will not ask for CYGWIN value. In that case, you have to stop and remove the sshd service, and then run the ssh-host-config script again.- cygrunsrv --stop sshd
- cygrunsrv --remove sshd
- ssh-host-config (enter the information as indicated above)
- cygrunsrv --start sshd
1. 원본 exp받기
# exp aaa/aaa123 file=aaa.dmp log=aaa.log buffer=40960
2. index script 생성하기
- indexfile Option을 이용하여 index script 생성
# imp aaa/aaa123 file=aaa.dmp indexfile=index.sql fromuser=aaa touser=aaa(tablespace 부분 수정)
3. 수정한 sql문을 실행시켜서 테이블 만들기/index만들기
4. exp받아둔 파일로 진짜 import 하기/ignore=y하여 에러안나게
껍데기만 만들어진 상태에서 ignore없이하면 또 만들려다 에러남
# imp aaa/aaa123 file=aaa.dmp buffer=40960 log=imp0522.log commit=y fromuser=aaa touser=aaa ignore=y