Enviar archivos y carpeta de pc a pc #scp adanaque root@10.10.21.19:/root #scp -r /descargas13 root@10.10.21.

19:/root Extraer archivos y carpetas de pc a pc #scp root@10.10.21.19:/descargas19/mejia /home #scp -r root@10.10.21.19:/descargas19/ /home -------------------Para Instalar #vim /etc/yum.conf proxy=http://10.32.1.2:8080 esc :wq #yum -y install samba --------------------------------SAMBA (LINUX A WINDOWS) #setup (desabilitar cortafuegos) #rpm -q samba samba-client samba-common #vim /etc/samba/smb.conf [Global Settings] workgroup = LAB_A14 server string = SISTEMAS OPERATIVOS LINUX netbios name = localhost esc :wq #testparm COMPARTIR UNA CARPETA Y Q HAYA RED Y HACERLE PING A LA MAQUINA DE WINDOWS #ping 10.10.25.80 #smbclient //10.10.25.80/linux1 -U administrator smb: \> ls smb: \> exit (WINDOWS A LINUX) #vim /etc/samba/smb.conf [Share Definitions] [homes] comment = Home Directories browseable = no writable = yes [compartido] comment = Esta compartido en linux browseable = yes writable = yes path = /home/invitado1 create mode = 0777 [printers] comment = All Printers path = /var/spool/samba browseable = no guest ok = no writable = no printable = yes esc :wq

#testparm #useradd invitado1 #passwd invitado1 #smbpasswd -a invitado1 #service smb restart #setup #ping 10.10.25.45 ---------------------------------------------APACHE #rpm -q httpd (1 pagina) #vim /etc/httpd/conf/httpd.conf [MAIN SERVER] ServerName www.antisa.com:80 DocumentRoot "/var/www/html" esc :wq #vim /etc/hosts 10.10.21.19 www.antisa.com localhost esc :wq #cd /var/www/html #vim index.html Mi primera pagina esc :wq #service httpd restart Browser: www.antisa.com (2 a mas paginas) #vim /etc/httpd/conf/httpd.conf [VIRTUAL HOST] NameVirtualHost 10.10.21.19:80 <VirtualHost 10.10.21.19:80> ServerName www.web1.com DocumentRoot "/var/www/html/web1" </virtualhost> <VirtualHost 10.10.21.19:80> ServerName www.web2.com DocumentRoot "/var/www/html/web2" </virtualhost> esc :wq #vim /etc/hosts 10.10.21.19 www.web1.com localhost 10.10.21.19 www.web2.com localhost #cd /var/www/html #mkdir /var/www/html/web1 #mkdir /var/www/html/web2 #cd /var/www/html/web1 #vim index1.html #cd /var/www/html/web2 #vim index2.html #service httpd restart

Browser: www.web1.com www.web2.com ---------------------------------------------JOOMLA #rpm –q httpd mysql mysql-server php-mysql phpcli php-common php-gd php-mbstring #vim /etc/httpd/conf/httpd.conf [VIRTUAL HOST] NameVirtualHost 10.10.21.19:80 <VirtualHost 10.10.21.19:80> ServerName www.joomla.com DocumentRoot "/var/www/html/web1" </virtualhost> esc :wq #vim /etc/hosts 10.10.21.19 www.joomla.com localhost #cd /var/www/html #mkdir /var/www/html/web1 #service httpd restart #cd /media/ANTISA/ #cp /media/ANTISA/Joomla_1...tar.gz /var/www/html/web1 #cd /var/www/html/web1 #tar -xzvf Joomla_1...tar.gz http://www.joomla.com #chmod -R 777 /var/www/html/web1 #service mysqld restart #mysql -u root mysql> set password for 'root'@'localhost'=password('123456'); mysql> exit #mysql -u root –p mysql> grant all on joomla.* to 'admin1'@'localhost' identified by '123456' with grant option; mysql> flush privileges; http://www.joomla.com #rm -fr /var/www/html/web1/installation/ --------------------------------------------------------DRUPAL #rpm –q httpd mysql mysql-server php-mysql phpcli php-common php-gd php-mbstring #vim /etc/httpd/conf/httpd.conf [VIRTUAL HOST] NameVirtualHost 10.10.21.19:80 <VirtualHost 10.10.21.19:80> ServerName www.drupal.com DocumentRoot "/var/www/html/web2" </virtualhost> esc :wq

