Translate

Friday, February 9, 2018

Developer tips - CentOS 7 notes

Just a post with some notes to remember what to do when encountering some recurring problems after installing CentOS on a vm for tests.

The scenario : installation CentOS 7 64 bit on VirtualBox (on a Mac)
  1. yum update
    After installation yum update is not working
    Yum returns an error like : "Cannot find a valid baseurl for repo".

    Could be a connection problem and a configuration problem.
    Let try to issue the command : sudo dhclient

    If it solve the problem (i.e. if Yum works as expected) edit the file /etc/sysconfig/network-scripts/ifcfg-enp0s3.
    Change the line ONBOOT=No in ONBOOT=Yes.
    Save.
    Reboot

    Is possible sudo command will not work (see sudoers below)
  2. Gnome GUI
    Installation of the iso (tested on DVD.iso) does not have a GUI.
    To install Gnome :
    1. yum update
    2. yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
    3. ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
    4. reboot
  3. Sudoers
    Add the user in the sudoers list.
    Assuming to be logged as user, go in the root account using for example ssh.
    1. ssh root@localhost
    2. If the first time type Yes to the request to add the localhost key.
      Then enter the root password
    3. Use the command visudo to edit the sudoers list.
      Locate the root and add below the user with the same levels of access
    4. save

No comments:

Post a Comment