Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37864999
en ru br
Репозитории ALT
5.1: 0.4-alt7
4.1: 0.4-alt7
4.0: 0.4-alt7
3.0: 0.3-alt2
www.altlinux.org/Changes

Группа :: Базы Данных
Пакет: oracle-preinstall

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 


Назначение этого пакета - сделать простой установку Oracle
По своей сути он немного похож на аналогичный пакет для дистрибутива SuSE
хотя создаваля совершенно независимо.

Features:

- Создание групп dba, oper, oinstall
- Создание пользователя oracle c членством в правильных группах
- Предполагается что софт будет устанавливаться в /opt/oracle
- Скрипты для запуска/останова сервисов Oracle
- Скрипт расчета рекомендуемых параметров ядра
- Добавление утилит Oracle в меню (для Oracle Client)


TODO: (в порядке уменьшения приоритета)
- Отладка имеющихся скриптов (всетаки версия еще не 1.0 :-)
- Создание сценариев установки в silent mode (дабы полностью избавиться
от X при установке)
- Chroot ;-))



Тестировалось с:
~~~~~~~~~~~~~~~~
- Oracle Database 10.2.0.1
- glibc-2.3.5-alt5
- gcc3.4-3.4.4-alt1


Особенности:
~~~~~~~~~~~~
- Скрипты формирования переменных окружения


Как этим пользоваться:
~~~~~~~~~~~~~~~~~~~~~~

1 Установите пакет. Будут созданы группы
oinstall - те кто может устанавливать программы
dba - администраторы баз данных
oper - операторы или пользователи базы данных (по моим наблюдениям фактически
не используется)
Будет создан каталог /opt/oracle с соответсовующими правами доступа.

2 Если планируется ставить софт Oracle не в /opt/oracle отредактируйте по
своему усмотрению файлы /etc/oraInst.loc (указание на базу данных инсталятора)
и файл /etc/profile.d/oracle.sh в котором можно указать дефолтные значения для
переменных окружения.

!!! Внимание !!!
Прежде чем запускать инсталятор, убедитесь что у Вас определена переменная
окружения ORACLE_HOME


3 Члены группы oinstall имеют все права на базу инсталятора. Т.е. они могут
_установить_ софт. Члены группы dba могут _пользоваться_ этим софтом. По
умолчанию используется пользователь oracle:oinstall(dba,oper)

4 Установите пароль пользователю oracle. Войдите в систему от имени этого
пользователя. Переменная ORACLE_HOME должна быть установлена в соответствии с
файлом /etc/sysconfig/oracle Практически все продукты Oracle имеют графический
инсталятор поэтому необходимо либо логиниться на сервер с ForwardX11 либо
использовать VNC. Я больше склоняюсь ко второму варианту т.к. не всегда имею
стабильный канал к серверам.

5 Запустите инсталятор (runInstall). Для некоторых продуктов Oracle (например
Grid Control) может понадобиться опция -ignoreSysPrereqs

!!! Внимание !!!
Для установки Oracle 10.2.0.1.0 на систему ALT Linux Server 4.0 необходимо
перед запуском инсталлятора установить еще одну переменную окружения.
export COMPSOBJS="-Wl,--no-as-needed"
Тем не менее в процессе установки вы всеравно получите сообщение об ошибке
при выполненнии команды
make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk all_no_orcl ihsodbc
В этом случае необходимо перейти в шелл и приложить патч
cd $ORACLE_HOME
patch -p0 < Oracle10g_ALT40.patch
Затем возвращаетесь к инсталлятору и нажимаете кнопку Retry.
Все дальнейшие операции выполняются в обычном режиме.


6 После установки ПО можно создавать базы утилитой dbca (меню: Приложения/Базы
данных/Oracle/Database Configuration Assistant)

7 В файле /etc/oratab для вновь созданной базы данных установите последний
параметр в 'Y'

8 Выполните от имени root команды
service oracle-db start
service oracle-lsnr start
При необходимости добавте oracle-db и oracle-lsnr в стартап
chkconfig oracle-db on
chkconfig oracle-lsnr on

Если у вас не стартует сервер или не может создаться база данных проверьте
правильность установки параметров ядра. Увеличте их до рекомендуемого значения
прописав это в файле /etc/sysctl.conf После чего выполните команду 'sysctl -p'

semmsl semmns semopm semmni 250 32000 100 128 /proc/sys/kernel/sem
shmall 2097152 /proc/sys/kernel/shmall
shmmax Half of RAM /proc/sys/kernel/shmmax
shmmni 4096 /proc/sys/kernel/shmmni
file-max 65536 /proc/sys/fs/file-max
ip_local_port_range 1024 65000 /proc/sys/net/ipv4/ip_local_port_range
rmem_default 262144 /proc/sys/net/core/rmem_default
rmem_max 262144 /proc/sys/net/core/rmem_max
wmem_default 262144 /proc/sys/net/core/wmem_default
wmem_max 262144 /proc/sys/net/core/wmem_max

