martes, 21 de febrero de 2017

WEB (EJEMPLO) HTML5 RESPONSIVE CON MENU HORIZONTAL.

<!DOCTYPE html>
<html lang="es">
<head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <style>
        .container {
                width:996px;
                margin:0px auto;
                font-size:1em;
        }
        section,aside {
                padding: 10px;
                background:#ccc;
                -moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radi$
        }

lunes, 20 de febrero de 2017

CONEXION PHP-MYSQL CON POO (PROGRAMACION ORIENTADA A OBJETOS)

entrada2.php


<!DOCTYPE  html>
<html>
<head>
    <meta charset="UTF-8">
    <title>MANTENIMIENTO CLIENTES</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
    <section id="main_container">
        <header class="header">
            <h1>MANTENIMIENTO CLIENTES</h1>
            <nav class="top_menu">
                <ul>
                    <li><a href="http://192.168.178.104/listado2.php">Listado</a></li>
                    <li><a href="http://192.168.178.104/entrada2.php#">Entrada</a></li>
                    <li><a href="#">Item 3</a></li>
                    <li><a href="#">Item 1</a></li>
                    <li><a href="#">Item 2</a></li>
                    <li><a href="#">Item 3</a></li>
                </ul>
            </nav>
        </header>

jueves, 16 de febrero de 2017

INSTALL AND CONFIGURATION NETWORK-MANAGER ON UBUNTU 16.10

Installation

NetworkManager should be installed by default on Ubuntu Desktop installs, as well as most flavours of Ubuntu.
To install NetworkManager:

sudo apt-get update
sudo apt-get upgrade

sudo apt-get install network-manager

Using Systemd

Systemd became the default initialization system in Ubuntu 15.04. Here's how to start Network Manager and enable it to be restarted after a reboot:

Start  network manager

sudo systemctl start NetworkManager.service

Enable restarting the network manager when the system reboots

sudo systemctl enable NetworkManager.service


Issues

If it is not managing your network connections, you'll need to comment out the references to all interfaces (except lo) in /etc/network/interfaces to let Network Manager handle them.
sudo cp /etc/network/interfaces /etc/network/interfaces.bak
sudo nano /etc/network/interfaces
It should look similar to this when you are done:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
# auto eth1

# iface eth1 inet dhcp
Then reboot and you should be good to go!

/etc/network/interfaces file:
 auto lo
 iface lo inet loopback
 /etc/NetworkManager/NetworkManager.conf file:
 [main]
 plugins=ifupdown,keyfile,ofono
 dns=dnsmasq

 [ifupdown]
 managed=true
If it is not managing your network connections, you'll need  do the following:
  sudo nmcli dev set enp8s0 managed yes
Try to the following (backup orig file, and create 0 bytes file instead)
  sudo mv /etc/NetworkManager/conf.d/10-globally-managed-devices.conf  /etc/NetworkManager/conf.d/10-globally-managed-devices.conf_orig

  sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf  

Stopping and Disabling NetworkManager

The steps to disable NetworkManager depend on which of the initialization subsystems are running: Upstart or Systemd.

Using Systemd

Systemd became the default initialization system in Ubuntu 15.04. Here's how to stop and disable Network Manager without uninstalling it:
Stop network manager
sudo systemctl stop NetworkManager.service
Disable network manager (permanently) to avoid it restarting after a reboot
sudo systemctl disable NetworkManager.service

To list the currently available network connections, issue a command as follows:


