Linux serverNETWORK ADMINISTRATIONS

MODULO 4.4 COMPLETO – SO3 – MONTAJES EN LINUX – CENTOS 8



ESTOS SON LABORATORIOS REALIZADOS POR UN ESTUDIANTE DEL ITLA CALIFICADOS POR EL PROFESOR TOMAS RODRIGUEZ EN LA MATERIA SISTEMA OPERATIVO 3 – MATRICULA 2019-8590 – MARIO DE JESÚS GUZMÁN CABRAL

COMANDOS———————————————————-4.4
usar 2 servidores centos 8 preferiblemente

nmtui server1 ip 192.168.122.201 gateway 192.168.139.2 (el gateway es la red de tu vmware con la ruta al final .2 para que tengas internet) al acabar apagas y prendes esa interfaz de red
ifdown ens33
ifup ens33

nmtui server1 ip 192.168.122.200 gateway 192.168.139.2 (el gateway es la red de tu vmware con la ruta al final .2 para que tengas internet) al acabar apagas y prendes esa interfaz de red
ifdown ens33
ifup ens33

NFS

yum install -y autofs
ls /etc/ | grep auto
vim /etc/auto.master.d/data.autofs
/ /etc/auto.data

mkdir /labdata

vim /etc/auto.data
labdata -rw,sync 192.168.122.200:/data

systemctl start autofs
systemctl enable autofs

mount -a
mount

debe aparecer alguna configuracion de automount

AUTOMONTAJE /ETC/FSTAB

yum install -y cifs-utils samba-client
//192.168.122.200/data /srv/samba/guest cifs _netdev,x-systemd.automount 0 0

mkdir /svr/samba/
mkdir /svr/samba/guest
mount -a
mount NO FUNCIONARA

CREAR LA CARPETA COMPARTIDA EN LA COMPUTADORA PRUEBA Y USAR ESTE MONTADO EN NUESTRO SERVIDOR 1
Exercise 24-3 Setting Up a Samba Server
1. CONFIGURA ESTA CARPETA COMPARTIDA EN EL SERVIDOR 2

2. Type mkdir /data so that you have a directory that can be shared
through Samba.

3. Open the share for SELinux USA ESTE COMANDO semanage fcontext -a -t public_content_t
“/data(/.*)?”.

4. Type restorecon -Rv /data to apply the newly set SELinux context.

5. cd /data
touch Hola.txt.

6. Enable the Linux-based access control by typing chmod 770 /data
esto es para lectura y escritura si quieres editar el archivo ya creado o diversas cosas poner
chmod 777 /data.

7. Install the Samba service by typing yum install -y samba.

8. Edit the /etc/samba/smb.conf configuration el archivo y al final agregar estas lines:
[data]
comment = data
read only = No
path = /data

9. Type systemctl enable –now smb to start and enable the Samba server.

10. Open the firewall by typing firewall-cmd –permanent –add-service=samba
firewall-cmd –reload.

11. To create a CIFS-compatible user account, type smbpasswd -a (USUARIO QUE PERMITIRAS ENTRAR A LA CARPETA). This will
add DATA credentials to the Linux user que quieras. Notice that this only works if
you have an existing Linux user with the name el que desees

FTP

yum install -y vsftpd
vim /etc/vsftpd/vsftpd.conf

el anonimus ponerlo en YES en mayuscula

systemctl enable –now vsftpd
systemctl start vsftpd
firewall-cmd –permanent –add-service=vsftpd
firewall-cmd –reload

source
centos 7

Leave a Reply

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