Hi all,
I install CentOS 7 minimal for my personal LAMP server.
I using MariaDB 10 for database, after finish installation why i can't use
systemctl status mariadb.service
systemctl start mariadb.service
using google, in some website said to start mariaDB in CentOS 7 you can use systemctl start mariadb.service
why in my CentOS 7 i can't do this?
instead i need to use systemctl start mysql
is there any problem in my CentOS installation?
Confusing with systemctl for mariadb
Re: Confusing with systemctl for mariadb
CentOS supplies mariadb 5.5 not 10. If you installed 10 then you got the packages from elsewhere and they may not be systemd aware or they may be named differently. You'll have to ask the place where you got them from.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Confusing with systemctl for mariadb
Hi trevorH,TrevorH wrote:CentOS supplies mariadb 5.5 not 10. If you installed 10 then you got the packages from elsewhere and they may not be systemd aware or they may be named differently. You'll have to ask the place where you got them from.
thanks information.
i am using mariadb official repo when installing mariadb 10, meaning mariadb 10 from mariadb official not systemd aware?
Code: Select all
https://downloads.mariadb.org/mariadb/repositories/#distro=RedHat&distro_release=rhel7-amd64&version=10.0
Re: Confusing with systemctl for mariadb
Code: Select all
[jyoung@young Downloads]$ ls
MariaDB-10.0.15-centos7_0-x86_64-server.rpm
[jyoung@young Downloads]$ rpm -qlp MariaDB-10.* | grep service$
warning: MariaDB-10.0.15-centos7_0-x86_64-server.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
[jyoung@young Downloads]$ rpm -qlp MariaDB-10.* | grep init
warning: MariaDB-10.0.15-centos7_0-x86_64-server.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
/etc/init.d/mysql
If you're concerned about having to use the name mysql, what about symlinking /etc/init.d/mysql to /etc/init.d/mariadb.
Code: Select all
sudo bash
cd /etc/init.d
ln -s mysql mariadb
exit
Code: Select all
sudo bash
cd ~
yum install -y --downloadonly mariadb-server
rpm2cpio mariadb-server* | cpio -idmv
mv usr/lib/systemd/system/*.service . ## Save this file here just in case you need an original from which to work
cp -r *.service* /etc/systemd/system/
systemctl daemon-reload
systemctl enable mariadb
systemctl start mariadb
-- Jeremy --
Re: Confusing with systemctl for mariadb
thanks jyoung, i have use your tricks to use soft link
jyoung wrote:The RPM that you've downloaded is not built for systemd. It's using a SysV style startup script. The command that you're running, "systemctl start mysql", works because it uses the script that is provided in the RPM that you've downloaded.Code: Select all
[jyoung@young Downloads]$ ls MariaDB-10.0.15-centos7_0-x86_64-server.rpm [jyoung@young Downloads]$ rpm -qlp MariaDB-10.* | grep service$ warning: MariaDB-10.0.15-centos7_0-x86_64-server.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY [jyoung@young Downloads]$ rpm -qlp MariaDB-10.* | grep init warning: MariaDB-10.0.15-centos7_0-x86_64-server.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY /etc/init.d/mysql
If you're concerned about having to use the name mysql, what about symlinking /etc/init.d/mysql to /etc/init.d/mariadb.Or, download the CentOS-provided mariadb-server RPM and use it's unit file as a starting point for using systemd to manage the service?Code: Select all
sudo bash cd /etc/init.d ln -s mysql mariadb exit
Code: Select all
sudo bash cd ~ yum install -y --downloadonly mariadb-server rpm2cpio mariadb-server* | cpio -idmv mv usr/lib/systemd/system/*.service . ## Save this file here just in case you need an original from which to work cp -r *.service* /etc/systemd/system/ systemctl daemon-reload systemctl enable mariadb systemctl start mariadb