To list the currently available network connections, issue a command as follows:
~]$ nmcli con show
NAME              UUID                                  TYPE            DEVICE
Auto Ethernet     9b7f2511-5432-40ae-b091-af2457dfd988  802-3-ethernet  --
ens3              fb157a65-ad32-47ed-858c-102a48e064a2  802-3-ethernet  ens3
MyWiFi            91451385-4eb8-4080-8b82-720aab8328dd  802-11-wireless wlan0
Note that the NAME field in the output always denotes the connection ID (name). It is not the interface name even though it might look the same. In the second connection shown above, ens3 in the NAME field is the connection ID given by the user to the profile applied to the interface ens3. In the last connection shown, the user has assigned the connection ID MyWiFi to the interface wlan0.
Adding an Ethernet connection means creating a configuration profile which is then assigned to a device. Before creating a new profile, review the available devices as follows:
~]$ nmcli dev status
DEVICE  TYPE      STATE         CONNECTION
ens3    ethernet  disconnected  --
ens9    ethernet  disconnected  --
lo      loopback  unmanaged     --

Adding a Static Ethernet Connection

To add an Ethernet connection with static IPv4 configuration, a command in the following format can be used:
nmcli connection add type ethernet con-name connection-name ifname interface-name ip4 address gw4 address
IPv6 address and gateway information can be added using the ip6 and gw6 options.
For example, a command to create a static Ethernet connection with only IPv4 address and gateway is as follows:
~]$ nmcli con add type ethernet con-name test-lab ifname ens9 ip4 10.10.10.10/24 \
gw4 10.10.10.254
Optionally, at the same time specify IPv6 address and gateway for the device as follows:
~]$ nmcli con add type ethernet con-name test-lab ifname ens9 ip4 10.10.10.10/24 \
gw4 10.10.10.254 ip6 abbe::cafe gw6 2001:db8::1
Connection 'test-lab' (05abfd5e-324e-4461-844e-8501ba704773) successfully added.


Adding a Dynamic Ethernet Connection

To add an Ethernet configuration profile with dynamic IP configuration, allowing DHCP to assign the network configuration, a command in the following format can be used:
nmcli connection add type ethernet con-name connection-name ifname interface-name
For example, to create a dynamic connection profile named my-office, issue a command as follows:
~]$ nmcli con add type ethernet con-name my-office ifname ens3
Connection 'my-office' (fb157a65-ad32-47ed-858c-102a48e064a2) successfully added.

miércoles, 15 de febrero de 2017

Añadir módulos a su servidor apache en centos 7.1

Añadir módulos a su servidor apache en centos 7.1


Debido a que Apache 1.3 soporta DSOs, puede fácilmente cargar módulos Apache o compilar sus propios módulos para su secure Web server. DSO significa que se pueden cargar los módulos en tiempo de ejecución. Debido a que los módulos se cargan sólo cuando es necesario no usan la memoria hasta que la necesitan.

Directivas de configuración en el fichero httpd.conf

Directivas de configuración en el fichero httpd.conf

El archivo de configuración del servidor Web Apache es /etc/httpd/conf/httpd.conf. El archivo httpd.conf está bien comentado y es bastante autoexplicativo. La configuración predeterminada de secure Web server funciona para los ordenadores de la mayoría de los usuarios, así que probablemente no necesitará cambiar ninguna de las directivas en el fichero httpd.conf. Sin embargo, quizás quiera conocer el resto de las opciones de configuración más importantes.
Los ficheros vacíos srm.conf y access.conf se encuentran en el directorio /etc/httpd/conf. Precisamente estos ficheros junto con el fichero httpd.conf se utilizaron anteriormente como ficheros de configuración de Apache.

lunes, 6 de febrero de 2017

Installing Nginx with PHP 7 and MySQL 5.7 (LEMP) on Ubuntu 16.04 LTS/Ubuntu 16.10

Installing Nginx with PHP 7 and MySQL 5.7 (LEMP) on Ubuntu 16.04 LTS /Ubuntu 16.10

Nginx (pronounced "engine x") is a free, open-source, high-performance HTTP server. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption. This tutorial shows how you can install Nginx on an Ubuntu 16.04 server with PHP 7 support (throughPHP-FPM) and MySQL 5.7 support (LEMP = Linux + nginx (pronounced "engine x") + MySQL + PHP).