Use the following command to update to the latest rpm
yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
mirrorlist.centos.org is no longer active.
Use
vi /etc/yum.repos.d/CentOS-Base.repo
to update your repos as follows:
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=http://vault.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Now updates and installs should work normally again.
To get started after installing CentOS7 you will need to follow these steps:
First Update CentOS
yum update
Install wget
yum install wget
Download Virtualmin
wget http://software.virtualmin.com/gpl/scripts/install.sh
Install Webmin
/bin/sh install.sh
You should now be able to access Virtualmin Control panel via https > your domain > port 10000
Step by Step install of CentOS7 on Microsoft Hyper-V Server
- Create new VHD Generation 1
- Install from iso
- Configure network
- Check, "Automatically connect to this network when it is available"
- If manual IP allocation configure IPv4 & IPv6 as needed.
- Set root password
- Finish install
Download and install Linux Integration Services 4.0 from microsoft
- Download Linux IC4.0
- attach the ISO from HyperV
- run the following commands:
# mount /dev/cdrom /media
# cd /media
# ./install.sh
# reboot
Update Network settings
- right click on the virtual machine and click settinsg then expand network adapter select advanced features and note the mac address.
- run the following commands:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
- use "i" to insert text, (esc) to exit and ":wq" to write your changes to make the file look like this:
TYPE="Ethernet"
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=eth0
UUID=(leave this as is)
DEVICE="eth0"
ONBOOT=yes
HWADDR=(MAC ADDRESS, This should match what is configured in Hyper-V)
Networking=yes
IPADDR=(YOUR SERVER IP)
PREFIX={your network prefix ie /24 = 24}
GATEWAY=(YOUR DEFAULT GATEWAY)
DNS1=(PRIMARY DNS SERVER IP)
DNS2=(SECONDARY DNS SERVER IP)
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6+PRIVACY=no
- now restart the network:
service network restart
Instalation should be complete
Be sure to run > yum update
If you receive "could not resolve host mirror.centos.org" be sure that onboot=yes in the network config.