Проблемы с установкой mysql

OpenSolaris, Illumos, OpenIndiana

Модератор: Модераторы разделов

Ответить
Bonifatsy
Сообщения: 60

Проблемы с установкой mysql

Сообщение Bonifatsy »

Добрый день.
Solaris 10 x86.

Возникла проблема с установкой mysql.
$ su
Password:
# cd /export/bgf
# ./install.bgf

###########################################
Приветствие
###########################################

Main Installation Menu [test zone]
____________________________________

1 Install & Upgrade S/W Packages
2 Utilities & Actions

Please select an item ... [?,??,q]: 1

Packages Installation Menu (zone - test)

1 ###########################################
2 ###########################################
3 ###########################################
4 mysql [not installed] mysql 1.0.2
5 ###########################################
[0m
Select a package ("auto" for automatic update) [1-5,auto,q] --> 4
[1m 12:30:47 Application packages installation. Please, wait...

Install Application Packages in test zone, wait....
Installing <mysql> version 1.0.2...
pkgadd: ERROR: preinstall script did not complete successfully

Installation of <mysql> failed.

Packages Installation Menu (zone - test)

1 ###########################################
2 ###########################################
3 ###########################################
4 mysql [ up-to-date ] mysql 1.0.2
5 ###########################################

Select a package ("auto" for automatic update) [1-5,auto,q] -->


И собственно сам преинсталл скрипт
#!/bin/sh

db_user=mysql
run_time_group=mysql
home_dir=/sdh_home/mysql

/usr/bin/grep "^${db_user}:" /etc/passwd >/dev/null> /dev/null 2>&1
[ $? -eq 0 ] && exit 0

/usr/bin/ypwhich > /dev/null 2>&1
[ $? -eq 0 ] && exit 1


/usr/bin/grep "${run_time_group}:" /etc/group > /dev/null 2>&1
if [ $? -ne 0 ];then
/usr/sbin/groupadd $run_time_group >/dev/null 2>&1
[ $? -ne 0 ] && exit 1
fi

/usr/sbin/useradd -g $run_time_group -d "${home_dir}" -s /bin/sh -c "MySQL user" -m $db_user >/dev/null 2>&1
[ $? -ne 0 ] && exit 1

/usr/bin/passwd -d $db_user > /dev/null 2>&1

/usr/bin/mkdir -p $home_dir
/usr/bin/chown ${db_user}:$run_time_group $home_dir
exit 0


Пробовал менять права на исполнение - без изменений.

Совсем не знаю куда обратиться - поэтому обращаюсь сюда. Заранее благодарен.
Спасибо сказали:
Аватара пользователя
sash-kan
Администратор
Сообщения: 13939
Статус: oel ngati kameie
ОС: GNU
Контактная информация:

Re: Проблемы с установкой mysql

Сообщение sash-kan »

я бы попробовал добавить в начало скрипта (ниже shebang-а, конечно)
set -v

с большой вероятностью (уточнить можно с помощью "man sh") используемый shell поймёт эту команду как руководство выводить в stdout все исполняемые команды·
и, возможно, эта информация попадёт к вам на терминал, и/или будет записана в какой-нибудь log-файл·
там во многих местах расставлены exit-ы при неудачном выполнении команд, поэтому по логу можно будет понять, какая из команд выдала ошибку при выполнении·
Писать безграмотно - значит посягать на время людей, к которым мы адресуемся, а потому совершенно недопустимо в правильно организованном обществе. © Щерба Л. В., 1957
при сбоях форума см.блог
Спасибо сказали:
Аватара пользователя
skeletor
Сообщения: 1224

Re: Проблемы с установкой mysql

Сообщение skeletor »

Для Solaris есть готовые пакеты pkg, которые отлично ставятся.
Спасибо сказали:
Bonifatsy
Сообщения: 60

Re: Проблемы с установкой mysql

Сообщение Bonifatsy »

Сдвинулся с мертвой точки.
начал выполнять преинстал скрипт построчно.

на строке:
# /usr/bin/ypwhich
поймал
ypwhich: the domainname hasn't been set on this machine

далее:

# domainname test
# /usr/bin/ypwhich
поймал
ypwhich: can't communicate with ypbind

Вкуривание манов вывело на NIS.

Ищу пакет NIS позже отпишу.
Спасибо сказали:
Аватара пользователя
SLEDopit
Модератор
Сообщения: 4823
Статус: фанат консоли (=
ОС: GNU/Debian, RHEL

Re: Проблемы с установкой mysql

Сообщение SLEDopit »

Bonifatsy писал(а):
22.06.2012 15:40
Вкуривание манов вывело на NIS.

Ищу пакет NIS позже отпишу.
А он у вас используется?
Сам по себе NIS то мускулу вовсе не нужен.
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don't do mistakes, the more bugs are in your code.
Спасибо сказали:
Bonifatsy
Сообщения: 60

Re: Проблемы с установкой mysql

Сообщение Bonifatsy »

NIS - то может быть и не нужен, но без него ни как. если из скрипта убрать строчку
/usr/bin/ypwhich > /dev/null 2>&1
то основной скрипт ругается на измененный объем preinstall скрипта. Поэтому нашел как настраивается служба NIS:
Task 1 – Setting Up the NIS Master
Complete the following steps:
1. Change the directory to /var/yp, and make a backup copy of the Makefile file.
# cd /var/yp
# cp Makefile Makefile.orig
2. In the /var/yp/Makefile, remove the aliases entry from the target all.
3. Verify that the /etc/hosts file contains entries for the systems that will become the NIS slave server and the NIS client.
4. Select a name to use as your NIS domain name. Set it by using the domainname command.
# domainname yourdomain
Note – Replace yourdomain with your chosen domain name.
5. Populate the defaultdomain file with your domain name.
# cd /etc
# domainname > defaultdomain
6. Use the touch command to create the ethers, bootparams, and netgroup files in the /etc directory.
# cd /etc ; touch ethers bootparams netgroup
7. Create the /etc/timezone file, and include an appropriate entry for your time zone and NIS domain. For example, the following entry would set the time zone for systems located within an NIS domain called yourdomain.
your_timezone
yourdomain
Note – Replace your_timezone time zone with your local time zone and yourdomain with your own domain name. To see an example of a time zone entry, cat the /etc/TIMEZONE file.
# cat /etc/timezone
US/Mountain
suned.sun.com
8. Copy the /etc/nsswitch.nis template to the /etc/nsswitch.conf file.
# cd /etc ; cp nsswitch.nis nsswitch.conf
9. Set up this system as an NIS master server:
a. Use the ypinit -m command to start the setup process.
# ypinit -m
The ypinit command lists the current system as an NIS server, and then prompts you for the next host to add as an NIS slave server.
b. Enter the name of the system that you want to use as an NIS slave server. Press Control-D when the list is complete.
next host to add: master_server
next host to add: slave_server
next host to add: <Control–D>
(list of servers)
is this list correct? [y/n: y] y
c. Specify that you do not want the ypinit command to quit on nonfatal errors.
...quit on nonfatal errors? [y/n: n] n
The ypinit command then proceeds to build the required maps.
Note – If the initialization process is successful, the ypinit command displays a message indicating that the current system was set up as a master server without any errors. This message is displayed even if nonfatal errors occur in the procedure.
d. If the initialization process fails, correct the problems indicated by the error messages and repeat Steps a, b, and c.
10. Verify the status of the NIS server daemon.
# svcs -a | grep nis | grep server
online 1:54:32 svc:/network/nis/server:default
11. Start the NIS server daemon if it is not running.
# svcadm enable network/nis/server:default
12. Verify that this system is the NIS master by using the ypwhich command.
# ypwhich -m

Task 2 – Setting Up the NIS Client
Complete the following steps:
1. Verify that the /etc/hosts file contains entries for the NIS master and slave servers.
2. Set the NIS domain for this system using the domainname command.
# domainname yourdomain
Note – Replace yourdomain with the NIS domain name you used to set up the NIS master server.
3. Populate the defaultdomain file with your domain name.
# cd /etc
# domainname > defaultdomain
4. Set up this system as an NIS client:
a. Use the ypinit -c command to start the setup process.
b. Enter the name of the NIS master server and the NIS slave server (in order of preference), and press Control-D to terminate the list.
# ypinit -c
next host to add: master_server
next host to add: slave_server
next host to add: <Control–D>
(list of servers)
is this list correct? [y/n: y] y
5. Copy the /etc/nsswitch.nis template to the /etc/nsswitch.conf file.
# cd /etc
# cp nsswitch.nis nsswitch.conf
6. Verify the status of the NIS client daemon.
# svcs -a | grep nis | grep client
disabled 18:55:45 svc:/network/nis/client:default
7. Start the NIS client daemon.
# svcadm enable network/nis/client:default
8. Verify that this system is using NIS by using the ypwhich command.
# ypwhich -m

Task 3 – Testing Dynamic Rebind
Complete the following steps:
1. Confirm that the NIS client is bound to the NIS master server by using the ypwhich command.
# ypwhich
master_server


Маломайски все поставил. Теперь разбираюсь как подключиться к удаленному десктопу (или десктопу зоны).
Спасибо сказали:
Bonifatsy
Сообщения: 60

Re: Проблемы с установкой mysql

Сообщение Bonifatsy »

Маломайски все поставил. Теперь разбираюсь как подключиться к удаленному десктопу (или десктопу зоны).

Поясню, тут возник какой-то косяк с удаленным подключением, создал новую зону с тем же конфигом все норм.
Спасибо сказали:
Ответить