Configure um IP estático no CentOS 6

vim / etc / sysconfig / network-scripts / ifcfg-ethx DEVICE=ethXBOOTPROTO=staticHWADDR=00:30:48:56:A6:2EIPADDR=”<IP_ADDRESS>”GATEWAY=”<NETWORK_GATEWAY>”NETMASK=”<NETWORK_MASK>”DNS1=”<DNS_SERVER1>”DNS2=”<DNS_SERVER2>”NM_CONTROLLED=”yes”TYPE=”Ethernet”ONBOOT=yes Exemplo: DEVICE=”eth0″BOOTPROTO=”static”HWADDR=”00:0C:29:1A:56:23″IPV6INIT=”yes”IPADDR=”192.168.131.150″NETMASK=”255.255.255.0″GATEWAY=”192.168.131.2″NM_CONTROLLED=”yes”ONBOOT=”yes”TYPE=”Ethernet”DNS1=”192.168.131.2″DNS2=”192.168.131.3″

Continuar lendo

E-mail simples de PHP, validação de URL e IP

o email echo filter_var(’[email protected]’, FILTER_VALIDATE_EMAIL); // [email protected] filter_var(‘domain.com’, FILTER_VALIDATE_EMAIL); // false URL echo filter_var(‘http://rogeriolino.com’, FILTER_VALIDATE_URL); // http://rogeriolino.comecho filter_var(‘rogeriolino.com’, FILTER_VALIDATE_URL); // false IP echo filter_var(‘127.0.0.1’, FILTER_VALIDATE_IP); // 127.0.0.1echo filter_var(‘127.0.1’, FILTER_VALIDATE_IP); // …

Continuar lendo