mysqld.service
is a "virtual" unit – it doesn't exist on the filesystem, it's just part of systemd's compatibility layer. You can start it and systemd will run the legacy /etc/rc.d/mysqld
initscript, but you cannot systemctl enable
it because you need a real .service
file which could be symlinked into the proper place.
You can write such a unit yourself and put it in /etc/systemd/system/mysqld.service
:
[Unit]
Description=MySQL Server
After=network.target
[Service]
ExecStart=/usr/bin/mysqld --defaults-file=/etc/mysql/my.cnf --datadir=/var/lib/mysql --socket=/var/run/mysqld/mysqld.sock
User=mysql
Group=mysql
WorkingDirectory=/usr
[Install]
WantedBy=multi-user.target
Run systemctl daemon-reload
after creating/modifying.
Alternatively, you can install the initscripts-systemd
package, which includes arch-daemons.target
for automatically starting services defined in rc.conf
. However, this package might go away soon, and it's always better to have native configuration files for the init system in use.
First, this has 100% nothing to do with Amazon EC2 servers versus Linode servers. This is a simple—but still complex—issue of am RPM needing dependencies that are not installed on the system. Clear up those dependencies and all should be good.
Before anything else, look at the errors returned:
--> Finished Dependency Resolution
Error: Package: x2goserver-4.0.1.19-3.el7.x86_64 (epel)
Requires: perl(File::Which)
Error: Package: x2goserver-4.0.1.19-3.el7.x86_64 (epel)
Requires: perl(Config::Simple)
Error: Package: x2goserver-4.0.1.19-3.el7.x86_64 (epel)
Requires: perl(Capture::Tiny)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
The issue is you just need to install Requires: perl(File::Which)
, Requires: perl(Config::Simple)
and Requires: perl(Capture::Tiny)
before the main command. Those are Perl CPAN modules. Apparently the RPM doesn’t handle those Perl specific dependencies.
While I’m unfamiliar with x2go
, this should work for installing the Perl CPAN modules.
First, get into your home directory on the server:
cd ~/
Next, install Perl on your system like this:
sudo yum install perl
Or you might need to run this command to get Perl and CPAN installed:
sudo yum install perl-SPAN
But after that is done, run cpan
like this via sudo
:
sudo cpan
Now install YAML for the CPAN setup:
install YAML
Finally, install the actual CPAN modules like this:
install File::Which Config::Simple Capture::Tiny
When that’s done, exit:
quit
And now run that yum
command again:
yum -y install x2goserver-xsession
Hopefully that all works. But if all of this doesn’t work—or if more errors come up—this could mean you need to explicitly use a CentOS 7.0 OS on the Amazon EC2 instance.
Best Answer
I've got the same problem on Debian 8 aka Jessie and, although systems are different, this solution could help, if you don't mind to alter configuration files.
Create file
/etc/tmpfiles.d/rpcbind.conf
:Create
/etc/systemd/system/rpcbind.service
:and enabled above unit:
Create
/etc/systemd/system/nfs-common.service
:Enable it with:
Presumably, that should do the trick for CentOS as well.
It also looks like there is a newer version of rpcbind-0.2.3, which has native systemd support, but haven't try it...