2017. szeptember 16., szombat

CentOS howto I - basic VM

  1. Install Oracle VirtualBox
  2. Download CentOS DVD ISO: https://www.centos.org/download/
  3. Create a new VM
    1. mount DVD image as optical drive
    2. swap the network adapter type to Bridged network
  4. Start the VM, Install CentOS with "Minimal install"
    1. Start with partitioning, defaults should be good
    2. Go to network
      1. Make sure adapter configured to start automatically
      2. Rename the host
    3. Set time zone and ntp
  5. Login (as root) and make sure the adapter is set to autostart
    1. nmtui
    2. Edit a connection / enp0s8 (check the name in the VM settings)
    3. check Automatically connect
    4. Exit the ui
    5. systemctl restart network
  6. Disable ipv6 (it is sooo slow)
    1. Append below lines in /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

    1. sysctl -p
    2. nano /etc/ssh/sshd_config
    3. Append this to the config file:

AddressFamily inet

    1. systemctl restart sshd
  1. Do a minimal samba installation

    1. Configure firewall
      1. firewall-cmd --permanent --zone=public --add-service=samba
      2. firewall-cmd --reload
    2. Install samba
      1. yum install samba 
      2. mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
      3. nano /etc/samba/smb.conf
      4. Enter the above to the text editor, save and exit
[global]
workgroup = WORKGROUP
netbios name = server1
security = user
map to guest = Bad User
dns proxy = no
  1. Enable and start samba
    1. systemctl enable smb.service
    2. systemctl enable nmb.service
    3. systemctl restart smb.service
    4. systemctl restart nmb.service
  2. Test samba
    1. testparm /etc/samba/smb.conf
    2. At this point you should be able to login with Putty as well
  3. update your new server
    1. yum makecache fast
    2. yum install epel-release
    3. yum update
    4. yum install nano (unless you prefer vi)

Nincsenek megjegyzések:

Megjegyzés küldése