web analytics

Monthly Archives May 2020

Failed to start crond.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files

Sometimes you might come across some errors as follows, when you start services in servers.

Failed to start crond.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files 

Nothing to worry, it could just be because you don’t have the proper permission to do so, or you failed to add a ‘sudo’ infront of the command. Juts try with sudo and it will work.

[abc@greproot ~]$ sudo systemctl start crond.service
[abc@greproot ~]$ sudo systemctl status crond.service
● crond.service – Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-05-28 10:29:05 UTC; 10s ago

Read More

Create local yum repo in Centos7

To create a local yum repo, all you need to do is to make sure the packages are available in a path in the server, say /downloaded_packages/

Now, create a repo file. Be default, all repo files are present in the path /etc/yum.repos.d/ . I am going to name my repo as local_yum, so I will create a repo file named local_yum.repo and add the following contents in it.

cat /etc/yum.repos.d/local_yum.repo

[local_yum]
name=local_yum
baseurl=file:///downloaded_packages/
gpgcheck=0
enabled=1

The above files tells the programme to take the packages from the baseurl mentioned in the file, which in our case is our local folder /downloaded_packages/

Now check if our repo is listed correctly. In my case, I have not set any other repos, so only my local repo is listed...

Read More