私はLinuxに少し慣れていないため、WindowsのVirtualboxでさまざまなLAMPセットアップをテストしています。現在、Centos 7を使用していますVMこれは、MariaDBをインストールしようとしています。以下の手順に従っています。 http://www.tecmint.com/install-lamp-in -centos-7
私は走った
# yum install mariadb-server mariadb
端末出力によるとインストールは成功しましたが、実行すると:
# systemctl start mariadb
私は得る
Failed to start mariadb.service: Unit not found.
私は過去数時間を使ってこれをグーグルで調べましたが、これ( mariadb-serverのインストール後にmysqldまたはmysql.serverがない )および他の多くの投稿を含めて、私の問題を解決するようには見えません。
どんな助けでも大歓迎です。
私はmariadbをアンインストールしました:
[root@centos7 admin]# yum remove mysql
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-client.x86_64 0:10.0.30-1.el7.centos will be erased
--> Processing Dependency: MariaDB-client for package: MariaDB-server-10.0.30-1.el7.centos.x86_64
--> Running transaction check
---> Package MariaDB-server.x86_64 0:10.0.30-1.el7.centos will be erased
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================
Package Arch Version Repository Size
===================================================================================
Removing:
MariaDB-client x86_64 10.0.30-1.el7.centos @mariadb 49 M
Removing for dependencies:
MariaDB-server x86_64 10.0.30-1.el7.centos @mariadb 237 M
Transaction Summary
===================================================================================
Remove 1 Package (+1 Dependent package)
Installed size: 286 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : MariaDB-server-10.0.30-1.el7.centos.x86_64 1/2
Erasing : MariaDB-client-10.0.30-1.el7.centos.x86_64 2/2
Verifying : MariaDB-client-10.0.30-1.el7.centos.x86_64 1/2
Verifying : MariaDB-server-10.0.30-1.el7.centos.x86_64 2/2
Removed:
MariaDB-client.x86_64 0:10.0.30-1.el7.centos
Dependency Removed:
MariaDB-server.x86_64 0:10.0.30-1.el7.centos
Complete!
実行されたyum clean all
およびyum update
mariadbを再インストール:
# yum install mariadb-server mariadb
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* Webmin: download.webmin.com
* base: anorien.csc.warwick.ac.uk
* extras: centos.mirrors.nublue.co.uk
* updates: centos.serverspace.co.uk
Package mariadb-server is obsoleted by MariaDB-server, trying to install MariaDB-server-10.0.30-1.el7.centos.x86_64 instead
Package mariadb is obsoleted by MariaDB-client, trying to install MariaDB-client-10.0.30-1.el7.centos.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package MariaDB-client.x86_64 0:10.0.30-1.el7.centos will be installed
---> Package MariaDB-server.x86_64 0:10.0.30-1.el7.centos will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================
Package Arch Version Repository Size
===================================================================================
Installing:
MariaDB-client x86_64 10.0.30-1.el7.centos mariadb 10 M
MariaDB-server x86_64 10.0.30-1.el7.centos mariadb 55 M
Transaction Summary
===================================================================================
Install 2 Packages
Total download size: 65 M
Installed size: 65 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): MariaDB-10.0.30-centos7-x86_64-client.rpm | 10 MB 00:00:22
(2/2): MariaDB-10.0.30-centos7-x86_64-server.rpm | 55 MB 00:01:15
-----------------------------------------------------------------------------------
Total 876 kB/s | 65 MB 01:15
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : MariaDB-client-10.0.30-1.el7.centos.x86_64 1/2
Installing : MariaDB-server-10.0.30-1.el7.centos.x86_64 2/2
libsemanage.map_file: Unable to open /usr/share/mysql/SELinux/mariadb.pp
(No such file or directory).
libsemanage.semanage_direct_install_file: Unable to read file /usr/share/mysql/SELinux/mariadb.pp
(No such file or directory).
/usr/sbin/semodule: Failed on /usr/share/mysql/SELinux/mariadb.pp!
Verifying : MariaDB-client-10.0.30-1.el7.centos.x86_64 1/2
Verifying : MariaDB-server-10.0.30-1.el7.centos.x86_64 2/2
Installed:
MariaDB-client.x86_64 0:10.0.30-1.el7.centos
MariaDB-server.x86_64 0:10.0.30-1.el7.centos
Complete!
まだ行きません、何ができますか?
# systemctl start mariadb.service
Failed to start mariadb.service: Unit not found.
パッケージのバージョンと大文字の使い方に問題がある可能性があります。インストールにcentosではなくmariaDBリポジトリを使用したため、バージョン10.0.30が選択されました。
]# yum info mariadb-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* Webmin: download.webmin.com
* base: anorien.csc.warwick.ac.uk
* extras: centos.mirrors.nublue.co.uk
* updates: centos.serverspace.co.uk
Installed Packages
Name : MariaDB-server
Arch : x86_64
Version : 10.0.30
Release : 1.el7.centos
Size : 237 M
Repo : installed
From repo : mariadb
Summary : MariaDB: a very fast and robust SQL database server
URL : http://mariadb.org
License : GPLv2
Description : MariaDB: a very fast and robust SQL database server
:
: It is GPL v2 licensed, which means you can use the it free of charge
: under the conditions of the GNU General Public License Version 2
: (http://www.gnu.org/licenses/).
:
: MariaDB documentation can be found at https://mariadb.com/kb
: MariaDB bug reports should be submitted through
: https://jira.mariadb.org
Available Packages
Name : mariadb-server
Arch : x86_64
Epoch : 1
Version : 5.5.52
Release : 1.el7
Size : 11 M
Repo : base/7/x86_64
Summary : The MariaDB server and related files
URL : http://mariadb.org
License : GPLv2 with exceptions and LGPLv2 and BSD
Description : MariaDB is a multi-user, multi-threaded SQL database server. It is a
: client/server implementation consisting of a server daemon (mysqld)
: and many different client programs and libraries. This package
: contains the MariaDB server and some accompanying files and
: directories. MariaDB is a community developed branch of MySQL.
さらなる研究により、MariaDB repo(v 10.0.30)ではcentos repo(v5.5)とは対照的にmysql
と呼ばれるサービスがmariadb
と呼ばれることがあり、これが1つの混乱/問題でした。
参照質問: Centos7のMariaDB、サービスはまだMySqlと呼ばれています
実行中# service mysql start
はERROR
を返しました
エラーチェック
grep: journalctl -xe|grep 'mysqld.*errno'
表示:
/usr/bin/mysqld_safe_helper: Cannot change uid/gid (errno: 1)
この投稿をフォローすると、MariaDB 10.0.XXバージョンとSELinuxに関連する問題が修正されたようです。
https://www.penguinprompt.com/mariadb-10-0-29-update-failure-selinux/
Mysqlサービスを開始してmysql_secure_installation
で構成できます
私も同じ問題を抱えています。私の解決策は:Sudo systemctl start mysql.service
およびSudo chkconfig mysql on
。
多分あなたはSeLinuxを一時的に無効にすべきです:Sudo setenforce 0
ご挨拶