segunda-feira, 30 de maio de 2011

glassfish + como instalar no centos com yum





O glassfish é um software semelhante ao tomcat. Porém, a grande vantagem do glassfish é que todas as aplicações que rodam no tomcat, também rodam no glassfish. O contrário não é verdadeiro.

Para realizar a instalação no centos5, realize os passos abaixo:

==Pré-requisitos==
- Sistema Operacional centos5
- Java5


==Crie o repositório:==
Na sua máquina crie o arquivo/repositório "/etc/yum.repos.d/gfa-puma.repo" com o seguinte conteúdo:
[gfa-puma]
name=GFA PUMA
baseurl=http://linux.web.psi.ch/dist/scientific/51/gfa/puma/
enabled=1


==Atualize o yum:==
yum update --skip-broken


==Instale o glassfish:==
yum install glassfish-v3 --nogpgcheck


==Configure o glassfish para iniciar automaticamente:==
chkconfig glassfish-v3 on


==Inicie o serviço:==
/etc/init.d/glassfish-v3 start


==Acesse a área administrativa:==
Acesse em um browser
http://nome_do_servidor_glassfish:4848

glassfish + how to install in centos with yum





Glassfish is a similar software to tomcat. However, the biggest advantage of glassfish is the all applications that run in tomcat also run in glassfish. The opposite is not true.

To do the instalation in centos5, do the following steps:

==Prerequisites==
- centos5 OS
- Java5


==Create the repository:==
In your machine create the file/repository "/etc/yum.repos.d/gfa-puma.repo" with the following content:
[gfa-puma]
name=GFA PUMA
baseurl=http://linux.web.psi.ch/dist/scientific/51/gfa/puma/
enabled=1


==Update the yum:==
yum update --skip-broken


==Install the glassfish:==
yum install glassfish-v3 --nogpgcheck


==Configure the glassfish to auto start:==
chkconfig glassfish-v3 on


==Start the service:==
/etc/init.d/glassfish-v3 start


==Access the administrative area:==
Access by a browser
http://address_of_glassfish_server:4848


SORRY MY ENGLISH, I'M LEARNING YET!

segunda-feira, 28 de março de 2011

How to disable centos net-snmp log





The centos snmp client logs all the snmp requisitions that the system receives.
Many times this is incovenient because that dirty the /var/log/messages with these kind of logs:
Mar 28 12:44:57 server1 snmpd[16808]: Connection from UDP: [172.25.3.53]:47306
Mar 28 12:44:57 server1 snmpd[16808]: Received SNMP packet(s) from UDP: [172.25.3.53]:47306
Mar 28 12:44:57 server1 snmpd[16808]: Connection from UDP: [172.25.3.53]:47306

To disable it, edit the "/etc/sysconfig/snmpd.options" file and add the following line:
.
.
.
OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid -a"
.
.
.

Note: this file can already have the line 'OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"', note that the -Lsd option must be removed because it is what enables the log.

Restart the snmpd service:
/etc/init.d/snmpd restart


SORRY MY ENGLISH, I'M LEARNING YET!

Destivar log do net-snmp do centos





O cliente snmp do centos loga todas as requisições de snmp que recebe.
Muitas vezes isso é incoveniente pois suja o /var/log/messages com logs do seguinte tipo:

Mar 28 12:44:57 server1 snmpd[16808]: Connection from UDP: [172.25.3.53]:47306
Mar 28 12:44:57 server1 snmpd[16808]: Received SNMP packet(s) from UDP: [172.25.3.53]:47306
Mar 28 12:44:57 server1 snmpd[16808]: Connection from UDP: [172.25.3.53]:47306

Para desativa-lo, edite o arquivo "/etc/sysconfig/snmpd.options" e adicione a linha abaixo:
.
.
.
OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid -a"
.
.
.

Nota: nesse aquivo pode já existir a linha 'OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"', note que a opção -Lsd deve ser retirada, pois é ela que habilita o log.