zone /var/named/chroot/var/named #cp practicalinux1.0.com.4 #ps ax | grep nfs #ps ax | grep mountd #service nfs restart #ps ax | grep nfs #ps ax | grep mountd #cd /etc/ #ls expor* #vim exports /nfs/descargas *(ro.gz --strip-components=1 #service mysqld restart http://www.10.gz /var/www/html/web2 #cd /var/www/html/web2 #tar -xzvf drupal-6. profesorlinux. Connect:localhost.21.10. #chgrp -R apache .conf zone "profesorlinux.com #vim relay-domains dominiocorreo.1 RELAY *este es mi ip personal-->COMENTARIO connect:10.22.10.10.10-->mi ip #setup(FIREWALL) #showmount -e 10.10./sites/default/default.com -----------------------------------------------NFS #rpm -q nfs-utils rpcbind #rpm -q pormap --es en centos 5.25.15 profesorlinux. mysql> grant all on drupal.com #dig @10. zone "21.com" { type master. file "profesorlinux. allow-update { none. allow-update { none.0.25.21.22-->otra ip #mount -t nfs 10..drupal.19 www.drupal. }.10.10.21 ftp> bye o quit (MODO GRAFICO) Privacidad/Limpiar los datos->poner check a todo ftp://10.com -------------------------------------------DNS #rpm -q bind bind-utils bind-libs bind-chroot caching-nameserver #vim named.zone #vim profesorlinux.zone profesorlinux.com #chown -R root /var/www/html/web2 #chown -R apache /var/www/html/web2 **chgrp -R apache /var/www/html/web2 #cp . mysql> flush privileges. file "21.10.10./sites/default/ #chmod -R g+w .22:/nfs/descargas/ /nfs/descargas/ --------------------------------FTP #rpm -q vsftpd #cd /etc/vsftpd #ls #vim vsftpd.15 profesorlinux.21.zone".com MX nslookup >www.conf anonymous_enable=NO/12 local_enable=YES/15 local_umask=644/22 anon_upload_enable=YES/27 anon_mkdir_write_enable=NO/31 ftpd_banner=Welcome/85 chroot_list_enable=YES/96 chroot_list_file=/etc/vsftpd/chroot_list/98 #setup #vim chroot_list gerente1 Esc :wq #useradd gerente1 #passwd gerente1 #service vsftpd restart #cd #cd /home/gerente1 #cat > ejemplo1 HOLA Esc :wq (TERMINAL) #ftp 10.profesorlinux.10.21.php .zone"./sites/default/settings./sites/default/ **chmod -R g+w sites/default http://www.arpa. Expiracion 86400.com localhost #cd /var/www/html #mkdir /var/www/html/web2 #service httpd restart #cd /media/ANTISA/ #cp /media/ANTISA/drupal-6.21.php #chgrp -R apache .10.drupal.21. }.localdomain RELAY Connect:localhost RELAY Connect:127.zone /var/named/chroot/var/named #cd /var/named/chroot/var/named/ #mv practicalinux1. #service named restart #host profesorlinux.com #vim sendmail.21.com.10.conf /var/named/chroot/etc #cp 23.10.com.15 mail IN A 10.in-addr-arpa.. Tiempo de Reintentos 604800.com #service mysqld restart #mysql -u root mysql> create database drupal.com.in-addr.tar.zone #service named restart #cd /var/named/chroot/etc #vim named.15 #dig @10.rw) Esc :wq #service nfs restart(ERROR) #mkdir -p var/nfs/descargas #service nfs restart #showmount -e 10./sites/default/ **chown -R apache .10.zone 21.com.com.10.in-addr-arpa.22.25./sites/default #chgrp -R root .21.in-addr.10.zone $TTL 86400 @ IN SOA @ root ( 42.arpa" { type master.tar.* to 'admin2'@'localhost' identified by '123456' with grant option. IN MX 10 mail.10.inaddr. }.10.#vim /etc/hosts 10.arpa.profesorlinux.settings. Numero de Serie # 2880.10. }.com.15 #mv 23.mc .11 --------------------------------------------------------SEND MAIL #rpm -q sendmail dovecot cyrus-sasl-md5 cyrussasl-plain mc m4 #cd /etc/mail #ls #vim access *by default we allow relaying from localhost.10. Tiempo Total de Vida ) IN NS @ profesorlinux.com.21. mysql> exit #service mysqld restart http://www.com 10.10.10.21 RELAY #vim local-host-names dominiocorreo.drupal. IN A 10.conf #cp named. Tiempo de Refresco 7200.

10.DAEMON_OPTIONS(`Port=smtp./programa1 (**) Ingresa tu nombre: Daniel Tu nombre es Daniel Gracias.10.." sleep 1 echo ". (**) #vim programa2 echo "comprobacion de archivos activos" service httpd restart service smb restart service sshd restart echo "haciendo pin a la pc del gerente" ping 10..10 echo "estado de init" ps as | greap -i init echo "fecha actual" date sleep 5 echo "se produce a limpiar la Pantalla" clear echo "rutina terminada" sleep 1 echo ".pl http://127.0.com')dnl /158(157) MASQUERADE_AS('dominiocorreo.1/webmail/ -------------------------------------------PROGRAMAS EN SHELL #vim programa1 echo "Ingresa tu nombre:" read a echo "Tu nombre es" $a sleep 3 ---PAUSAR TRES SEGUNDOS echo "Gracias.21.25.21.10.45:/root/clase* /root/Escritorio/ .10.55:/root/dns /root/ # scp -r root@10./conf.com'dnl /162 Quitamos el dnl en las líneas 44-52-53-164-168 Agregamos dnl # línea 39 #vim /etc/dovecot." Esc :wq #chmod 777 programa1 #.conf protocols = imap pop3 /20 #useradd usuario1 #passwd usuario1 #saslpasswd2 nombreDelsuario #service sendmail restart #service dovecot restart #service saslauthd restart #yum -y install squirrelmail httpd #cd /usr/share/squirrelmail/config/ #." :wq #cd #sh programa2 ctrl +c --------------------------------------------IPTABLES #iptables -A INPUT -i eth0 -j ACCEPT #iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT #iptables -A INPUT -p icmp -j REJECT #iptables –nl --.21 .Addr=10.BORAR LAS REGLAS PASADAS #iptables -F #iptables -X #iptables -Z #iptables –nL #iptables -P INPUT ACCEPT #iptables -P OUTPUT ACCEPT #iptables -P FORWARD ACCEPT #iptables -P INPUT -i lo -j ACCEPT #iptables -A INPUT -i lo -j ACCEPT #iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT #iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT #iptables -A INPUT -i eth0 -p tcp --dport 1:1024 -j reject #iptables -A INPUT -i eth0 -p tcp --dport 1:1024 -j REJECT #iptables -A INPUT -i eth0 -p tcp --dport 1:1024 -j REJECT #iptables -nL ------------------------------------# scp -r root@10.25. Name=MTA')dnl /117 dnl #FEATURE(`accept_unresolvable_domains')dnl /150 LOCAL_DOMAIN(`dominiocorreo.0.