installation_de_oracle_en_lxc
Table des matières
Création d'une image oracle-linux 8
container_rootfs=/tmp/rootfs apt install yum4 ca-certificates mkdir -p $container_rootfs/etc/yum.repos.d cat << 'EOF' > $container_rootfs/etc/yum.repos.d/oracle-linux-ol8.repo [ol8_baseos_latest] name=Oracle Linux 8 Latest ($basearch) baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 [ol8_appstream] name=Oracle Linux 8 Application Stream ($basearch) baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/appstream/$basearch/ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 EOF pkgs="yum initscripts passwd rsyslog dhclient chkconfig rootfiles policycoreutils oraclelinux-release net-tools network-scripts" yum4 install --installroot $container_rootfs -y --nogpgcheck $pkgs chroot $container_rootfs systemctl enable network echo oracle > $container_rootfs/etc/hostname echo > $container_rootfs/etc/sysconfig/network tar -C $container_rootfs -zcvf oracle-linux-ol8.tar.gz . > /dev/null
Modification de proxmox pour charger l'image
Editer sur le serveur proxmox /usr/share/perl5/PVE/LXC/Setup.pm pour ajouter ol
# a map to allow supporting related distro flavours my $plugin_alias = { 'opensuse-leap' => 'opensuse', 'opensuse-tumbleweed' => 'opensuse', arch => 'archlinux', sles => 'opensuse', ol => 'centos', };
puis
systemctl restart pvedaemon.service
Installation d'oracle
yum install wget nano -y wget https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm export ORACLE_DOCKER_INSTALL=true yum install oracle-database-xe-21c-1.0-1.ol8.x86_64.rpm -y nano /etc/sysconfig/oracle-xe-21c.conf reboot systemctl enable --now oracle-xe-21c.service
Utilisation
export ORACLE_HOME=/opt/oracle/product/21c/dbhomeXE PATH=$PATH:$ORACLE_HOME/bin
console sql :
sqlplus system\@XE
commande d'export :
exp system\@XE
commande d'import :
imp system\@XE
installation_de_oracle_en_lxc.txt · Dernière modification : 2022/07/10 01:54 de tomamplius