Accidentally delete virtualmin repo from /etc/yum.repos.d

10 posts / 0 new
Last post
#1 Wed, 08/01/2018 - 19:09
panjeh

Accidentally delete virtualmin repo from /etc/yum.repos.d

Hi, The history is:

For a period I had the pro license and after that I decided to downgrade it. According to this: https://www.virtualmin.com/documentation/installation/uninstalling I tried to downgrade but I had the same issue like : https://www.virtualmin.com/node/13952

During following this comment: https://www.virtualmin.com/comment/727696#comment-727696 I accidentally deleted virtualmin.repo and also virtualmin.rep.rpmnew from /etc/yum.repos.d

Now I got the pro license again and want to fix it.

I also read this: https://www.virtualmin.com/node/40588 and tried to restore virtualmin.repo but I couldn't. the response is:

package virtualmin-release-1.0-5.gpl.rhel.noarch is already installed

I also tried this: rpm -ivh http://software.virtualmin.com/gpl/centos/7/x86_64/virtualmin-release-1.... and: rpm -ivh http://software.virtualmin.com/gpl/centos/7/x86_64/virtualmin-release-la...

But the response is the same. package virtualmin-release-1.0-5.gpl.rhel.noarch is already installed

when I checked the /etc/yum.repos.d there is no virtualmin.repo

Could you please help me? Kind Regards,

Wed, 08/01/2018 - 20:15
panjeh

In addition I did:

wget http://software.virtualmin.com/gpl/centos/7/x86_64/virtualmin-release-1....

and then

rpm -Uivh virtualmin-release-1.0-5.gpl.rhel.noarch.rpm

It says: package virtualmin-release-1.0-5.gpl.rhel.noarch is already installed

but still there is no virtualmin.repo at /etc/yum.repos.d.

I appreciate any help to restore it. P.S : Right now I can access the virtualmin panel without problem.

Thu, 08/02/2018 - 02:56
thathwamasi

Hello panjeh,

1) Could you try to deploy a Vm and install a virtualmin pro version there trial and then copy the repo files ? 2) You have to use yum remove command ( not sure if this will remove your virtualmin itself not recommended), try to remove the repo rpm and then install only repo rpm. ( Not recommended as not sure if it will remove additional rpm)

Thu, 08/02/2018 - 09:33
panjeh

Dear thathwamasi, Thank you for your reply and your help.

I finally got the virtualmin.repo in such way:

Based on this comment: https://www.virtualmin.com/node/40588 As I told already I could not bring it back. but I just added "--force" to the command like:

rpm -ivh --force URL

and since I understood from the above post that I have "virtualmin-release-1.0-5.gpl.rhel.noarch" installed so for the url I put this as the URL:

http://software.virtualmin.com/gpl/centos/7/x86_64/virtualmin-release-1.0-5.gpl.rhel.noarch.rpm

Now I have a virtualmin.repo in the /etc/yum.repos.d The content is:

[virtualmin]
name=RHEL/CentOS/Scientific $releasever - $basearch - Virtualmin
baseurl=http://SERIALNUMBER:LICENSEKEY@software.virtualmin.com/gpl/rhel/$releasever/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-virtualmin
gpgcheck=1

[virtualmin-universal]
name=Virtualmin Distribution Neutral Packages
baseurl=http://SERIALNUMBER:LICENSEKEY@software.virtualmin.com/gpl/universal/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-virtualmin
gpgcheck=1

then I did:

yum update

It downloaded some updates from virtualmin.

Then I put my new Serial Number License key in the file /etc/virtualmin-license

but didn't do this: wget -O install.sh http://software.virtualmin.com/cgi-bin/install.cgi?serial=******\&key=*****; /bin/sh install.sh

since the terminal alarms you may loose the virtualmin settings.

In virtualmin panel I see: Warning! A problem was detected with your Virtualmin license : ....

How can I solve this?

Thu, 08/02/2018 - 10:28
thathwamasi

Dear panjeh,

Could you please try with below command,

https://www.virtualmin.com/documentation/developer/cli/change_licence

virtualmin change-licence --serial number --key id [--no-check]

Thu, 08/02/2018 - 10:58
andreychek

Howdy,

Yeah whatever you do don't re-run the installer, that'll cause all sorts of issues :-)

The change-license command mentioned above is the best way to change your server's Virtualmin license.

After the "Problem detected with your license" message, do you see any errors there?

Note that it's no problem to discuss things here in the Forums, though we (the Virtualmin staff) don't always see everything here... if at any point you don't feel like you're making progress, feel free to open a request in the support tracker and we can help you out there.

-Eric

Thu, 08/02/2018 - 12:30 (Reply to #6)
panjeh

Dear andreychek,

I've just seen your reply. Thank you so much for your help and your guidance.

Best Regards,

Thu, 08/02/2018 - 12:04
panjeh

Dear thathwamasi,

Thank you so much for your attention and your kind support.

This command worked for me without [--no-check] . ( note: when I put [--no-check] at the end it says : Unknown parameter [--no-check] )

virtualmin change-licence --serial ***** --key *****

The response is:

Checking serial **** and key ****** ..
.. valid for 10 domains until 2018-09-01

Updating Virtualmin YUM repository ..
.. done

Updating Virtualmin license file ..
.. done

Again I checked the virtualmin panel after a reboot. It says:

Warning!
A problem was detected with your Virtualmin license :
The licence for this server expired on 2018-01-20 A renewal can be purchased at http://www.virtualmin.com/shop

I pressed the button that is below this warning "recheck the license".

After that I saw It was resolved and the license is renewed to the new date! and there is no warning yet in the virtualmin panel.

I again checked the content of the virtualmin.repo in the /etc/yum.repos.d/ directory

[virtualmin]
name=RHEL/CentOS/Scientific $releasever - $basearch - Virtualmin
baseurl=http://****:*******@software.virtualmin.com/gpl/rhel/$releasever/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-virtualmin
gpgcheck=1

[virtualmin-universal]
name=Virtualmin Distribution Neutral Packages
baseurl=http://***:********B@software.virtualmin.com/gpl/universal/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-virtualmin
gpgcheck=1

I see the new license there! and also I see "gpl" in this url string : software.virtualmin.com/gpl/rhel/$releasever/$basearch/

Is it Okay?

And in the dashboard I see Virtualmin version 6.02 Pro.

I need to be sure that I will get the pro updates in the future based on the new content of virtualmin.repo on above. And it is important for me that there would be no security issue or any associated problem.

How can I check the the pro virtualmin works well? Is there a command?

Best Regards,

Thu, 08/02/2018 - 12:12
thathwamasi

Dear Panjeh, You are most welcome, happy to see everything is working fine for you. sorry, I am not sure on how to check that as i have not used a pro license, it would be best if andreychek(Eric) replied for the last question.

Thu, 08/02/2018 - 12:18
panjeh

Dear thathwamasi ,

Thank you, that's very kind of you.

I will wait for Eric's response.

Best Regards,

Topic locked