你的问题“怎样配置 Debian Oracle”可能指的是以下几种情形之一,我分别说明,你可以按需参考:
⚠️ 注意:Oracle 官方对 Debian 不是官方支持系统,通常建议在 RHEL / Oracle Linux 上运行。但在 Debian 上也可以通过兼容方式安装。
sudo apt update
sudo apt install -y alien libaio1 unixodbc vim wget
创建 Oracle 用户和组:
sudo groupadd oinstall
sudo groupadd dba
sudo useradd -g oinstall -G dba oracle
sudo passwd oracle
编辑 /etc/sysctl.conf:
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmax = 4294967295
kernel.shmall = 1048576
执行:
sudo sysctl -p
编辑 /etc/security/limits.conf:
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
从 Oracle 官网下载:
LINUX.X64_193000_db_home.zip解压并运行:
unzip LINUX.X64_193000_db_home.zip -d /opt/oracle
cd /opt/oracle
./runInstaller
安装过程可能需手动修复依赖(用
alien转换 RPM)。
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linuxx64.zip
unzip instantclient-basic-linuxx64.zip
unzip instantclient-sqlplus-linuxx64.zip
export LD_LIBRARY_PATH=$PWD/instantclient_21_1:$LD_LIBRARY_PATH
export PATH=$PWD/instantclient_21_1:$PATH
sqlplus user/pass@//host:1521/service
最简单、最稳定:
docker run -d \
-p 1521:1521 \
-e ORACLE_PASSWORD=oracle \
--name oracle \
gvenzl/oracle-xe
连接:
sqlplus system/oracle@//localhost:1521/XE
pip install oracledbapt install php-oci8npm install oracledb如果你能具体说明:
我可以给你更精确的步骤。