Linux serverNETWORK ADMINISTRATIONS

Install Centos 8, Samba 4.13, Active Directory (Cap. 5/18 Preparación Centos 8 para AD FS)

Command list and shell scripts:
2. Actualizar Centos 8 / Upgrade Centos 8
dnf -y upgrade
reboot

3. Deshabilitar ipv6 / Disable ipv6 (Opcional / Optional)
grub2-editenv – list | grep kernelopts
grub2-editenv – set “`grub2-editenv – list | grep kernelopts` ipv6.disable=1”

4. Deshabilitar servicios / Disable services (Opcional / Optional)
systemctl stop firewalld
systemctl disable firewalld
vi /etc/selinux/config
sync
reboot

5. Instalar Repositorios / Add Additional Repositories
dnf config-manager –set-enabled PowerTools
dnf -y install epel-release
vi /etc/yum.repos.d/epel.repo

dnf -y install elrepo-release
vi /etc/yum.repos.d/elrepo.repo
## En la siguiente instrucción se ha incluido un espacio entre https://
## y el resto de la dirección. Para ejecutar elimina el espacio.
dnf -y install https:// rpms.remirepo.net/enterprise/remi-release-8.rpm
rpm -ql remi-release
grep ‘enabled=1’ /etc/yum.repos.d/remi-*
vi /etc/yum.repos.d/remi-safe.repo
vi /etc/yum.repos.d/remi-modular.repo

6. Instalar ntp o chrony / Set up NTP Server
dnf -y install chrony
vi /etc/chrony.conf

############## script /etc/chrony.conf#################
pool 192.168.1.3 iburst

# Permitir sincronizar hora a los equipos de la red:
allow 192.168.1.0/24
###############################################

systemctl restart chronyd
systemctl enable –now chronyd
chronyc sources

7. Instalar algunas herramientas / Install required packages
dnf install -y wget vim net-tools bind-utils

8. Configurar /etc/hosts / Configure /etc/hosts
hostnamectl adfs04.proves.lan
vi /etc/hosts

## /etc/hosts ###########################
# Comentar linea ipv6
# Incluir nombre completo de hosts y alias
192.168.1.4 adfs04.proves.lan adfs04
#####################################

9. Revisar la instalación / Check configuration
hostname
hostname -f
hostname -a
hostname -d

10. Instalar bind y reiniciar equipo / Install bind and reboot
dnf -y install bind bind-sdb
sync
reboot

11. Configurar /etc/resolv.conf / Configure /etc/resolv.conf
vi /etc/resolv.conf

## /etc/resolv.conf ####
Incluir debajo de search:
domain proves.lan
##################

12. Instalar bibliotecas para samba4 AD / Install required packages
vi bootstrap_generated-dists_centos8_bootstrap.sh

## script bootstrap_generated-dists_centos8_bootstrap.sh

#!/bin/bash
#
# This file is generated by ‘bootstrap/template.py –render’
# See also bootstrap/config.py
#

set -xueo pipefail

yum update -y
yum install -y dnf-plugins-core
yum install -y epel-release

yum -v repolist all
yum config-manager –set-enabled PowerTools -y
yum config-manager –set-enabled Devel -y
yum update -y

yum install -y
–setopt=install_weak_deps=False
“@Development Tools”
acl
attr
autoconf
avahi-devel
bind-utils
binutils
bison
ccache
chrpath
cups-devel
curl
dbus-devel
docbook-dtds
docbook-style-xsl
flex
gawk
gcc
gdb
git
glib2-devel
glibc-common
glibc-langpack-en
glusterfs-api-devel
glusterfs-devel
gnutls-devel
gpgme-devel
gzip
hostname
htop
jansson-devel
keyutils-libs-devel
krb5-devel
krb5-server
libacl-devel
libarchive-devel
libattr-devel
libblkid-devel
libbsd-devel
libcap-devel
libcephfs-devel
libicu-devel
libnsl2-devel
libpcap-devel
libtasn1-devel
libtasn1-tools
libtirpc-devel
libunwind-devel
libuuid-devel
libxslt
lmdb
lmdb-devel
make
mingw64-gcc
ncurses-devel
openldap-devel
pam-devel
patch
perl
perl-Archive-Tar
perl-ExtUtils-MakeMaker
perl-Parse-Yapp
perl-Test-Simple
perl-generators
perl-interpreter
pkgconfig
popt-devel
procps-ng
psmisc
python3
python3-cryptography
python3-devel
python3-dns
python3-gpg
python3-libsemanage
python3-markdown
python3-policycoreutils
python3-pyasn1
quota-devel
readline-devel
redhat-lsb
rng-tools
rpcgen
rpcsvc-proto-devel
rsync
sed
sudo
systemd-devel
tar
tree
wget
which
xfsprogs-devel
yum-utils
zlib-devel

yum clean all
## End script

sh bootstrap_generated-dists_centos8_bootstrap.sh
dnf -y install libicu-devel tracker libtirpc-devel glib2-devel

ATENCIÓN: Todo el material contenido en este curso es meramente de carácter didáctico. No se acepta ninguna responsabilidad por el uso que se pueda hacer del mismo. Para un entorno de producción se deberían estudiar las características del proyecto y adaptarlo a sus necesidades.

source

centos 7

Leave a Reply

Your email address will not be published. Required fields are marked *