lunes, 16 de mayo de 2016

Adicionar RPMforge Repository en Servidor CentOS 6/RHEL 6

Para adicionar el repositorio RPMforge debemos en primer lugar revisar si tenemos 32 o 64 bit, que lo hacemos con lo siguiente:

Version de Centos/RHEL
# cat /etc/redhat-release

Arquitectura
# uname -a

Para 32 Bits
http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

Para 64 Bits
http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

1. Descargamos el paquete

# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

--2016-05-16 14:39:50--  http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Resolviendo pkgs.repoforge.org... 78.46.17.228
Connecting to pkgs.repoforge.org|78.46.17.228|:80... conectado.
Petición HTTP enviada, esperando respuesta... 302 Moved Temporarily
Localización: http://rpmforge.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm [siguiendo]
--2016-05-16 14:39:51--  http://rpmforge.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Resolviendo rpmforge.sw.be... 78.46.17.228
Reusing existing connection to pkgs.repoforge.org:80.
Petición HTTP enviada, esperando respuesta... 301 Moved Permanently
Localización: http://tree.repoforge.org/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm [siguiendo]
--2016-05-16 14:39:51--  http://tree.repoforge.org/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Resolviendo tree.repoforge.org... 78.46.17.228
Reusing existing connection to pkgs.repoforge.org:80.
Petición HTTP enviada, esperando respuesta... 301 Moved Permanently
Localización: http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm [siguiendo]
--2016-05-16 14:39:52--  http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Resolviendo apt.sw.be... 193.1.193.67
Connecting to apt.sw.be|193.1.193.67|:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 12700 (12K) [application/x-redhat-package-manager]
Saving to: `rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm'

100%[===========================================================================================================================================================>] 12.700      --.-K/s   in 0s

2016-05-16 14:39:52 (816 MB/s) - `rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm' saved [12700/12700]

2. Descargamos la llave

# wget http://apt.sw.be/RPM-GPG-KEY.dag.txt

--2016-05-16 14:40:07--  http://apt.sw.be/RPM-GPG-KEY.dag.txt
Resolviendo apt.sw.be... 193.1.193.67
Connecting to apt.sw.be|193.1.193.67|:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 1672 (1,6K) [text/plain]
Saving to: `RPM-GPG-KEY.dag.txt'

100%[========================================================================================================================================================

2016-05-16 14:40:08 (341 MB/s) - `RPM-GPG-KEY.dag.txt' saved [1672/1672]

3. Instalamos la llave

# rpm --import RPM-GPG-KEY.dag.txt

4. Procedemos a instalar

# rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

Preparando...               ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]

5. Configuramos el repositorio, abriendo el archivo e insertando “priority=3” despues de “enabled = 1” en la seccion [rpmforge] 

# nano /etc/yum.repos.d/rpmforge.repo

Nos quedaria asi:

### Name: RPMforge RPM Repository for RHEL 6 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
priority=3
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

6. Revisamos la actualizacion realizada

# yum repolist

Complementos cargados:fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.edatel.net.co
 * extras: mirror.edatel.net.co
 * rpmforge: apt.sw.be
 * updates: mirror.edatel.net.co
rpmforge
rpmforge/primary_db
id del repositorio
base
extras
rpmforge
updates
repolist: 12.977







jueves, 28 de abril de 2016

Mysql 5.7 en Centos 6.7

Fuente: https://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html

Podemos verificar con estos comandos

Versión de Centos
[root@localhost ~]# cat /etc/redhat-release

Arquitectura, con lo que sabremos los paquetes que debemos utilizar en 32 0 64 bits
[root@localhost ~]# uname -a

Para revisar todos los paquetes instalados
[root@localhost ~]# rpm -qa | less

1. Instalar el repositorio

[root@localhost ~]# wget http://dev.mysql.com/get/mysql57-community-release-el6-8.noarch.rpm

2. Revisamos los paquetes que se van a instalar

[root@localhost ~]# rpm -qa | grep mysql

la salida será así
mysql-community-libs-compat-5.7.12-1.el6.x86_64
mysql-community-libs-5.7.12-1.el6.x86_64
mysql57-community-release-el6-8.noarch
mysql-community-client-5.7.12-1.el6.x86_64
mysql-community-server-5.7.12-1.el6.x86_64
mysql-community-common-5.7.12-1.el6.x86_64

3. Revisar que este activo el repositorio de MySQL 5.7

[root@localhost ~]# yum repolist enabled | grep "mysql.*-community.*"

la salida nnos indica el mysql57-community

mysql-connectors-community           MySQL Connectors Community              21
mysql-tools-community                    MySQL Tools Community                        35
mysql57-community                         MySQL 5.7 Community Server                 82

en el caso que no se tenga, podemos editar el siguiente archivo y configurar

[root@localhost ~]# nano /etc/yum.repos.d/mysql-community.repo

Revisamos que la opción de enabled este en 1

