1. 程式人生 > 實用技巧 >Alpine 3.12:安裝oracle12c:!!!

Alpine 3.12:安裝oracle12c:!!!

基本的安裝指令碼,as of:

####### alpine312:~# history
rc-service sshd restart

echo alpine312 >/etc/hostname
echo 127.0.0.1 alpine312 >>/etc/hosts

apk add coreutils shadow bash bash-completion
apk add gcc make libaio-dev
apk add xdpyinfo
##for-12c-only
apk add libxrender

useradd -m oracle
mkdir /u01
chown
oracle /u01 apk add --allow-untrusted glibc*.apk cp /usr/include/* /usr/glibc-compat/include/ rm -rf /usr/include/ ln -sf /bin/bash /bin/sh ln -s /usr/glibc-compat/include/ /usr/ ln -s /usr/glibc-compat/lib/ /usr/lib64 ln -s /usr/glibc-compat/lib/*.o /lib/ ln -s /usr/bin/awk /bin/ ln -s /usr/bin/basename /bin/ ln -s /usr/lib/libgcc_s.so.1 /lib64/ ln -s /usr/lib/libstdc\+\+.so.6 /usr/lib64/ ln -s /usr/glibc-compat/lib/libc_nonshared.a /usr/glibc-compat/lib/libssp_nonshared.a 72 gcc -v 74 cd /usr/bin/ 76 ll gcc 77 mv gcc gcc-9 78 vi gcc 79 chmod 755 gcc 80 gcc -v 91 find /mnt/ 92 mount -t iso9660 -o exec /dev/cdrom /mnt/ ################################################## alpine312:~# cat /usr/bin/gcc #!/bin/sh #/usr/bin/gcc-9 -no-pie -Wl,--no-as-needed $* /usr/bin/gcc-9 -no-pie -Wl,--no-as-needed -Wl,-dynamic-linker,/lib64/ld-linux-x86-64.so.2 $* ################################################## alpine312:~$ /mnt/database/runInstaller -ignorePrereq -ignoreInternalDriverError -ignoreSysPrereqs -J"-Doracle.install.db.validate.supportedOSCheck=false" export ORACLE_OWNER=oracle export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 export PATH=.:${ORACLE_HOME}/bin:${PATH}

關鍵點-1:gcc編譯選項

alpine312:~# cat /usr/bin/gcc
#!/bin/sh

/usr/bin/gcc-9 -no-pie -Wl,--no-as-needed -Wl,-dynamic-linker,/lib64/ld-linux-x86-64.so.2 $*
#/usr/bin/gcc-9 -no-pie -Wl,--no-as-needed $*