solo basta agregar transparent en la linea de http_port
http_port 3128 transparent
y ejecutar las reglas
es conveniente introducir la ejecucion en rc.local para ke se ejecuten en el inicio
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
exit 0
viernes, 11 de marzo de 2011
CLAMAV
agregamos los repos para instalación
cd /etc/yum.repos.d/
wget -N http://www.alcancelibre.org/al/server/AL-Server.repo
yum -y install clamav clamav-update
NOTA se recomienda agregar al cront una linea para que determinado tiempo se actualice o bien con el comando
freshclam
se esta ejecutando clamav?
ps -ef | grep clam
cd /etc/yum.repos.d/
wget -N http://www.alcancelibre.org/al/server/AL-Server.repo
yum -y install clamav clamav-update
NOTA se recomienda agregar al cront una linea para que determinado tiempo se actualice o bien con el comando
freshclam
se esta ejecutando clamav?
ps -ef | grep clam
miércoles, 9 de marzo de 2011
ssh tips
Generar un par de claves DSA
ssh-keygen -t dsa
Copiandolas al host remoto
ssh-copy-id usuario@host
si se tiene problemas al copiar la key chmod 600 .ssh/id_dsa
cat ~/.ssh/id_dsa.pub | ssh nombre_del_host 'cat - >> .ssh/authorized_keys'
arrancar el agente SSH
ssh-add
Ejecurtando comando
ssh usuario@host "comando"
ssh-keygen -t dsa
Copiandolas al host remoto
ssh-copy-id usuario@host
si se tiene problemas al copiar la key chmod 600 .ssh/id_dsa
cat ~/.ssh/id_dsa.pub | ssh nombre_del_host 'cat - >> .ssh/authorized_keys'
arrancar el agente SSH
ssh-add
Ejecurtando comando
ssh usuario@host "comando"
martes, 12 de octubre de 2010
xpsplash
1. Logout de nuestra sesión y regresamos al GDM, donde iniciamos sesión.
2. Sin logarnos, accedemos al terminal con Ctrl-Alt-F1
3. Nos logamos con nuestro usuario y contraseña.
4. Escribimos: export DISPLAY=:0.0
5. Escribimos: sudo -u gdm gnome-control-center
6. Apareceran unas cuentas respuestas, regresamos con ALT-F7
7. Gnome-control-center aparece cargado. Podemos usarlo para personalizar nuestro GDM.
8. Click en el icono Apariencia, ahora podremos cambiar la fuente de nuestro GDM, tema y en especial nuestra imagen de fondo.
9. Cerramos el gnome-control-center y nos logamos con normalidad.
2. Sin logarnos, accedemos al terminal con Ctrl-Alt-F1
3. Nos logamos con nuestro usuario y contraseña.
4. Escribimos: export DISPLAY=:0.0
5. Escribimos: sudo -u gdm gnome-control-center
6. Apareceran unas cuentas respuestas, regresamos con ALT-F7
7. Gnome-control-center aparece cargado. Podemos usarlo para personalizar nuestro GDM.
8. Click en el icono Apariencia, ahora podremos cambiar la fuente de nuestro GDM, tema y en especial nuestra imagen de fondo.
9. Cerramos el gnome-control-center y nos logamos con normalidad.
domingo, 25 de julio de 2010
pas mysql
# 1: Detener el proceso del servidor MySQL.
root@servidor-ubuntu:~# /etc/init.d/mysql stop
* Stopping MySQL database server mysqld [ OK ]
root@servidor-ubuntu:~#
# 2: Iniciar el servicio/demonio de MySQL (mysqld) con la opcion –skip-grant-tables asi no pedira contraseña.
root@servidor-ubuntu:~# mysqld_safe --skip-grant-tables &
[1] 10702
root@servidor-ubuntu:~# nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[10741]: started
# 3: Conectar al servidor MySQL como el usuario root.
root@servidor-ubuntu:~# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql>
Paso # 4: Configure la nueva contraseña de root.
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update user set password=PASSWORD("321") where User='root';
Query OK, 3 rows affected (0.03 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
Paso # 5: Salir y reiniciar el servidor MySQL
mysql> quit
Bye
root@servidor-ubuntu:~# /etc/init.d/mysql stop
* Stopping MySQL database server mysqld
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[11414]: ended
[ OK ]
[1]+ Done mysqld_safe --skip-grant-tables
Paso # 6: Reinicio de MySQL
root@servidor-ubuntu:~# /etc/init.d/mysql start
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
root@servidor-ubuntu:~# mysql -u root -p
root@servidor-ubuntu:~# /etc/init.d/mysql stop
* Stopping MySQL database server mysqld [ OK ]
root@servidor-ubuntu:~#
# 2: Iniciar el servicio/demonio de MySQL (mysqld) con la opcion –skip-grant-tables asi no pedira contraseña.
root@servidor-ubuntu:~# mysqld_safe --skip-grant-tables &
[1] 10702
root@servidor-ubuntu:~# nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[10741]: started
# 3: Conectar al servidor MySQL como el usuario root.
root@servidor-ubuntu:~# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1
Server version: 5.0.51a-3ubuntu5.4 (Ubuntu)
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql>
Paso # 4: Configure la nueva contraseña de root.
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update user set password=PASSWORD("321") where User='root';
Query OK, 3 rows affected (0.03 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
Paso # 5: Salir y reiniciar el servidor MySQL
mysql> quit
Bye
root@servidor-ubuntu:~# /etc/init.d/mysql stop
* Stopping MySQL database server mysqld
STOPPING server from pid file /var/run/mysqld/mysqld.pid
mysqld_safe[11414]: ended
[ OK ]
[1]+ Done mysqld_safe --skip-grant-tables
Paso # 6: Reinicio de MySQL
root@servidor-ubuntu:~# /etc/init.d/mysql start
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
root@servidor-ubuntu:~# mysql -u root -p
jueves, 22 de julio de 2010
DHCP y iptables
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.99;
option domain-name-servers 200.33.146.162;
option routers 192.168.1.100;
option broadcast-address 192.168.1.255;
default-lease-time 600;
max-lease-time 7200;
}
iptables
/etc/rc.local
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
exit 0
range 192.168.1.50 192.168.1.99;
option domain-name-servers 200.33.146.162;
option routers 192.168.1.100;
option broadcast-address 192.168.1.255;
default-lease-time 600;
max-lease-time 7200;
}
iptables
/etc/rc.local
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
exit 0
miércoles, 2 de junio de 2010
LAMP CentOS 5
Instalacion de Apache
yum install httpd httpd-devel
Levantando Apache
service httpd start
Instalando MySQL
yum install mysql mysql-server mysql-devel
Levantando MySQL
service mysqld start
Entrando a Mysql para cambio de password por defaul en blanco
mysql -u root -p
enter
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('tu nueva contraseña')
WHERE user='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
mysql -u root -p
Enter Password:
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
service httpd restart
Bajar PHPmyadmin
o instalarlo
yum -y install phpmyadmin
modificar el archivo config.inc.php
blowfish_secret e introducir palabra calave
para actualizar PHP checar entradas anteriores
y reinstalar php-mcrypt
yum -y install php-mcrypt
yum install httpd httpd-devel
Levantando Apache
service httpd start
Instalando MySQL
yum install mysql mysql-server mysql-devel
Levantando MySQL
service mysqld start
Entrando a Mysql para cambio de password por defaul en blanco
mysql -u root -p
enter
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('tu nueva contraseña')
WHERE user='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
mysql -u root -p
Enter Password:
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
service httpd restart
Bajar PHPmyadmin
ln -s /usr/share/phpMyAdmin /var/www/html/phpmyadmin
para actualizar PHP checar entradas anteriores
Suscribirse a:
Entradas (Atom)
Instalar systemd y systemd-sysv
Instalar systemd y s ystemd-sysv Debian $apt-get update $apt-get upgrade $apt-get install systemd $apt-get install systemd-sysv Este...
-
https://doc.owncloud.org/server/9.0/admin_manual/installation/php_55_installation.html#centos-7-upgrade-to-php-5-5 RHEL 7 Upgrade to P...
-
whatsie and sky http://dl.bintray.com/aluxian/rpm/ https://tel.red/linux.php
-
Debian 8.4 echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/Debian_8.0/ /' >> /etc/apt/sources.l...