[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

4. Finalmente realizamos la instalación

[root@localhost ~]# yum install mysql-community-server

Iniciamos el servicio

[root@localhost ~]# service mysqld start 

Configuramos el servicio para que se inicie automaticamente

[root@localhost ~]# chkconfig mysqld on

Podemos comprobar la versión instalada con

[root@localhost ~]# mysql --version

5. Seguridad

El comando mysql_secure_installation es importante y utilizado para la configuración del password del usurio root, remover el usuario anonymous, remover login root.

IMPORTANTE: En MySQL version 5.7 o superiores se genera un password ramdómico temporal que se encuentra en /var/log/mysqld.log.

Para poder obtenerlo usamos el siguiente comando y con este poder correo elmysql secure command.

[root@localhost ~]#  grep 'temporary password' /var/log/mysqld.log

Con esto podemos ya correr el comando y continuar con la asignación del password para el usuario root.

[root@localhost ~]# mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root:
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.

Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : y

 ... skipping.
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.


Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.

All done!

Para comprobar accedemos a MySQL

[root@localhost ~]# mysql -u root -p

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 28
Server version: 5.7.12 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Para abrir el puerto en iptables

[root@localhost ~]# iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
[root@localhost ~]# service iptables save

jueves, 25 de febrero de 2016

PPTP en Centos 6.7


wget -O /etc/yum.repos.d/AL-Server.repo     http://www.alcancelibre.org/al/server/AL-Server.repo

https://www.digitalocean.com/community/tutorials/how-to-setup-your-own-vpn-with-pptp

jueves, 14 de enero de 2016

Códigos de Netflix para descubrir cientos de categorías secretas

Al ingresar a Netflix desde tu PC la URL seria por ejemplo: netflix.com/brose/genre/XXXX, donde “XXXX” es un código numérico que representa un subgénero específico. (los cuales vamos a listas a continuacion)
Action & Adventure (1365)
Asian Action Movies (77232)
Classic Action & Adventure (46576)
Action Comedies (43040)
Action Thrillers (43048)
Adventures (7442)
Comic Book and Superhero Movies (10118)
Westerns (7700)
Spy Action & Adventure (10702)
Crime Action & Adventure (9584)
Foreign Action & Adventure (11828)
Martial Arts Movies (8985)
Military Action & Adventure (2125)
Anime (7424)
Adult Animation (11881)
Anime Action (2653)
Anime Comedies (9302)
Anime Dramas (452)
Anime Features (3063)
Anime Sci-Fi (2729)
Anime Horror (10695)
Anime Fantasy (11146)
Anime Series (6721)
Children & Family Movies (783)
Movies for ages 0 to 2 (6796)
Movies for ages 2 to 4 (6218)
Movies for ages 5 to 7 (5455)
Movies for ages 8 to 10 (561)
Movies for ages 11 to 12 (6962)
Education for Kids (10659)
Disney (67673)
Movies based on children’s books (10056)
Family Features (51056)
TV Cartoons (11177)
Kids’ TV (27346)
Kids Music (52843)
Animal Tales (5507)
Classic Movies (31574)
Classic Comedies (31694)
Classic Dramas (29809)
Classic Sci-Fi & Fantasy (47147)
Classic Thrillers (46588)
Film Noir (7687)
Classic War Movies (48744)
Epics (52858)
Classic Foreign Movies (32473)
Silent Movies (53310)
Classic Westerns (47465)
Comedies (6548)
Dark Comedies (869)
Foreign Comedies (4426)
Late Night Comedies (1402)
Mockumentaries (26)
Political Comedies (2700)
Screwball Comedies (9702)
Sports Comedies (5286)
Stand-up Comedy (11559)
Teen Comedies (3519)
Satires (4922)
Romantic Comedies (5475)
Slapstick Comedies (10256)
Cult Movies (7627)
B-Horror Movies (8195)
Campy Movies (1252)
Cult Horror Movies (10944)
Cult Sci-Fi & Fantasy (4734)
Cult Comedies (9434)
Documentaries (6839)
Biographical Documentaries (3652)
Crime Documentaries (9875)
Foreign Documentaries (5161)
Historical Documentaries (5349)
Military Documentaries (4006)
Sports Documentaries (180)
Music & Concert Documentaries (90361)
Travel & Adventure Documentaries (1159)
Political Documentaries (7018)
Religious Documentaries (10005)
Science & Nature Documentaries (2595)
Social & Cultural Documentaries (3675)
Dramas (5763)
Biographical Dramas (3179)
Classic Dramas (29809)
Courtroom Dramas (528582748)
Crime Dramas (6889)
Dramas based on Books (4961)
Dramas based on real life (3653)
Tearjerkers (6384)
Foreign Dramas (2150)
Sports Dramas (7243)
Gay & Lesbian Dramas (500)
Independent Dramas (384)
Teen Dramas (9299)
Military Dramas (11)
Period Pieces (12123)
Political Dramas (6616)
Romantic Dramas (1255)
Showbiz Dramas (5012)
Social Issue Dramas (3947)
Faith & Spirituality (26835)
Faith & Spirituality Movies (52804)
Spiritual Documentaries (2760)
Kids Faith & Spirituality (751423)
Foreign Movies (7462)
Art House Movies (29764)
Foreign Action & Adventure (11828)
Classic Foreign Movies (32473)
Foreign Comedies (4426)
Foreign Documentaries (5161)
Foreign Dramas (2150)
Foreign Gay & Lesbian Movies (8243)
Foreign Horror Movies (8654)
Foreign Sci-Fi & Fantasy (6485)
Foreign Thrillers (10306)
Romantic Foreign Movies (7153)
African Movies (3761)
Australian Movies (5230)
Belgian Movies (262)
Korean Movies (5685)
Latin American Movies (1613)
Middle Eastern Movies (5875)
New Zealand Movies (63782)
Russian (11567)
Scandinavian Movies (9292)
Southeast Asian Movies (9196)
Spanish Movies (58741)
Greek Movies (61115)
German Movies (58886)
French Movies (58807)
Eastern European Movies (5254)
Dutch Movies (10606)
Irish Movies (58750)
Japanese Movies (10398)
Italian Movies (8221)
Indian Movies (10463)
Chinese Movies (3960)
British Movies (10757)
Gay & Lesbian Movies (5977)
Gay & Lesbian Comedies (7120)
Gay & Lesbian Dramas (500)
Romantic Gay & Lesbian Movies (3329)
Foreign Gay & Lesbian Movies (8243)
Gay & Lesbian Documentaries (4720)
Gay & Lesbian TV Shows (65263)
Horror Movies (8711)
B-Horror Movies (8195)
Creature Features (6895)
Cult Horror Movies (10944)
Deep Sea Horror Movies (45028)
Foreign Horror Movies (8654)
Horror Comedy (89585)
Monster Movies (947)
Slasher and Serial Killer Movies (8646)
Supernatural Horror Movies (42023)
Teen Screams (52147)
Vampire Horror Movies (75804)
Werewolf Horror Movies (75930)
Zombie Horror Movies (75405)
Satanic Stories (6998)
Independent Movies (7077)
Experimental Movies (11079)
Independent Action & Adventure (11804)
Independent Thrillers (3269)
Romantic Independent Movies (9916)
Independent Comedies (4195)
Independent Dramas (384)
Music (1701)
Kids Music (52843)
Country & Western/Folk (1105)
Jazz & Easy Listening (10271)
Latin Music (10741)
Urban & Dance Concerts (9472)
World Music Concerts (2856)
Rock & Pop Concerts (3278)
Musicals (13335)
Classic Musicals (32392)
Disney Musicals (59433)
Showbiz Musicals (13573)
Stage Musicals (55774)
Romantic Movies (8883)
Romantic Favorites (502675)
Quirky Romance (36103)
Romantic Independent Movies (9916)
Romantic Foreign Movies (7153)
Romantic Dramas (1255)
Steamy Romantic Movies (35800)
Classic Romantic Movies (31273)
Romantic Comedies (5475)
Sci-Fi & Fantasy (1492)
Action Sci-Fi & Fantasy (1568)
Alien Sci-Fi (3327)
Classic Sci-Fi & Fantasy (47147)
Cult Sci-Fi & Fantasy (4734)
Fantasy Movies (9744)
Sci-Fi Adventure (6926)
Sci-Fi Dramas (3916)
Sci-Fi Horror Movies (1694)
Sci-Fi Thrillers (11014)
Foreign Sci-Fi & Fantasy (6485)
Sports Movies (4370)
Sports Comedies (5286)
Sports Documentaries (180)
Sports Dramas (7243)
Baseball Movies (12339)
Football Movies (12803)
Boxing M10499ovies (12443)
Soccer Movies (12549)
Martial Arts, Boxing & Wrestling (6695)
Basketball Movies (12762)
Sports & Fitness (9327)
Thrillers (8933)
Action Thrillers (43048)
Classic Thrillers (46588)
Crime Thrillers (10499)
Foreign Thrillers (10306)
Independent Thrillers (3269)
Gangster Movies (31851)
Psychological Thrillers (5505)
Political Thrillers (10504)
Mysteries (9994)
Sci-Fi Thrillers (11014)
Spy Thrillers (9147)
Steamy Thrillers (972)
Supernatural Thrillers (11140)
TV Shows (83)
British TV Shows (52117)
Classic TV Shows (46553)
Crime TV Shows (26146)
Cult TV Shows (74652)
Food & Travel TV (72436)
Kids’ TV (27346)
Korean TV Shows (67879)
Miniseries (4814)
Military TV Shows (25804)
Science & Nature TV (52780)
TV Action & Adventure (10673)
TV Comedies (10375)
TV Documentaries (10105)
TV Dramas (11714)
TV Horror (83059)
TV Mysteries (4366)
TV Sci-Fi & Fantasy (1372)
Reality TV (9833)
Teen TV Shows (60951)