service name alias? mariadb->mysql - how?
service name alias? mariadb->mysql - how?
What it is the cleanest way under 7 to make an alias for a service name?
I keep typing service mysql instead of service mariadb
(we won't even get into how it now is systemctl mariadb)
as a side question, since /var/run is now tempfs by default, where is the mariadb directory created on boot?
I tried to change the my.cnf to use /var/run/mysql instead and the problem is the directory vanishes with every reboot.
But the /var/run/mariadb is persistent. So something is creating it - but I cannot figure out where.
I keep typing service mysql instead of service mariadb
(we won't even get into how it now is systemctl mariadb)
as a side question, since /var/run is now tempfs by default, where is the mariadb directory created on boot?
I tried to change the my.cnf to use /var/run/mysql instead and the problem is the directory vanishes with every reboot.
But the /var/run/mariadb is persistent. So something is creating it - but I cannot figure out where.
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: service name alias? mariadb->mysql - how?
/var/run is a symlink to ../run.
Re: service name alias? mariadb->mysql - how?
Aha, I think I finally found the answer to my own question
systemd has an alias option under [Install]
edit /usr/lib/systemd/system/mariadb.service
add
Alias=mysql.service
and
systemctl enable mariadb
it then makes
ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/mysql.service'
Now I just need to figure out where it makes the /var/run/mariadb directory
systemd has an alias option under [Install]
edit /usr/lib/systemd/system/mariadb.service
add
Alias=mysql.service
and
systemctl enable mariadb
it then makes
ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/mysql.service'
Now I just need to figure out where it makes the /var/run/mariadb directory
Re: service name alias? mariadb->mysql - how?
Right, and that is now tempfs by default which is new since 6.5gerald_clark wrote:/var/run is a symlink to ../run.
So the system is recreating the /var/run/mariadb (aka /run/mariadb) directory on each boot.
The question is where is that happening, can I augment it, and if that is not the right place to edit, where/when is the best place to create new directories in /var/run
I guess I could just put it in the /var/run root.
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: service name alias? mariadb->mysql - how?
/var/run contains the pid files of running services. It is better if it is not permanent.
/etc/my.cnf deffines datadir=/var/lib/mysql.
That is not tmpfs.
/etc/my.cnf deffines datadir=/var/lib/mysql.
That is not tmpfs.
Re: service name alias? mariadb->mysql - how?
Okay I found the answer to my second question here:
https://wiki.archlinux.org/index.php/sy ... rary_files
/usr/lib/tmpfiles.d/mariadb.conf
has
d /var/run/mariadb 0755 mysql mysql -
and I guess I can put my own in /etc/tmpfiles.d/
yeah, systemd is so much cleaner and simplier than init.d, NOT
they've lost their minds adopting this systemd mess
everything could have just been in one init.d file in simple bash method/systax, now everything is 100% proprietary
https://wiki.archlinux.org/index.php/sy ... rary_files
/usr/lib/tmpfiles.d/mariadb.conf
has
d /var/run/mariadb 0755 mysql mysql -
and I guess I can put my own in /etc/tmpfiles.d/
yeah, systemd is so much cleaner and simplier than init.d, NOT
they've lost their minds adopting this systemd mess
everything could have just been in one init.d file in simple bash method/systax, now everything is 100% proprietary
Re: service name alias? mariadb->mysql - how?
yes of course the datadir is not tmpfs, that would be crazy, lolgerald_clark wrote:/var/run contains the pid files of running services. It is better if it is not permanent.
/etc/my.cnf deffines datadir=/var/lib/mysql.
That is not tmpfs.
but you can also do this in my.cnf
socket=/var/run/mariadb/mysql.sock
pid-file=/var/run/mariadb/mysql.pid
and now I know I can create
/etc/tmpfiles.d/mariadb.conf
and put in there
d /var/run/mysql 0755 mysql mysql -
and when mariadb(aka mysql) starts it will create the /var/run/mysql directory
All you have to do is remember 15 billion little things with systemd, damn I hate it.
update: nope, this doesn't work, doesn't create it, now I have to spend an hour reading about how systemd-tmpfiles works
okay all I needed was to somehow know/remember to run systemd-tmpfiles --create
have I mentioned how much I hate systemd ?
- centminmod
- Posts: 44
- Joined: 2014/07/12 14:28:06
- Location: Brisbane, Australia
- Contact:
Re: service name alias? mariadb->mysql - how?
for me easiest way is disable CentOS 7 default included MariaDB and choose to use the official MariaDB YUM repo for CentOS 6 on CentOS7. That maintains the init.d/mysql naming and use of service mysql *
this also gives access to more updated MariaDB 5.5.38 and 10.0.x
this also gives access to more updated MariaDB 5.5.38 and 10.0.x
Re: service name alias? mariadb->mysql - how?
Is that you eva? You are everywhere, but makes sense here toocentminmod wrote:for me easiest way is disable CentOS 7 default included MariaDB and choose to use the official MariaDB YUM repo for CentOS 6 on CentOS7. That maintains the init.d/mysql naming and use of service mysql *
this also gives access to more updated MariaDB 5.5.38 and 10.0.x
Thanks for confirming that the 6.x mariadb build works with 7.x - I was wondering if that was possible.
I wonder if that also means some missing things from the 7.x EPEL can be borrowed from the 6.x EPEL
By the way, since I know you like performance things too, I found out it is much easier to build HHVM on 7.x than 6.x, much much easier.
HHVM building is not quite a "minmod" thing but you might be interested in adding it as an optional script to your collection.
- centminmod
- Posts: 44
- Joined: 2014/07/12 14:28:06
- Location: Brisbane, Australia
- Contact:
Re: service name alias? mariadb->mysql - how?
Your username can't quite place it ??_ck_ wrote:Is that you eva? You are everywhere, but makes sense here toocentminmod wrote:for me easiest way is disable CentOS 7 default included MariaDB and choose to use the official MariaDB YUM repo for CentOS 6 on CentOS7. That maintains the init.d/mysql naming and use of service mysql *
this also gives access to more updated MariaDB 5.5.38 and 10.0.x
Thanks for confirming that the 6.x mariadb build works with 7.x - I was wondering if that was possible.
I wonder if that also means some missing things from the 7.x EPEL can be borrowed from the 6.x EPEL
By the way, since I know you like performance things too, I found out it is much easier to build HHVM on 7.x than 6.x, much much easier.
HHVM building is not quite a "minmod" thi[*]ng but you might be interested in adding it as an optional script to your collection.
Yes it's me centminmod = eva2000 and yes I am everywhere Confirmed working MariaDB official YUM repo with CentOS 7.0 KVM netinstalled VPS https://community.centminmod.com/thread ... erver.797/ when testing my Centmin Mod .08 beta LEMP web stack auto installer
Centmin Mod LEMP Web stack installed
- CentOS 7.0 64bit netinstall
- Nginx 1.7.3 + ngx_pagespeed 1.8.31-4 beta
- PHP 5.4.30 (PHP-FPM) + APC 3.1.13 + igbinary
- MariaDB 5.5.38 via official MariaDB YUM repo
- Additional source compiled PHP Extensions: imagick 3.1.2, memcache 3.0.8, memcached 2.2.0, libmemcached 1.0.18
- Memcached 1.4.20 server with Libevent 2.0.21
- CSF Firewall 7.0.4
- Siege 3.0.6 benchmark
Actually, already testing Facebook HHVM support for Centmin Mod and it's on my to do list https://community.centminmod.com/thread ... do-list.7/
Although HHVM might not be needed if PHPNG is anything to go by https://community.centminmod.com/thread ... p-5-6.888/