Оказывается, что для установки Moodle есть руководства для Centos и RedHat... Описываю процесс установки в комментариях. Для Moodle пробую использовать установку из коммандной строки..., по ходу дела разобраться с владельцами, правами и sheel коммандами установки... Страница руководства по установке Moodle на Centos учитывает особенности дистрибутива... В частности, старую версию PHP, год назад мне пришлось ее переустанавливать, вот мой пост на эту тему. Пост, кстати, так и не дописан, может быть мне поискать для таких заметок не бесплатный блог, а багзиллу? Без кода? ...
Свой сайт этой тематики поддерживать нет никакого смысла... Я этой тематикой кого могу заинтересовать? Таких же, как я чайников? А поиск по сайту мне нужен. Значит, подобные работы надо бы писать online и иметь возможность экспорта данных в известный баг-трекер, а еще лучше - в сервис управления проектами... Вот подборка советов по online bugtracker ... при беглом знакомстве склоняюсь к Project Management::Free Redmine Hosting, вот здесь хорошо отзываются о RedMine (Ruby) "Посоветуйте бесплатную систему управления проектами на PHP или Perl" Блок кода Основной текст Блок 2 Другие посты по теме
http://docs.moodle.org/24/en/CentOS_Linux_installation
ОтветитьУдалитьConfiguring file structure
Now that we have moodle files deployed in /var/www/html/moodle/ we need to add a directory for moodledata.
mkdir /var/www/moodledata
And now to apply appropriate file permissions for both directgories. http://docs.moodle.org/24/en/CentOS_Linux_installation
ОтветитьУдалитьFirst moodle directory:
chown -R root:apache /var/www/html/moodle/
chmod -R u=rwX,g=rX,o= /var/www/html/moodle/
And than moodledata directory:
chown -R root:apache /var/www/moodledata/
chmod -R ug=rwX,o= /var/www/moodledata/
Теперь посмотрим, есть ли среди пользователей apache
ОтветитьУдалить[root@localhost cli]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
news:x:9:13:news:/etc/news:
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
distcache:x:94:94:Distcache:/:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
pcap:x:77:77::/var/arpwatch:/sbin/nologin
ntp:x:38:38::/etc/ntp:/sbin/nologin
apache:x:48:48:Apache:/var/www:/sbin/nologin
rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
mailnull:x:47:47::/var/spool/mqueue:/sbin/nologin
smmsp:x:51:51::/var/spool/mqueue:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
webalizer:x:67:67:Webalizer:/var/www/usage:/sbin/nologin
dovecot:x:97:97:dovecot:/usr/libexec/dovecot:/sbin/nologin
squid:x:23:23::/var/spool/squid:/sbin/nologin
xfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologin
hsqldb:x:96:96::/var/lib/hsqldb:/sbin/nologin
named:x:25:25:Named:/var/named:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
avahi:x:70:70:Avahi daemon:/:/sbin/nologin
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
avahi-autoipd:x:100:101:avahi-autoipd:/var/lib/avahi-autoipd:/sbin/nologin
gdm:x:42:42::/var/gdm:/sbin/nologin
Altersego:x:500:500:Altersego :/home/Altersego:/bin/bash
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
[root@localhost cli]#
Как отсоритровать выдачу по алфавиту? Наверное, можно, но думать лень...
УдалитьПотому попробуем
[root@localhost cli]# cat /etc/passwd | grep http
[root@localhost cli]# cat /etc/passwd | grep apache
apache:x:48:48:Apache:/var/www:/sbin/nologin
[root@localhost cli]#
Да, действительно, владелец apache есть...
Итак, первая комманда рекурсивно делает владельцем всех папок пользоватлея root и, внимание(!!!), дает всем участникам группы apache права на владегие папкой...
УдалитьСоответственно, второй коммандой мы даем суперпользователю (владельцу) все права, а серверу (как участнику группы) только права на чтение и выполнение (не нужно, чтобы он напрямую мог что-нибудь записывать, пусть записывает PHP)
Вот она, вторая комманда:
chmod -R u=rwX,g=rX,o= /var/www/html/moodle/
Все комманды, естественно надо выполнять в терминале от имени root
Потом, в процессе установки мы задаем параметры, как на картинке (к посту наверху)
ОтветитьУдалитьна ноутбуке у меня пользователь root с паролем 1 (Centos), а на маленьком ноутбуке - пароль 123456 (это я намудрил...)
На следующем шаге выскакивает:
ОтветитьУдалитьConfiguration completed
Moodle made an attempt to save your configuration in a file in the root of your Moodle installation.The installer script was not able to automatically create a config.php file containing your chosen settings, probably because the Moodle directory is not writeable. You can manually copy the following code into a file named config.php within the root directory of Moodle.
dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = '1';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbsocket' => 1,
);
$CFG->wwwroot = 'http://localhost/moodle';
$CFG->dataroot = '/var/www/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
$CFG->passwordsaltmain = 'WCY.OpXBC=d4S:1hz3c,k-`0wbd';
require_once(dirname(__FILE__) . '/lib/setup.php');
// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!
После этого находим в http://docs.moodle.org/24/en/CentOS_Linux_installation
УдалитьBecause of the way we applied file permissions to the /var/www/html/moodle/ directory installation will not be able to save config.php. Just copy the content of the file from the browser and manually add it to the directory.
и проделываем операции
[root@localhost moodle]# gedit congig.php
открывается пустой файл, копируем туда страшную запись... и сохраняем, оставляем права на этот файл root:root, поскольку в инструкции про root:apache ничего не написано
После чего на следующем экране (среди прочего) читаем
ОтветитьУдалить...
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the Moodle License information page for full details:
http://docs.moodle.org/dev/License
Далее выскочили ошибки
ОтветитьУдалить1) Удалил старую базу moodle с кодировкой по умолчанию (utf8_unicod_ci) потом создал снова с кодировкой utf8_bin
перегрузился, ошибка исчезла, но остались еще две, вернее два (модуля)
Но они помечены не красным, а желтым, надо подгрузить модули
ОтветитьУдалитьphp_extension soap should be installed and enabled for best resultsshould be installed and enabled for best results
Installing the optional soap extension is useful for web services and some contrib modules.
Check
php_extension intl should be installed and enabled for best resultsshould be installed and enabled for best results
Intl extension is used to improve internationalization support, such as locale aware sorting.
Check
Загрузил пакеты из репозиториев (надо бы разобраться, откуда). Кстати, припоминаю, что год назад я просто нашел rpm пакеты с PHP...
ОтветитьУдалитьТеперь надо бы
service httpd restart
Теперь ошибки пропали, но
Обнаружилось, что
ОтветитьУдалитьdatabase mysql version 5.1.33 is required and you are running 5.0.95version 5.1.33 is required and you are running 5.0.95
моя версия базы данных устарела...
Нагугливается ответ легко "mysql upgrade 5.0 to 5.5 centos"
УдалитьБудем использовать, как основную инструкцию:
http://www.blokeish.com/2011/08/update-php-5-2-and-mysql-5-0-to-php-5-3-8-and-mysql-5-5-15-on-centos-5-5/
Здесь предлагается подключиться к репозиториям, в которых есть последние версии софта
What is EPEL
EPEL stand for Extra Packages for Enterprise Linux. EPEL is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL).
Однако, по указанному в статье http://www.blokeish.com/2011/08/update-php-5-2-and-mysql-5-0-to-php-5-3-8-and-mysql-5-5-15-on-centos-5-5/ адресу
ОтветитьУдалитьInstalling EPEL and REMI Repositories
wget http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
пусто
Нагугливаем новый репозиторий (вот из этого поста http://serverfault.com/questions/384855/how-to-enable-epel-repository-for-centos)
находим что нужный мне репозиторий есть:
http://mirror.cogentco.com/pub/linux/epel/5/x86_64/
а в нем находим похожий файл
epel-release-5-4.noarch.rpm
...
репозиторий просто переехал..., а релиз тот же
Пробуем выполнить команду
Удалитьroot@localhost ~]# wget http://mirror.cogentco.com/pub/linux/epel/5/x86_64/epel-release-5-4.noarch.rpm
--2013-03-10 13:18:04-- http://mirror.cogentco.com/pub/linux/epel/5/x86_64/epel-release-5-4.noarch.rpm
Resolving mirror.cogentco.com... 204.157.3.70
Connecting to mirror.cogentco.com|204.157.3.70|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12232 (12K) [application/x-rpm]
Saving to: `epel-release-5-4.noarch.rpm'
100%[========================================================================>] 12,232 20.3K/s in 0.6s
2013-03-10 13:18:05 (20.3 KB/s) - `epel-release-5-4.noarch.rpm' saved [12232/12232]
Теперь нам надо установить другой репозиторий (выполняем следующую инструкцию http://www.blokeish.com/2011/08/update-php-5-2-and-mysql-5-0-to-php-5-3-8-and-mysql-5-5-15-on-centos-5-5/)
ОтветитьУдалитьWhat is REMI
This is a repository created by Remi Collet with the aim to give support for old Fedora releases to allow them to install recent software, also it gives you the ability to have your CentOS/RHEL systems with the latest software available in the net.
Пробуем кликнуть по ссылке
Удалить1 wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
В ответ выскакивает предложение сохранить файл, или сразу установить репозиторий при помощи установщика пакетов...
Однако, сначала посмотрим в браузере, что это за хитрый репозиторий...
Да, действительно, здесь на папки с релизами и файлы, указывающие на релизы соответствующие версиям ядра...
Действуем по инструкции (не кликаем по ссылке, а выполняем в терминале):
Удалить[root@localhost ~]# wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
--2013-03-10 13:31:45-- http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
Resolving rpms.famillecollet.com... 88.191.74.232, 2a01:e0b:1:74:2e0:f4ff:fe1b:b827
Connecting to rpms.famillecollet.com|88.191.74.232|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5180 (5.1K) [application/x-rpm]
Saving to: `remi-release-5.rpm'
100%[========================================================================>] 5,180 --.-K/s in 0.04s
2013-03-10 13:31:46 (143 KB/s) - `remi-release-5.rpm' saved [5180/5180]
Теперь комманды rpm установки и обновления пакетов должны увидеть репозитории.
ОтветитьУдалитьВыполняем (из http://www.blokeish.com/2011/08/update-php-5-2-and-mysql-5-0-to-php-5-3-8-and-mysql-5-5-15-on-centos-5-5/)
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
-U, --upgrade=+ upgrade package(s)
-v, --verbose provide more detailed output
-h, --hash print hash marks as package installs (good with -v)
root@localhost ~]# rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
Удалитьwarning: remi-release-5.rpm: Header V3 DSA signature: NOKEY, key ID 00f97f56
warning: epel-release-5-4.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing... ########################################### [100%]
1:epel-release ########################################### [ 50%]
2:remi-release ########################################### [100%]
Не очень понятно, что значит 50%...
УдалитьИз читсого любопытства открываем менеджер пакетов, производим поиск по слову remi
This package contains yum configuration for the "remi" RPM Repository, as well as the public GPG keys used to sign them.
The repository is not enabled after installation, so you must use the --enablerepo=remi option for yum.
Потом открываем список репозиториев и находим там несколько, начинающихся с "remi" и "epel", подключен только один, а что делать с остальными - не ясно...
Надеюсь, дальше будут инструкции, какие репозитории подключать
Теперь проверяем
ОтветитьУдалитьNow open ‘priorities.conf’ for editing (I use ‘nano’ to edit file. You can use ‘vi’ or any other command that you ae familiar with)
1 nano /etc/yum/pluginconf.d/priorities.conf
and make sure its content reads as follows
1 [main]
2 enabled=1
If this file is missing they you have to install yum priorities
Проверяем
[root@localhost cli]# gedit /etc/yum/pluginconf.d/priorities.conf
файл существует, и именно такой, как надо...
Если бы файла не было, то надо было бы
УдалитьIf this file is missing they you have to install yum priorities
1 yum install yum-priorities
Теперь поменять приоритеты получения обновлений:
ОтветитьУдалитьExcluding CentOS repositories from updating PHP, MySQL
To prevent default CentOS respositories from handeling php and mysql updates we need to exclude them for those specific updates. Make the followign edits to CentOS-Base.repo
1 nano /etc/yum.repos.d/CentOS-Base.repo
Add the following text to the end of the Base, Updates, Addons, and Extras repository entries
1 priority=1
2 exclude=*php* *mysql*
Enable (change the enable value 0 to 1) and add the following text to the end of the CentOSPlus repository entry
1 priority=2
2 exclude=*php* *mysql*
Вот, содержание моего файла до изменений
Удалить# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-5 - Base
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os
#baseurl=http://mirror.centos.org/centos/5/os/x86_64/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled = 1
#released updates
[updates]
name=CentOS-5 - Updates
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=updates
#baseurl=http://mirror.centos.org/centos/5/updates/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled = 1
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=addons
#baseurl=http://mirror.centos.org/centos/5/addons/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled = 1
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=extras
#baseurl=http://mirror.centos.org/centos/5/extras/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled = 1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=centosplus
#baseurl=http://mirror.centos.org/centos/5/centosplus/x86_64/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=contrib
#baseurl=http://mirror.centos.org/centos/5/contrib/x86_64/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
Вот, что стало после изменений (в инструкции ничего не было сказано про contrib - packages by Centos Users)
Удалить# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-5 - Base
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os
#baseurl=http://mirror.centos.org/centos/5/os/x86_64/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled = 1
priority=1
exclude=*php* *mysql*
#released updates
[updates]
name=CentOS-5 - Updates
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=updates
#baseurl=http://mirror.centos.org/centos/5/updates/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled = 1
priority=1
exclude=*php* *mysql*
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=addons
#baseurl=http://mirror.centos.org/centos/5/addons/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled = 1
priority=1
exclude=*php* *mysql*
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=extras
#baseurl=http://mirror.centos.org/centos/5/extras/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
enabled = 1
priority=1
exclude=*php* *mysql*
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=centosplus
#baseurl=http://mirror.centos.org/centos/5/centosplus/x86_64/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=2
exclude=*php* *mysql*
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=contrib
#baseurl=http://mirror.centos.org/centos/5/contrib/x86_64/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
Пока приоритеты не изменились (в менеджере пакетов самая старшая версия php-5.3.22), а надо бы 5.5
ОтветитьУдалитьChanging Priority for EPEL and REMI repositories
open ‘epel.repo’ for edit
1 nano /etc/yum.repos.d/epel.repo
and add the line ‘priority=3‘ to the end of ‘[epel]‘ section
open ‘remi.repo’ for edit
1 nano /etc/yum.repos.d/remi.repo
change enabled=0 to enabled=1 and also add the line ‘priority=3‘ to the end of ‘[remi]‘ section
# gedit /etc/yum.repos.d/epel.repo
ОтветитьУдалить[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 5 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 5 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1
Теперь в этот файл вставлена строчка
Удалитьв конце раздела [epel]
.....
....
priority=3
Теперь редактируем gedit /etc/yum.repos.d/remi.repo
ОтветитьУдалить[remi]
name=Les RPM de remi pour Enterprise Linux 5 - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/5/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/5/remi/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-test]
name=Les RPM de remi en test pour Enterprise Linux 5 - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/5/test/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/5/test/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-debuginfo]
name=Les RPM de remi pour Enterprise Linux 5 - $basearch - debuginfo
baseurl=http://rpms.famillecollet.com/enterprise/5/debug-remi/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-test-debuginfo]
name=Les RPM de remi en test pour Enterprise Linux 5 - $basearch - debuginfo
baseurl=http://rpms.famillecollet.com/enterprise/5/debug-test/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Добавил одну строчку в первую секцию
Удалить[remi]
name=Les RPM de remi pour Enterprise Linux 5 - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/5/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/5/remi/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
priority=3
Теперь пробуем обновиться
ОтветитьУдалитьUpdate PHP and MySQL
We are ready to perform the update from the new repositories. Now if you attempt ‘yum update php php-*‘ you will get mysql dependancy issues. SO you have to update mysql first. And the magic is that along with mysql php also gets update. So all that you have to do now is:
yum update mysql
however if you see that only mysql gets updated, then you have to explicitly update all components
yum update mysql mysql-server php php-*
Чего-то не получается:
ОтветитьУдалить[root@localhost ~]# yum update mysql
Loaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror, filter-data, kernel-module, keys,
: kmod, list-data, merge-conf, priorities, protect-packages, protectbase, refresh-updatesd,
: security, tsflags, upgrade-helper, verify
Bad id for repo: Mymirror,Centos5updates, byte = , 8
Repository remi is listed more than once in the configuration
Repository remi-test is listed more than once in the configuration
Repository remi-debuginfo is listed more than once in the configuration
Repository remi-test-debuginfo is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* Centos: centos-mirror.rbc.ru
* addons: centos-mirror.rbc.ru
* base: centos-mirror.rbc.ru
* centosplus: centos-mirror.rbc.ru
* contrib: centos-mirror.rbc.ru
* epel: mirror.xfes.ru
* extras: centos-mirror.rbc.ru
* rpmforge: nl.mirror.eurid.eu
* updates: centos-mirror.rbc.ru
Excluding Packages from CentOS-5 - Addons
Finished
Excluding Packages from CentOS-5 - Base
Finished
Excluding Packages from CentOS-5 - Plus
Finished
Excluding Packages from CentOS-5 - Extras
Finished
Excluding Packages from CentOS-5 - Updates
Finished
Skipping filters plugin, no data
4685 packages excluded due to repository priority protections
0 packages excluded due to repository protections
Skipping security plugin, no data
Setting up Update Process
No Packages marked for Update
[root@localhost ~]#
Пробуем вторую (альтернативную) комманду (http://www.blokeish.com/2011/08/update-php-5-2-and-mysql-5-0-to-php-5-3-8-and-mysql-5-5-15-on-centos-5-5/)
ОтветитьУдалить[root@localhost cli]# yum update mysql mysql-server php php-*
Loaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror, filter-data,
: kernel-module, keys, kmod, list-data, merge-conf, priorities, protect-packages,
: protectbase, refresh-updatesd, security, tsflags, upgrade-helper, verify
Bad id for repo: Mymirror,Centos5updates, byte = , 8
Repository remi is listed more than once in the configuration
Repository remi-test is listed more than once in the configuration
Repository remi-debuginfo is listed more than once in the configuration
Repository remi-test-debuginfo is listed more than once in the configuration
Existing lock /var/run/yum.pid: another copy is running as pid 10027.
Loading mirror speeds from cached hostfile
Удалить* Centos: centos-mirror.rbc.ru
* addons: centos-mirror.rbc.ru
* base: centos-mirror.rbc.ru
* centosplus: centos-mirror.rbc.ru
* contrib: centos-mirror.rbc.ru
* epel: mirror.xfes.ru
* extras: centos-mirror.rbc.ru
* remi: remi-mirror.dedipower.com
* rpmforge: nl.mirror.eurid.eu
* updates: centos-mirror.rbc.ru
Excluding Packages from CentOS-5 - Addons
Finished
Excluding Packages from CentOS-5 - Base
Finished
Excluding Packages from CentOS-5 - Plus
Finished
Excluding Packages from CentOS-5 - Extras
Finished
Excluding Packages from CentOS-5 - Updates
Finished
Skipping filters plugin, no data
4921 packages excluded due to repository priority protections
0 packages excluded due to repository protections
Skipping security plugin, no data
Setting up Update Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
Skipping filters plugin, no data
Skipping security plugin, no data
--> Running transaction check
Удалить--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: libdbi-dbd-mysql
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: mysql-devel
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: mod_auth_mysql
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: dovecot
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: mod_auth_mysql
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: dovecot
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: libdbi-dbd-mysql
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: mysql-devel
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: MySQL-python
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: mysql-connector-odbc64
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: MySQL-python
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: mysql-connector-odbc64
---> Package mysql.x86_64 0:5.5.30-1.el5.remi set to be updated
--> Processing Dependency: mysql-libs = 5.5.30-1.el5.remi for package: mysql
---> Package mysql-server.x86_64 0:5.5.30-1.el5.remi set to be updated
---> Package php.x86_64 0:5.4.12-1.el5.remi set to be updated
---> Package php-cli.x86_64 0:5.4.12-1.el5.remi set to be updated
--> Processing Dependency: libedit.so.0()(64bit) for package: php-cli
---> Package php-common.x86_64 0:5.4.12-1.el5.remi set to be updated
--> Processing Dependency: libcurl.so.4()(64bit) for package: php-common
---> Package php-gd.x86_64 0:5.4.12-1.el5.remi set to be updated
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd
Удалить---> Package php-imap.x86_64 0:5.4.12-1.el5.remi set to be updated
---> Package php-intl.x86_64 0:5.4.12-1.el5.remi set to be updated
---> Package php-ldap.x86_64 0:5.4.12-1.el5.remi set to be updated
---> Package php-mbstring.x86_64 0:5.4.12-1.el5.remi set to be updated
---> Package php-mcrypt.x86_64 0:5.4.12-1.el5.remi set to be updated
---> Package php-mysql.x86_64 0:5.4.12-1.el5.remi set to be updated
---> Package php-pdo.x86_64 0:5.4.12-1.el5.remi set to be updated
---> Package php-soap.x86_64 0:5.4.12-1.el5.remi set to be updated
---> Package php-xml.x86_64 0:5.4.12-1.el5.remi set to be updated
---> Package php-xmlrpc.x86_64 0:5.4.12-1.el5.remi set to be updated
--> Running transaction check
---> Package libcurl.x86_64 0:7.21.7-5.el5.remi.2 set to be updated
--> Processing Dependency: libssh2 >= 1.2.7 for package: libcurl
--> Processing Dependency: libssh2.so.1()(64bit) for package: libcurl
---> Package libedit.x86_64 0:2.11-2.20080712cvs.el5 set to be updated
---> Package libmysqlclient15.x86_64 0:5.0.95-1.w5 set to be updated
---> Package mysql-devel.x86_64 0:5.5.30-1.el5.remi set to be updated
---> Package mysql-libs.x86_64 0:5.5.30-1.el5.remi set to be updated
---> Package t1lib.x86_64 0:5.1.1-9.el5 set to be updated
--> Running transaction check
---> Package libssh2.x86_64 0:1.2.7-1.el5.remi set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
Dependencies Resolved
Удалить================================================================================================
Package Arch Version Repository Size
================================================================================================
Updating:
mysql x86_64 5.5.30-1.el5.remi remi 7.4 M
mysql-server x86_64 5.5.30-1.el5.remi remi 13 M
php x86_64 5.4.12-1.el5.remi remi 3.1 M
php-cli x86_64 5.4.12-1.el5.remi remi 2.9 M
php-common x86_64 5.4.12-1.el5.remi remi 1.0 M
php-gd x86_64 5.4.12-1.el5.remi remi 218 k
php-imap x86_64 5.4.12-1.el5.remi remi 96 k
php-intl x86_64 5.4.12-1.el5.remi remi 162 k
php-ldap x86_64 5.4.12-1.el5.remi remi 68 k
php-mbstring x86_64 5.4.12-1.el5.remi remi 1.2 M
php-mcrypt x86_64 5.4.12-1.el5.remi remi 57 k
php-mysql x86_64 5.4.12-1.el5.remi remi 182 k
php-pdo x86_64 5.4.12-1.el5.remi remi 129 k
php-soap x86_64 5.4.12-1.el5.remi remi 287 k
php-xml x86_64 5.4.12-1.el5.remi remi 235 k
php-xmlrpc x86_64 5.4.12-1.el5.remi remi 96 k
Installing for dependencies:
libcurl x86_64 7.21.7-5.el5.remi.2 remi 202 k
libedit x86_64 2.11-2.20080712cvs.el5 epel 80 k
libmysqlclient15 x86_64 5.0.95-1.w5 webtatic 1.3 M
libssh2 x86_64 1.2.7-1.el5.remi remi 82 k
mysql-libs x86_64 5.5.30-1.el5.remi remi 1.1 M
t1lib x86_64 5.1.1-9.el5 epel 208 k
Updating for dependencies:
mysql-devel x86_64 5.5.30-1.el5.remi remi 180 k
Transaction Summary
Удалить================================================================================================
Install 6 Package(s)
Upgrade 17 Package(s)
Total download size: 33 M
Is this ok [y/N]: y
Downloading Packages:
(1/23): php-mcrypt-5.4.12-1.el5.remi.x86_64.rpm | 57 kB 00:00
(2/23): php-ldap-5.4.12-1.el5.remi.x86_64.rpm | 68 kB 00:00
(3/23): libedit-2.11-2.20080712cvs.el5.x86_64.rpm | 80 kB 00:00
(4/23): libssh2-1.2.7-1.el5.remi.x86_64.rpm | 82 kB 00:00
(5/23): php-xmlrpc-5.4.12-1.el5.remi.x86_64.rpm | 96 kB 00:00
(6/23): php-imap-5.4.12-1.el5.remi.x86_64.rpm | 96 kB 00:00
(7/23): php-pdo-5.4.12-1.el5.remi.x86_64.rpm | 129 kB 00:01
(8/23): php-intl-5.4.12-1.el5.remi.x86_64.rpm | 162 kB 00:01
(9/23): mysql-devel-5.5.30-1.el5.remi.x86_64.rpm | 180 kB 00:01
(10/23): php-mysql-5.4.12-1.el5.remi.x86_64.rpm | 182 kB 00:01
(11/23): libcurl-7.21.7-5.el5.remi.2.x86_64.rpm | 202 kB 00:01
(12/23): t1lib-5.1.1-9.el5.x86_64.rpm | 208 kB 00:01
(13/23): php-gd-5.4.12-1.el5.remi.x86_64.rpm | 218 kB 00:02
(14/23): php-xml-5.4.12-1.el5.remi.x86_64.rpm | 235 kB 00:02
(15/23): php-soap-5.4.12-1.el5.remi.x86_64.rpm | 287 kB 00:02
(16/23): php-common-5.4.12-1.el5.remi.x86_64.rpm | 1.0 MB 00:10
(17/23): mysql-libs-5.5.30-1.el5.remi.x86_64.rpm | 1.1 MB 00:11
(18/23): php-mbstring-5.4.12-1.el5.remi.x86_64.rpm | 1.2 MB 00:11
(19/23): libmysqlclient15-5.0.95-1.w5.x86_64.rpm | 1.3 MB 00:15
(20/23): php-cli-5.4.12-1.el5.remi.x86_64.rpm | 2.9 MB 00:29
(21/23): php-5.4.12-1.el5.remi.x86_64.rpm | 3.1 MB 00:31
(22/23): mysql-5.5.30-1.el5.remi.x86_64.rpm | 7.4 MB 01:14
(23/23): mysql-server-5.5.30-1.el5.remi.x86_64.rpm | 13 MB 02:05
------------------------------------------------------------------------------------------------
Total 100 kB/s | 33 MB 05:37
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 00f97f56
Удалитьremi/gpgkey | 1.3 kB 00:00
Importing GPG key 0x00F97F56 "Remi Collet " from /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Check Error:
Удалитьfile /usr/bin/mysqlaccess from install of mysql-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/man/man1/my_print_defaults.1.gz from install of mysql-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/man/man1/mysql.1.gz from install of mysql-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/man/man1/mysql_config.1.gz from install of mysql-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/man/man1/mysql_find_rows.1.gz from install of mysql-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/man/man1/mysql_waitpid.1.gz from install of mysql-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/man/man1/mysqlaccess.1.gz from install of mysql-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/man/man1/mysqladmin.1.gz from install of mysql-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/man/man1/mysqldump.1.gz from install of mysql-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/man/man1/mysqlshow.1.gz from install of mysql-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /etc/my.cnf from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/charsets/cp1251.xml from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 con
flicts with file from package mysql-5.0.95-5.el5_9.i386
Удалитьfile /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
Error Summary
-------------
Теперь перезапускаемся
ОтветитьУдалить[root@localhost moodle]# service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[root@localhost moodle]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Потом еще и менеджер пакетов "обнаружил" эти самые обновления, предложил обновиться... и выдал те же ошибки.
ОтветитьУдалитьВ чем же причина?
1) Может быть в том, что я не задал приоритет (пропустил секцию), исправляем
[root@localhost cli]# gedit /etc/yum.repos.d/CentOS-Base.repo
Находимм:
......................................
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=contrib
#baseurl=http://mirror.centos.org/centos/5/contrib/x86_64/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
......................
priority=2
exclude=*php* *mysql*
Добавляем в конец вот эти последние две строчки
Повторяяем комманду
ОтветитьУдалитьОпять получаем
...........
...........
Transaction Check Error:
file /usr/bin/mysqlaccess from install of mysql-5.5.30-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.95-5.el5_9.i386
...............
...............
Итак, обновление не проходит, может быть, проще сначала снять пакет?
ОтветитьУдалитьКак здесь https://www.centos.org/modules/newbb/viewtopic.php?topic_id=36223
........................
Posts: 15
Correct. It is in c5-testing. I have solved the problem by removing mysql-libs with the following commands:
# yum remove mysql-libs
(which removed mysql mysql-server perl-DBD-MySQL php-mysql)
# yum install mysql mysql-server perl-DBD-MySQL php-mysql
.............................................................
А потом опять попробовать
yum update mysql mysql-server php php-*
В целях экономии времени, отключаем все репозитории:
ОтветитьУдалитьПеречислены сверху вниз (в менеджере пакетов)
Centos (mirrors.centos.......)
addons (Centos addons.....)
base (Ctntos 5....)
centosplus
contrib
debug
extras
rpmforge
updates
webtatic
Остались включенными только:
epel
remi
Итак, почему же не "проходит" обновление пакетов mysql ?
ОтветитьУдалить1) Yum изначально полагает, что rpm пакеты из разных репозиториев по-разному скомпилированы, а значит нельзя их "обновлять", надо старый снять, а новый поставить...(???)
В подтверждении этого я научился и провел вот такую диагностику:
[root@localhost ~]# yum list mysql
Loaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror, filter-data, kernel-module, keys, kmod,
: list-data, merge-conf, priorities, protect-packages, protectbase, refresh-updatesd, security, tsflags,
: upgrade-helper, verify
Bad id for repo: Mymirror,Centos5updates, byte = , 8
Repository remi is listed more than once in the configuration
Repository remi-test is listed more than once in the configuration
Repository remi-debuginfo is listed more than once in the configuration
Repository remi-test-debuginfo is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* epel: mirror.yandex.ru
* remi: fr2.rpmfind.net
0 packages excluded due to repository protections
Installed Packages
mysql.i386 5.0.95-5.el5_9 installed
mysql.x86_64 5.0.95-5.el5_9 installed
Available Packages
mysql.x86_64 5.5.30-1.el5.remi remi
У меня вообще стоял .i386 mysql
УдалитьТак что сносить надо без вопросов...,
вот только есть вариант, что при установке будут снова созданы папки с БД
Этот же вопрос задавали здесь http://unix.stackexchange.com/questions/35904/will-yum-remove-mysql-server-delete-my-databases
Удалить1 down vote
If you want to do a reinstalation of your mysql take a loo at this: all your data is in /var/lib/mysql (check your my.conf) do a copy of all your data in another folder and then do the changes... you can also
check your repos ... rearrange them an install mysql from scrath.. is safer to do all that and becarefull nextime... So do this two things before the reinstalation.
check the version of your mysql.
do the copy of /var/lib/mysql ex:(as root) cp -R /var/lib/mysql /tmp/mysql.bck
И оттуда же (http://unix.stackexchange.com/questions/35904/will-yum-remove-mysql-server-delete-my-databases):
ОтветитьУдалитьIt seems you have different versions of mysql-server being offered by different repos. I'm not sure which one you had running, so I can't tell you which repos to diable. I'm assuming you are running CentOS, but it could be anything with yum.
You can also use repoquery (installed with yum-utils) to check which files your mysql-server package installed and where the databases were located (or find out the initialization script, if that's the way your package installs MySQL).
The next thing, before you do anything else, is to back-up the database files themselves. If you want to have hope of recovering the data, you'll need them.
Once you found out what the exact version of MySQL you were running, installing a fresh box (Amazon's EC2 is your friend) with that exact version and copying the data files over the freshly installed ones may (big if here, and don't do it with MySQL up) allow you do run mysqldump on your database.
As for you original question, I don't think a sane mysql-server package would destroy your installed databases, but I wont bet your data on that.
Итак, выше рекомендации с форума для такого же, как я (начинается с "У меня вообще стоял .i386 mysql
ОтветитьУдалитьТак что сносить надо без вопросов...")
Будем исполнять
1) Тупо скопируем в новую папку (подробности см. выше)
cp -R /var/lib/mysql /tmp/mysql.bck
но можежет так случиться, что новая версия использует "новый" формат файлов бд, тогда надо использовать дамп (?)
Не уверен, что это поможет (года два назад у меня были проблемы с импортом дампамов от phpMySql...)
2)Посмотрю ка, пожалуй, как развернуть новую БД из дампа... посредством mysqldump)
3) После того, как БД заархивирована, попробуем remove для старой версии mysql, ...для этого прочитаем wiki по командам yum и rpm
Отличные примеры bash http://wiki.russianfedora.ru/index.php?title=%D0%A0%D0%B0%D0%B1%D0%BE%D1%82%D0%B0_%D1%81_Yum
Удалить1 Предназначение Yum
2 Основные операции над пакетами
2.1 Поиск в репозиториях
2.2 Установка пакетов с помощью Yum
2.3 Установка пакетов из .rpm файлов
2.4 Обновление системы
2.5 Удаление пакетов
2.6 Использование Yum с прокси-сервером
2.7 Использование Yum для установки локального пакета, автоматически проверяя и удовлетворяя зависимости
2.8 Отображение приоритетов для всех установленных репозиториев
2.9 Поиск с помощью YUM в репозитории пакета по заданной строке
2.10 Запрос имеющихся пакетов из репозитория
2.11 Исключить из обновления yum определенные пакеты
2.12 Скачать пакет, не устанавливая его
2.13 Вывести зависимости пакета
2.14 Удаление ненужных зависимостей
3 При ошибках в работе пакетного менеджера
А это wiki по RPM http://wiki.russianfedora.ru/index.php?title=RPM
УдалитьСодержание
[убрать]
1 Введение
2 База данных RPM
3 Названия пакетов
4 Команды
4.1 Основные команды:
4.2 Полезные команды:
4.3 Для владельцев х86_64
5 Дополнительные опции
База данных RPM ведётся в каталоге
Удалить/var/lib/rpm
Она состоит из одиночной базы данных (Packages), в которой хранится вся информация о пакетах, и множества маленьких баз (__db.001, __db.002 и т. д.), которые служат для индексации и содержат в себе сведения о том, какие файлы менялись и создавались при установке и удалении пакетов.
Так, скопировал
ОтветитьУдалитьcp -R /var/lib/mysql /tmp/mysql.bck
все получилось...
Экспериментировать с дампами не хочется (тем более, что баз данных рабочих нет..., все пустые...), потому попробуем самый простой вариант -
просто снесем старую БД со всеми зависимостями... а потом поставим (переставим новую) Очевидно, что делать это лучше через yum (он отслеживает и разрешает зависимости)
1) Как удалить конкретный пакет?
Удаление пакетов
Удаление пакетов осуществляется с помощью команд remove или erase. Так,
yum remove foo
удалит пакет foo из системы. Для удаления пакета вместе с зависимостями можно воспользоваться плагином Remove with leaves
есть еще команда Вывести зависимости пакета
yum deplist package
В зависимостях чегой-то слишко много и непонятно..., потому вспомним сначала про комманду:
ОтветитьУдалить( Получить список пакетов, где в названии встречается )
rpm -qa | grep
выполняем:
[root@localhost Altersego]# rpm -qa | grep mysql
mysql-devel-5.0.95-5.el5_9
mysql-server-5.0.95-5.el5_9
libdbi-dbd-mysql-0.8.1a-1.2.2
mysql-devel-5.0.95-5.el5_9
mod_auth_mysql-3.0.0-3.2.el5_3
mysql-5.0.95-5.el5_9
mysql-connector-odbc-3.51.26r1127-2.el5
mysql-5.0.95-5.el5_9
php-mysql-5.3.22-1.w5
mysql-connector-odbc64-5.1.8-1.el5
mysql-bench-5.0.95-5.el5_9
Надоело все (бд скопировал), потому просто решил снести все
ОтветитьУдалить[root@localhost Altersego]# yum remove mysql
Loaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror, filter-data, kernel-module, keys, kmod, list-data, merge-conf, priori
: security, tsflags, upgrade-helper, verify
Bad id for repo: Mymirror,Centos5updates, byte = , 8
Repository remi is listed more than once in the configuration
Repository remi-test is listed more than once in the configuration
Repository remi-debuginfo is listed more than once in the configuration
Repository remi-test-debuginfo is listed more than once in the configuration
Setting up Remove Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
Loading mirror speeds from cached hostfile
* epel: mirror.xfes.ru
* remi: remi-mirror.dedipower.com
0 packages excluded due to repository protections
--> Running transaction check
---> Package mysql.i386 0:5.0.95-5.el5_9 set to be erased
--> Processing Dependency: libmysqlclient.so.15 for package: mysql-devel
--> Processing Dependency: libmysqlclient_r.so.15 for package: mysql-devel
--> Processing Dependency: mysql = 5.0.95-5.el5_9 for package: mysql-server
--> Processing Dependency: mysql = 5.0.95-5.el5_9 for package: mysql-devel
--> Processing Dependency: mysql for package: libdbi-dbd-mysql
--> Processing Dependency: mysql = 5.0.95-5.el5_9 for package: mysql-bench
--> Processing Dependency: mysql = 5.0.95-5.el5_9 for package: mysql-devel
---> Package mysql.x86_64 0:5.0.95-5.el5_9 set to be erased
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: mod_auth_mysql
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: php-mysql
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: dovecot
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: mod_auth_mysql
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: php-mysql
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: dovecot
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: MySQL-python
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: mysql-connector-odbc64
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: mysql-connector-odbc
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: MySQL-python
Удалить--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: mysql-connector-odbc64
--> Running transaction check
---> Package MySQL-python.x86_64 0:1.2.3-0.1.c1.el5 set to be erased
---> Package dovecot.x86_64 0:1.0.7-7.el5_7.1 set to be erased
---> Package libdbi-dbd-mysql.x86_64 0:0.8.1a-1.2.2 set to be erased
---> Package mod_auth_mysql.x86_64 1:3.0.0-3.2.el5_3 set to be erased
---> Package mysql-bench.x86_64 0:5.0.95-5.el5_9 set to be erased
---> Package mysql-connector-odbc.x86_64 0:3.51.26r1127-2.el5 set to be erased
---> Package mysql-connector-odbc64.x86_64 0:5.1.8-1.el5 set to be erased
---> Package mysql-devel.i386 0:5.0.95-5.el5_9 set to be erased
---> Package mysql-devel.x86_64 0:5.0.95-5.el5_9 set to be erased
---> Package mysql-server.x86_64 0:5.0.95-5.el5_9 set to be erased
---> Package perl-DBD-MySQL.x86_64 0:3.0007-2.el5 set to be erased
---> Package php-mysql.x86_64 0:5.3.22-1.w5 set to be erased
--> Processing Dependency: php-mysql >= 4.1.0 for package: phpmyadmin
--> Running transaction check
---> Package phpmyadmin.noarch 0:2.11.11.3-2.el5.rf set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================================
УдалитьPackage Arch Version
======================================================================================================================================================
Removing:
mysql i386 5.0.95-5.el5_9
mysql x86_64 5.0.95-5.el5_9
Removing for dependencies:
MySQL-python x86_64 1.2.3-0.1.c1.el5
dovecot x86_64 1.0.7-7.el5_7.1
libdbi-dbd-mysql x86_64 0.8.1a-1.2.2
mod_auth_mysql x86_64 1:3.0.0-3.2.el5_3
mysql-bench x86_64 5.0.95-5.el5_9
mysql-connector-odbc x86_64 3.51.26r1127-2.el5
mysql-connector-odbc64 x86_64 5.1.8-1.el5
mysql-devel i386 5.0.95-5.el5_9
mysql-devel x86_64 5.0.95-5.el5_9
mysql-server x86_64 5.0.95-5.el5_9
perl-DBD-MySQL x86_64 3.0007-2.el5
php-mysql x86_64 5.3.22-1.w5
phpmyadmin noarch 2.11.11.3-2.el5.rf
Transaction Summary
======================================================================================================================================================
Remove 15 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Is this ok [y/N]: y
Is this ok [y/N]: y
УдалитьDownloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : mysql-devel 1/15
Erasing : MySQL-python 2/15
Erasing : mysql-bench 3/15
Erasing : mysql 4/15
warning: /etc/my.cnf saved as /etc/my.cnf.rpmsave
Erasing : mysql-devel 5/15
Erasing : mysql 6/15
Erasing : mysql-connector-odbc64 7/15
Erasing : mod_auth_mysql 8/15
Erasing : php-mysql 9/15
Erasing : phpmyadmin 10/15
warning: /usr/share/phpmyadmin/config.inc.php saved as /usr/share/phpmyadmin/config.inc.php.rpmsave
warning: /etc/httpd/conf.d/phpmyadmin.conf saved as /etc/httpd/conf.d/phpmyadmin.conf.rpmsave
Erasing : libdbi-dbd-mysql 11/15
Erasing : dovecot 12/15
Erasing : mysql-server 13/15
warning: /var/log/mysqld.log saved as /var/log/mysqld.log.rpmsave
Erasing : perl-DBD-MySQL 14/15
Erasing : mysql-connector-odbc 15/15
Removed:
mysql.i386 0:5.0.95-5.el5_9 mysql.x86_64 0:5.0.95-5.el5_9
Dependency Removed:
MySQL-python.x86_64 0:1.2.3-0.1.c1.el5 dovecot.x86_64 0:1.0.7-7.el5_7.1 libdbi-dbd-mysql.x86_64 0:0.8.1a-1.2.2
mod_auth_mysql.x86_64 1:3.0.0-3.2.el5_3 mysql-bench.x86_64 0:5.0.95-5.el5_9 mysql-connector-odbc.x86_64 0:3.51.26r1127-2.el5
mysql-connector-odbc64.x86_64 0:5.1.8-1.el5 mysql-devel.i386 0:5.0.95-5.el5_9 mysql-devel.x86_64 0:5.0.95-5.el5_9
mysql-server.x86_64 0:5.0.95-5.el5_9 perl-DBD-MySQL.x86_64 0:3.0007-2.el5 php-mysql.x86_64 0:5.3.22-1.w5
phpmyadmin.noarch 0:2.11.11.3-2.el5.rf
Complete!
[root@localhost Altersego]#
Итак, самая простая команда сначала предложила снести именно те пакеты, которые и нужно было снести, а потом благополучно все удалила (вроде бы).
Удалить...даже phpmyadmin...
А графическая оболочка тут же предложила обновления... попробуем
Теперь установим
ОтветитьУдалить[root@localhost Altersego]# yum install mysql
Loaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror, filter-data, kernel-module, keys, kmod, list-data, merge-conf,
: priorities, protect-packages, protectbase, refresh-updatesd, security, tsflags, upgrade-helper, verify
Bad id for repo: Mymirror,Centos5updates, byte = , 8
Repository remi is listed more than once in the configuration
Repository remi-test is listed more than once in the configuration
Repository remi-debuginfo is listed more than once in the configuration
Repository remi-test-debuginfo is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* epel: mirror.xfes.ru
* remi: remirpm.mirror.gymkl.ch
Skipping filters plugin, no data
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
Skipping filters plugin, no data
--> Running transaction check
---> Package mysql.x86_64 0:5.5.30-1.el5.remi set to be updated
--> Processing Dependency: mysql-libs = 5.5.30-1.el5.remi for package: mysql
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.5.30-1.el5.remi set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
[root@localhost Altersego]# yum install mysql
УдалитьLoaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror, filter-data, kernel-module, keys, kmod, list-data, merge-conf,
: priorities, protect-packages, protectbase, refresh-updatesd, security, tsflags, upgrade-helper, verify
Bad id for repo: Mymirror,Centos5updates, byte = , 8
Repository remi is listed more than once in the configuration
Repository remi-test is listed more than once in the configuration
Repository remi-debuginfo is listed more than once in the configuration
Repository remi-test-debuginfo is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* epel: mirror.xfes.ru
* remi: remirpm.mirror.gymkl.ch
Skipping filters plugin, no data
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
Skipping filters plugin, no data
--> Running transaction check
---> Package mysql.x86_64 0:5.5.30-1.el5.remi set to be updated
--> Processing Dependency: mysql-libs = 5.5.30-1.el5.remi for package: mysql
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.5.30-1.el5.remi set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================================
УдалитьPackage Arch Version Repository Size
======================================================================================================================================================
Installing:
mysql x86_64 5.5.30-1.el5.remi remi 7.4 M
Installing for dependencies:
mysql-libs x86_64 5.5.30-1.el5.remi remi 1.1 M
Transaction Summary
======================================================================================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)
Total size: 8.6 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
WARNING : This MySQL RPM is not an official Fedora / Red Hat build and it
overrides the official one. Don't file bugs on Fedora Project nor Red Hat.
Use dedicated forums http://forums.famillecollet.com/
Installing : mysql-libs 1/2
Installing : mysql 2/2
Installed:
mysql.x86_64 0:5.5.30-1.el5.remi
Dependency Installed:
mysql-libs.x86_64 0:5.5.30-1.el5.remi
Complete!
А где же сервер? А при его установке не удалось разрешить зависимость...
ОтветитьУдалитьзагрузить пакет, менеджер паетов выдал ошибку:
No package perl-DBD-MySQL
Вот решение http://www.tecmint.com/install-mysql-on-rhel-centos-6-5-fedora-17-12/
Проверил репозитории - подключены зеркала, два искомых файла
ОтветитьУдалить# yum --enablerepo=remi list mysql mysql-server
Available Packages
mysql.i686 5.5.30-1.el6.remi remi
mysql-server.i686 5.5.30-1.el6.remi remi
у меня тоже есть, поэтому по инструкции
Выполняем установку
[root@localhost ~]# yum --enablerepo=remi install mysql mysql-server
Loaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror,
: filter-data, kernel-module, keys, kmod, list-data, merge-conf,
: priorities, protect-packages, protectbase, refresh-updatesd,
: security, tsflags, upgrade-helper, verify
Bad id for repo: Mymirror,Centos5updates, byte = , 8
Repository remi is listed more than once in the configuration
Repository remi-test is listed more than once in the configuration
Repository remi-debuginfo is listed more than once in the configuration
Repository remi-test-debuginfo is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* epel: fedora-mirror01.rbc.ru
* epel-debuginfo: fedora-mirror01.rbc.ru
* epel-source: fedora-mirror01.rbc.ru
* remi: rpms.famillecollet.com
* remi-test: rpms.famillecollet.com
Skipping filters plugin, no data
263 packages excluded due to repository priority protections
0 packages excluded due to repository protections
Setting up Install Process
Package mysql-5.5.30-1.el5.remi.x86_64 already installed and latest version
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
Skipping filters plugin, no data
--> Running transaction check
---> Package mysql-server.x86_64 0:5.5.30-1.el5.remi set to be updated
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server
--> Finished Dependency Resolution
mysql-server-5.5.30-1.el5.remi.x86_64 from remi has depsolving problems
--> Missing Dependency: perl-DBD-MySQL is needed by package mysql-server-5.5.30-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: perl-DBD-MySQL is needed by package mysql-server-5.5.30-1.el5.remi.x86_64 (remi)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
Полдключил старые репозитории Centos... там должны быть старые версии пакета perl-DBD-MySQL
ОтветитьУдалить[root@localhost ~]# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
Retrieving http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
Preparing... ########################################### [100%]
package remi-release-5-9.el5.remi.noarch is already installed
[root@localhost ~]# yum --enablerepo=remi install mysql-server
.....
Loading mirror speeds from cached hostfile
* epel: mirror.yandex.ru
* epel-debuginfo: mirror.yandex.ru
* epel-source: mirror.yandex.ru
* remi: remi.mirrors.arminco.com
* remi-test: remi.mirrors.arminco.com
* rpmforge: nl.mirror.eurid.eu
epel | 3.6 kB 00:00
epel-debuginfo | 2.5 kB 00:00
epel-source | 2.8 kB 00:00
remi | 2.5 kB 00:00
remi-test | 2.5 kB 00:00
remi-test-debuginfo | 2.4 kB 00:00
webtatic | 1.9 kB 00:00
Skipping filters plugin, no data
4499 packages excluded due to repository priority protections
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
Skipping filters plugin, no data
--> Running transaction check
---> Package mysql-server.x86_64 0:5.5.30-1.el5.remi set to be updated
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:3.0007-1.fc6 set to be updated
--> Processing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) for package: perl-DBD-MySQL
--> Processing Dependency: libmysqlclient.so.15()(64bit) for package: perl-DBD-MySQL
--> Running transaction check
---> Package mysqlclient15.x86_64 0:5.0.67-1.el5.remi set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
Удалить=========================================================================================================
Package Arch Version Repository Size
=========================================================================================================
Installing:
mysql-server x86_64 5.5.30-1.el5.remi remi 13 M
Installing for dependencies:
mysqlclient15 x86_64 5.0.67-1.el5.remi remi 1.3 M
perl-DBD-MySQL x86_64 3.0007-1.fc6 C5.0-base 147 k
Transaction Summary
=========================================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)
Total size: 14 M
Total download size: 147 k
Is this ok [y/N]: y
Downloading Packages:
perl-DBD-MySQL-3.0007-1.fc6.x86_64.rpm | 147 kB 00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mysqlclient15 1/3
Installing : perl-DBD-MySQL 2/3
Installing : mysql-server 3/3
Installed:
mysql-server.x86_64 0:5.5.30-1.el5.remi
Dependency Installed:
mysqlclient15.x86_64 0:5.0.67-1.el5.remi perl-DBD-MySQL.x86_64 0:3.0007-1.fc6
Complete!
You have new mail in /var/spool/mail/root
Получилось, что при сносе старой mysql, yum разрешил зависимости и снес еще модули (о чем сообщил мне в письме You have new mail in /var/spool/mail/root):
ОтветитьУдалить--------------------- yum Begin ------------------------
Packages Installed:
mysql-5.5.30-1.el5.remi.x86_64
mysql-libs-5.5.30-1.el5.remi.x86_64
libedit-2.11-2.20080712cvs.el5.x86_64
libssh2-1.2.7-1.el5.remi.x86_64
t1lib-5.1.1-9.el5.x86_64
libcurl-7.21.7-5.el5.remi.2.x86_64
Packages Updated:
php-xmlrpc-5.4.12-1.el5.remi.x86_64
php-xml-5.4.12-1.el5.remi.x86_64
php-imap-5.4.12-1.el5.remi.x86_64
php-mbstring-5.4.12-1.el5.remi.x86_64
xdg-utils-1.0.2-4.el5.noarch
php-soap-5.4.12-1.el5.remi.x86_64
php-5.4.12-1.el5.remi.x86_64
php-common-5.4.12-1.el5.remi.x86_64
php-pdo-5.4.12-1.el5.remi.x86_64
php-cli-5.4.12-1.el5.remi.x86_64
php-ldap-5.4.12-1.el5.remi.x86_64
php-mcrypt-5.4.12-1.el5.remi.x86_64
fribidi-0.19.2-2.el5.x86_64
arj-3.10.22-6.el5.x86_64
php-gd-5.4.12-1.el5.remi.x86_64
php-intl-5.4.12-1.el5.remi.x86_64
Packages Erased:
php-mysql
mod_auth_mysql
mysql-server
phpmyadmin
MySQL-python
perl-DBD-MySQL
libdbi-dbd-mysql
mysql
mysql-connector-odbc
mysql-connector-odbc64
dovecot
mysql-devel
mysql-bench
**Unmatched Entries**
---------------------- yum End -------------------------
После этокго сервер запускается:
ОтветитьУдалить[root@localhost ~]# service mysqld start
Starting mysqld: [ OK ]
[root@localhost ~]# mysql ?
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[root@localhost ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Но phpinfo() не видит mysql
[root@localhost ~]# php info
Could not open input file: info
[root@localhost ~]# php -i
phpinfo()
PHP Version => 5.4.12
Кроме того, phpmyadmin тоже снесен...
Получается, что не надо было ыполнят комманду yum remove с разрешением зависимостей?
ОтветитьУдалитьНужно было оставить старые модули, если их формат ...не i386
А теперь подключаем по очереди все то, что перечислено выше, как
Packages Erased:
php-mysql
mod_auth_mysql
mysql-server
phpmyadmin
MySQL-python
perl-DBD-MySQL
libdbi-dbd-mysql
mysql
mysql-connector-odbc
mysql-connector-odbc64
dovecot
mysql-devel
mysql-bench
Припоминаю, что некоторые модули я доустанавлвивал вручную... и до сих пор не знаю, нужны ли они?
Начнем стех, которые точно нужны...
Репозиторий Centos я уже подключил, а есть еще ftp://rpmfind.net/linux/mageia/distrib/cauldron/x86_64/
ОтветитьУдалитьздесь я нагуглил и скачал на рабочий стол файл
perl-DBD-mysql-4.22.0-2.mga3.x86_64.rpm
Пока вместо этого файла загрузил более стары вариант из Centos репозитория, mysqld заработал...
Теперь надо бы обновиться, но получается, что у меня пакеты будут из трех разных репозиториев, лучше бы из одного...
Не знаю также, как подключить этот репозиторий ...в крайнем случае, обновлюсь из скачанного файла
rpm -Uhv perl-DBD-mysql-4.22.0-2.mga3.x86_64.rpm
Так, как же лучше поступить, загрузить стары файлы (снесенные) из Centos, потом подключить новый репозиторий, и они сами обновятся?
Такой вариант представляется наиболее правильным... Но будут ли работать новые файлы php со старыми версиями из Centos?
На поиск в менеджере пакетов, тот выдал мне последние версии, выбрал
ОтветитьУдалитьphp-mysql-5.4.12-1.el5.remi
The php-mysql package contains a dynamic shared object that will add MySQL database support to PHP. MySQL is an object-relational database management system. PHP is an HTML-embeddable scripting language. If you need MySQL support for PHP applications, you will need to install this package and the php package.
mod_auth_mysql-3.0.0-3.1
mod_auth_mysql can be used to limit access to documents served by a web server by checking data in a MySQL database.
phpMyAdmin-3.5.7-1.el5.remi
MySQL-python-1.2.1-1
libdbi-dbd-mysql
Все это вручную обновил чере менеджерпакетов, он сам предлагал поздние версии...
Проверим, подключился ли mysql и php
ОтветитьУдалить[root@localhost ~]# php -i | grep mysql
/etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/pdo_mysql.ini,
mysql
MYSQL_SOCKET => /var/lib/mysql/mysql.sock
MYSQL_INCLUDE => -I/usr/include/mysql
MYSQL_LIBS => -L/usr/lib64/mysql -lmysqlclient
mysql.allow_local_infile => On => On
mysql.allow_persistent => On => On
mysql.connect_timeout => 60 => 60
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysql.trace_mode => Off => Off
mysqli
MYSQLI_SOCKET => /var/lib/mysql/mysql.sock
mysqli.allow_local_infile => On => On
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off
PDO drivers => mysql, sqlite
pdo_mysql
pdo_mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock
Все можно было бы считать успешным, сайты работают..., но при попытке обновлений через менеджер пакетов выскакивает ошибка
ОтветитьУдалитьPackage Arch Version Repository Size
=======================================================================================================================
Removing:
curl i386 7.15.5-15.el5 installed 464 k
curl x86_64 7.15.5-15.el5 installed 472 k
Removing for dependencies:
gnupg x86_64 1.4.5-14.el5_5.1 installed 4.4 M
nspluginwrapper i386 1.3.0-9.el5 installed 458 k
nspluginwrapper x86_64 1.3.0-9.el5 installed 436 k
openoffice.org-base x86_64 1:3.1.1-19.10.el5_8.4 installed 6.3 M
openoffice.org-calc x86_64 1:3.1.1-19.10.el5_8.4 installed 26 M
openoffice.org-core x86_64 1:3.1.1-19.10.el5_8.4 installed 277 M
openoffice.org-draw x86_64 1:3.1.1-19.10.el5_8.4 installed 3.0 M
openoffice.org-emailmerge x86_64 1:3.1.1-19.10.el5_8.4 installed 38 k
openoffice.org-graphicfilter x86_64 1:3.1.1-19.10.el5_8.4 installed 711 k
openoffice.org-impress x86_64 1:3.1.1-19.10.el5_8.4 installed 3.9 M
openoffice.org-langpack-ru x86_64 1:3.1.1-19.10.el5_8.4 installed 48 M
openoffice.org-math x86_64 1:3.1.1-19.10.el5_8.4 installed 4.1 M
openoffice.org-pyuno x86_64 1:3.1.1-19.10.el5_8.4 installed 461 k
openoffice.org-testtools x86_64 1:3.1.1-19.10.el5_8.4 installed 1.1 M
openoffice.org-writer x86_64 1:3.1.1-19.10.el5_8.4 installed 19 M
openoffice.org-xsltfilter x86_64 1:3.1.1-19.10.el5_8.4 installed 1.9 M
spamassassin x86_64 3.3.1-2.el5 installed 3.1 M
vorbis-tools x86_64 1:1.1.1-3.el5 installed 526 k
Transaction Summary
=======================================================================================================================
[root@localhost ~]# rpm -qa |grep curl
curl-7.15.5-15.el5
libcurl-7.21.7-5.el5.remi.2
curl-7.15.5-15.el5
[root@localhost ~]# rpm -e curl-7.15.5-15.el5.i386
error: Failed dependencies:
libcurl.so.3 is needed by (installed) nspluginwrapper-1.3.0-9.el5.i386
[root@localhost ~]# rpm -e curl-7.15.5-15.el5.i386 nspluginwrapper-1.3.0-9.el5.i386
[root@localhost ~]# rpm -qa |grep curl
curl-7.15.5-15.el5
libcurl-7.21.7-5.el5.remi.2
Опять был конфликт между старым i386 и новыми x86_64
УдалитьСначала хотел использовать yum -e curl
потом отменил удаление и просто удалил два пакета
root@localhost ~]# rpm -e curl-7.15.5-15.el5.i386 nspluginwrapper-1.3.0-9.el5.i386
все вроде бы прошло успешно, теперь попробуем обновится
[root@localhost ~]# yum update curl
ОтветитьУдалитьLoaded plugins: aliases, allowdowngrade, changelog, downloadonly, fastestmirror, filter-data, kernel-module, keys,
: kmod, list-data, merge-conf, priorities, protect-packages, protectbase, refresh-updatesd, security,
: tsflags, upgrade-helper, verify
Bad id for repo: Mymirror,Centos5updates, byte = , 8
Repository remi is listed more than once in the configuration
Repository remi-test is listed more than once in the configuration
Repository remi-debuginfo is listed more than once in the configuration
Repository remi-test-debuginfo is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* epel: mirror.yandex.ru
* epel-debuginfo: mirror.yandex.ru
* epel-source: mirror.yandex.ru
* remi: mirror.awanti.com
* remi-test: mirror.awanti.com
* rpmforge: mirror.awanti.com
Skipping filters plugin, no data
4499 packages excluded due to repository priority protections
0 packages excluded due to repository protections
Skipping security plugin, no data
Setting up Update Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
Skipping filters plugin, no data
Skipping security plugin, no data
--> Running transaction check
--> Processing Dependency: libcurl.so.3()(64bit) for package: gnupg
--> Processing Dependency: libcurl.so.3()(64bit) for package: nspluginwrapper
--> Processing Dependency: libcurl.so.3()(64bit) for package: openoffice.org-core
--> Processing Dependency: libcurl.so.3()(64bit) for package: vorbis-tools
---> Package curl.x86_64 0:7.21.7-5.el5.remi.2 set to be updated
--> Running transaction check
---> Package compat-libcurl3.x86_64 0:7.15.5-2.el5.remi set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================
Updating:
curl x86_64 7.21.7-5.el5.remi.2 remi 250 k
Installing for dependencies:
compat-libcurl3 x86_64 7.15.5-2.el5.remi remi 183 k
Transaction Summary
=======================================================================================================================
Install 1 Package(s)
Upgrade 1 Package(s)
Total size: 434 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : compat-libcurl3 1/3
Updating : curl 2/3
Cleanup : curl 3/3
Dependency Installed:
compat-libcurl3.x86_64 0:7.15.5-2.el5.remi
Updated:
curl.x86_64 0:7.21.7-5.el5.remi.2
Complete!
Удачсно прошло обновление php через менеджер пакетов...
ОтветитьУдалитьиз репозитория remi (он неофициальный...)