Reinicie o serviço snmpd:
/etc/init.d/snmpd restart

quarta-feira, 8 de dezembro de 2010

SNES C compiler - Download (C + SNES)



One day, surfing the Internet, I found a wonderful thing: someone develop for Windows a C compiler to SNES architecture! In other words, you can to write your games/programs in C language and compile them, the result of this compilation will be a SMC file that you can to play in your Super Nintendo emulator! Or else, if you have a SNES tape recorder (I think few will) you can to record the SMC file in the tape and to play your own game in your Super Nintendo!

I don't know the person or people name that created this compiler, the only reference I have is the site where I downloaded the compiler: http://obsolete.se.

Bear in mind: the compiler is an Windows executable, you can even to write the code in any operacional system, but when you to compile, you have to use a Windows computer (or to emulate Windows) to run the compiler.

Who is interested can to download the compiler in the site that I said or else to download from my google page: snesc download.

In other post I will teach how to use the compiler to do SNES games.


SORRY MY ENGLISH, I'M LEARNING YET!

Compilador C para SNES - Download (C + SNES



Um dia, navegando pela Internet, descobri algo maravilhoso: alguém desenvolveu para Windows um compilador C para a arquitetura SNES! Ou seja, você pode escrever seus jogos/programas na linguagem C e compila-los, o resultado dessa compilação será um arquivo SMC que você pode rodar no seu emulador de Super Nintendo! Ou então se tiver o gravador de fitas de SNES (acho que poucos terão) você pode gravar o SMC na fita e jogar no seu Super Nintendo o seu próprio jogo!

Não sei o nome dessa pessoa ou pessoas que criaram esse compilador, a única referência que tenho é o site que baixei o compilador: http://obsolete.se.

Lembre-se: é um executável para Windows, você até pode escrever o código em qualquer sistema operacional, mas quando for compilar, terá que utilizar um computador Windows (ou emular um) para executar o compilador.

Quem estiver interessado pode baixar o compilador na página que citei que baixei ou então direto da minha página google: snesc download.

Em outro post ensinarei como utilizar esse compilador para fazer jogos.

terça-feira, 7 de dezembro de 2010

dnscmd - script to insert and remove DNS records from your windows 2003 DNS server


== The problem ==

I needed to insert and remove MX records from the DNS server of my job. They are about 40 subdomains that contains MX, it's not an easy task to insert and remove these records manualy. With my friend's help, we made de script listed in this post.

== The solution ==

To use the script, set the variable "BASE" with the path to the base directory where the script is; configure the variable "DOMINIO" with the name of your domain; create a file called "subdominios.txt" in the same directory where the script is. Inside this file, list all the subdomains that you like to change, don't put ".aob.com", only the name of the subdomain. The file have to be like that:

dominio1
dominio2
dominio3

To execute the script, pass the following parameters:
parameter1 = add, to add records to the subdomains listed in subdominios.txt;
delete, to delete.
parameter2 = the name of the destination server of the added MXs.
Ex.1:
script.bat add email.aob.com
This example will add MX records to all subdomains in subdominios.txt with destination to email.aob.com.

Ex.2:
script.bat delete email.aob.com
This example will delete all MX records from the subdomains in subdominios.txt with destination to email.aob.com.


== The script code is listed bellow: ==

@echo off
set BASE=C:\scripts\atualizamx\
set DOMINIO=aob.com

rem add, delete
set comando=%1

rem antispam1,antispam2,...
set servidor=%2

cd %sBase%

if "%1"=="delete" goto delete
if "%1"=="add" goto add
goto fim

:add
FOR /F %%s IN (subdominios.txt) DO (
dnscmd /recordadd %DOMINIO% %%s MX 10 %servidor%
)
goto fim


:delete
FOR /F %%s IN (subdominios.txt) DO (
dnscmd /recorddelete %DOMINIO% %%s MX 10 %servidor% /f
)

:fim

@echo on




Sorry my english, I'm learning yet!