Linux上Oracle 10g客户端的安装和配置
需要在Linux 上访问Oracle,所以要装个客户端。参考了网上很多资料,但总会半路卡壳。根据自己实际的操作,写了下面的操作手册,
需要在Linux 上访问Oracle,所以要装个客户端。参考了网上很多资料,但总会半路卡壳。根据自己实际的操作,写了下面的操作手册,,希望对在linux上装oracle客户端的朋友有帮助。我的Linux是RedHat Enterprise Linux AS4。
一、检查系统
1、检查操作系统版本,具体系统要求请参考安装手册。
cat /etc/issue
2、检查Linux内核版本,具体要求请参考安装手册。
uname -r
3、检查软件安装包是否安装及版本是否符合,语法为:rpm -q package_name例如:rpm –q make,如果已经安装,会显示版本号,否则提示还未安装。将未安装或版本过低的package记录下来,到Linux的安装CD中查找或到网上搜索下载。
所有的package安装完后,再次用rpm命令进行检查。
注:有些package在安装时需需要用到系统安装盘。
具体的软件包如下:
make-3.79.1
gcc-3.2.3-34 --系统带有GCC编译器,但需要手动安装
glibc-2.3.2-95.20
glibc-devel-2.3.2-95.20
compat-db-4.0.14-5
compat-gcc-7.3-2.96.128
compat-gcc-c++-7.3-2.96.128
compat-libstdc++-7.3-2.96.128
compat-libstdc++-devel-7.3-2.96.128
openmotif21-2.1.30-8
setarch-1.3-1
gnome-libs-1.4.1.2.90-34.1 (32 bit)
libaio-0.3.96-3
libaio-devel-0.3.96-3
二、创建用户名和组名
/usr/sbin/groupadd oinstall
/usr/sbin/useradd -m -g oinstall oracle
--检查用户id
id oracle
--设置oracle用户的密码
passwd oracle
三、创建oracle安装目录及设置用户权限
mkdir -p /u01/app/oracle
chown -R oracleinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle ――授权,使用oracle客户端的系统用户需要有对该目录的读权限
注:/u01/app/oracle是标准安装手册推荐的安装目录名,可以使用别的目录名称。
四、执行Oracle客户端安装
安装主目录要使用之前创建的/u01/app/oracle,其他地方一路next。当提示运行脚本时,在终端中以root用户登录,运行那两个脚本。(在终端中输入su即会使用root登录)
五、注销系统,改用root用户登录
1、编辑配置文件
vi .bash_profile
查看文件中是否设置有正确的ORACLE_HOME和PATH。如果没有,继续下一步。
2、在现有文件的下面增加如下语句:
umask 022
export ORACLE_HOME=/u01/app/oracle
export PATH=$ORACLE_HOME/bin:$PATH
注:进入编辑界面后,按i进行编辑;按ESC,再输入:wq即保存并退出。
六、注销系统,使用oracle登录,重复执行第五步。
七、配置oracle客户端
1、在终端中,输入cd /u01/app/oracle/bin进入到这个目录,然后输入ls查看该目录下的文件。
2、输入./netmgr打开net manager,在这里配置需要访问的oracle服务端。
3、关闭net manager后,输入./sqlplus。用户名处输入hdny@225(225是上一步配置的的一个ORACLE_SID)。看能否成功连接。
八、其他Linux系统用户如果需要使用oracle客户端,也需要执行第五步。并以root用户对oracle安装目录进行授权。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

The function in Oracle to calculate the number of days between two dates is DATEDIFF(). The specific usage is as follows: Specify the time interval unit: interval (such as day, month, year) Specify two date values: date1 and date2DATEDIFF(interval, date1, date2) Return the difference in days

The Oracle database startup sequence is: 1. Check the preconditions; 2. Start the listener; 3. Start the database instance; 4. Wait for the database to open; 5. Connect to the database; 6. Verify the database status; 7. Enable the service (if necessary ); 8. Test the connection.

The INTERVAL data type in Oracle is used to represent time intervals. The syntax is INTERVAL <precision> <unit>. You can use addition, subtraction, multiplication and division operations to operate INTERVAL, which is suitable for scenarios such as storing time data and calculating date differences.

To find the number of occurrences of a character in Oracle, perform the following steps: Get the total length of a string; Get the length of the substring in which a character occurs; Count the number of occurrences of a character by subtracting the substring length from the total length.

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

The method of replacing strings in Oracle is to use the REPLACE function. The syntax of this function is: REPLACE(string, search_string, replace_string). Usage steps: 1. Identify the substring to be replaced; 2. Determine the new string to replace the substring; 3. Use the REPLACE function to replace. Advanced usage includes: multiple replacements, case sensitivity, special character replacement, etc.

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.
