ADRE-I01 Clase

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

INSTALAR SAMBA [root@master ~]# yum -y install samba Compartir un directorio con el servidor samba [root@master ~]# mkdir

/home/share [root@master ~]# chmod 777 /home/JC [root@master ~]# vi /etc/samba/smb.conf # line 58: add the lines unix charset = UTF-8 dos charset = CP932 # line 75: change workgroup = WORKGROUP hosts allow = 127.10.0.0 # line 102: change security = share # Agregue el recurso compartido [jcnet] # Cualquier directorio path = /home/JC writable = yes guest ok = yes guest only = yes create mode = 0777 directory mode = 0777 share modes = yes [root@master ~]# /etc/rc.d/init.d/smb start Starting SMB services: Starting NMB services: [root@master ~]# chkconfig smb on

[ OK ] [ OK ]

SERVIDOR NFS [root@ master ~]# vi /etc/exports # add *note /home 192.168.0.0/24(rw,sync,no_root_squash) # *note /home Recurso que se comparte 192.168.0.0/24 Red que puede accede al recurso rw permiso de lectura y escritura sync sincronizacion no_root_squash habilitar permisos de root [root@ master ~]# /etc/rc.d/init.d/portmap start Starting portmap: [root@ master ~]# /etc/rc.d/init.d/nfs start Starting nfs services: Starting nfs quotas: Starting nfs daemon: Starting nfs mountd: [root@ master ~]#/etc/rc.d/init.d/nfslock start Starting NFS statd: [root@ master ~]#chkconfig nfs on [root@ master ~]#chkconfig nfslock on [root@ master ~]#chkconfig portmap on

[ OK ]

[ [ [ [

OK OK OK OK

] ] ] ]

[ OK ]

Configuracin del CLIENTE NFS [root@ master ~]# /etc/rc.d/init.d/portmap start Starting portmap: [root@ master ~]# /etc/rc.d/init.d/nfslock start Starting NFS statd: [root@ master ~]# /etc/rc.d/init.d/netfs start Mounting other filesystems: [root@ master ~]# chkconfig nfslock on [root@ master ~]# chkconfig portmap on [root@ master ~]# chkconfig netfs on [root@ master ~]# mount -t nfs nfs.svconsultec-linux.sv:/home /home [root@ master ~]# df m Filesystem /dev/hda1 tmpfs 257 /dev/hda5 /dev/hda3 /dev/hda4 nfs.svconsultec-linux.sv:/home 1M-blocks Used Available Use% 5040 382 0 257 1008 34 5040 1062 10080 205 100794 188 Mounted on 4403 8% 0% /dev 924 4% 3723 23% 9364 3% 95486 1%

[ OK ] [ OK ] [ OK ]

/ /shm /tmp /usr /var /home

# Verificamos si el directorio home esta montado [root@ master ~]# vi /etc/fstab # add at the bottom: change home directory this server mounts to the one on NFS /dev/hda1 / ext3 defaults 11 devpts /dev/pts devpts gid=5,mode=620 0 0 tmpfs /dev/shm tmpfs defaults 00 proc /proc proc defaults 00 sysfs /sys sysfs defaults 00 /dev/hda5 /tmp ext3 defaults 12 /dev/hda3 /usr ext3 defaults 12 /dev/hda4 /var ext3 defaults 12 /dev/hda2 swap swap defaults 00 nfs.svconsultec-linux.sv:/home /home nfs defaults 12

Instalacin de SQUID SERVER

root@ master ~]# yum -y install squid [root@ master ~]# vi /etc/squid/squid.conf # line 919: change http_port 8080 acl CONNECT method CONNECT # line 590: add ( allow from only LAN ) acl lan src 192.168.0.0/255.255.255.0 http_access allow localhost # line 637: add ( allow from only LAN ) http_access allow lan http_access deny all # line 3003: add ( define hostname ) visible_hostname lan.svconsultec-linux.sv # forwarded_for on # line 4275: add ( hide IP ) forwarded_for off # line 2789: add these lines header_access Referer deny all header_access X-Forwarded-For deny all header_access Via deny all header_access Cache-Control deny all [root@ master ~]# /etc/rc.d/init.d/squid start init_cache_dir /var/spool/squid... Starting squid: [root@ master ~]# chkconfig squid on

[ OK ]

Instalacion de HTTPD

[root@ master ~]# yum -y install httpd

Configuracion de HTTPD

[root@ master ~]# vi /etc/httpd/conf/httpd.conf # line 44: change ServerTokens Prod # line 74: change to ON KeepAlive On # line 251: Admin's address ServerAdmin [email protected] # line 265: server's name ServerName www.svconsultec.sv:80 # line 320: change (disable Indexes) Options FollowSymLinks ExecCGI # line 327: change AllowOverride All # line 391: add file name that it can access only with directory's name DirectoryIndex index.html index.cgi index.php # line 524: change ServerSignature Off # line 747: make it comment #AddDefaultCharset UTF-8 AddHandler cgi-script .cgi .pl [root@ master ~]# /etc/rc.d/init.d/httpd start Starting httpd: [root@ master ~]# chkconfig httpd on

[ OK ]

Pagina de PRUEBA

[root@www ~]# vi /var/www/html/index.html <html> <body> <div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;"> El Poder esta en Linux <<<< Svconsultec s.r.l >>>> </div> </body> </html>

You might also like