Рекомендуется увеличить пользователю oracle лимиты на количество процессов и
открытых файлов в файле /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536


9 После установки клиента желательно поправить права доступа на файлы
находящиеся в ORACLE_HOME
# chmod o+rx $ORACLE_HOME/..
# chgrp -R oper $ORACLE_HOME


Short description for Optimal Flexible Architecture (OFA) Directory Structure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/opt/oracle - ORACLE_BASE, Oracle software location
/admin - Administrative directory
/crs/<version> - Cluster Ready Service (CRS)
/doc - ORACLE_HOME, online documentation
/flash_recovery_area - ??
/local - Subtree for local Oracle software
/oradata - data files
/oraInventory - Oracle software repositary
/product/<version>/<ID>_<counter> - ORACLE_HOME, instance related location


Quotes from Oracle Database Administrators Reference, Appendix C
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Create Shared Memory

To use the extended buffer cache support, create an in-memory file system on
the /dev/shm mount point equal in size or larger than the amount of memory that
you intend to use for the database buffer cache:
1. For example, to create an 8 GB file system on the /dev/shm mount point,
enter the following command as the root user:
# mount -t shm shmfs -o size=8g /dev/shm
2. Add an entry in the /etc/fstab file, similar to the following, to ensure
that the in-memory file system is mounted when the system reboots:
none /dev/shmfs shmfs size=8g 0 0
When Oracle Database starts with the extended buffer cache feature enabled, it
creates a file in the /dev/shm directory that corresponds to the Oracle buffer
cache.


Enabling Large Pages

Enabling large pages can improve scalability by reducing virtual memory
overhead in the kernel. However, memory resources in the large page pool cannot
be swapped, so you must be sure that your system has sufficient memory.
If the SGA is 2.7 GB:
1. Determine the bigpages value as follows:
bigpages = 2.7 * 1024 = 2764.8
2. Round the value up by 4 to 2768.
3. Add the bigpages option to kerenel startup parameters
append = "bigpages=2768MB"
4. Restart the system.
5. To enable the large pages feature, enter one of the following commands,
depending on whether you are using the Extended Buffer Cache, and set the
USE_INDIRECT_DATA_BUFFERS parameter to TRUE in the parameter file:
If you are not using the Extended Buffer Cache (VLM) add or edit the
following entry in the /etc/sysctl.conf file:
kernel.shm-use-bigpages = 1
If you are using the Extended Buffer Cache (VLM), you can configure the
bigpages memory pool to include the memory allocated in /dev/shm:
kernel.shm-use-bigpages = 2
6. Enter the following command to set the parameter values:
# sysctl -p /etc/sysctl.conf
7. Restart Oracle database


Using hugetlbfs

1. Determine the memory required for the large page pool, similar to the large
pages example in the previous section (2768 MB).
2. Add the bigpages option to kerenel startup parameters
append = "hugepages=2768MB"
3. Restart the system.
4. Add or edit the following entry in the /etc/sysctl.conf file:
vm.hugetlb_pool = 2768
5. Verify that this amount of memory was moved successfully into the hugetlb
pool, as follows:
# cat /proc/meminfo
6. Enter the following command to set the parameter values:
# sysctl -p /etc/sysctl.conf
7. Startup Database



Increasing SGA Address Space

1. If necessary, log in as the oracle user.
2. In the $ORACLE_HOME/rdbms/lib directory, enter the following commands:
$ genksms -s 0x15000000 > ksms.s
$ make -f ins_rdbms.mk ksms.o
$ make -f ins_rdbms.mk ioracle


Asynchronous I/O Support

1. Ensure that all Oracle database files are located on file systems that
support asynchronous I/O.
2. As the oracle user, change directory to the $ORACLE_HOME/rdbms/lib
directory.
3. Enter the following command:
$ make -f ins_rdbms.mk async_on
4. Set the FILESYSTEMIO_OPTIONS parameter in the parameter file to asynch.


Direct I/O Support

1. Set the FILESYSTEMIO_OPTIONS parameter in the parameter file to DIRECTIO.
2. If you are using the asynchronous I/O option, set the FILESYSTEMIO_OPTIONS
parameter in the parameter file to SETALL.



Все замечания и предложения по форме и содержанию приветствуются
и будут приняты с благодарностью.

Igor Muratov <migor @ altlinux dot org>

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin