Mostrando postagens com marcador centos. Mostrar todas as postagens
Mostrando postagens com marcador centos. Mostrar todas as postagens

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

quinta-feira, 2 de dezembro de 2010

dspace - centos installation


== Prerequisites ==
CentOS-5.5
wget

== Installing JDK ==

Downloading packages. Download from the site http://www.oracle.com/technetwork/java/javase/downloads/index.html, execute the .bin and create the environment variables bellow.

Environment variables (yum didn't do this automaticaly in my instalation)
vim /root/.bash_profile
export JAVA_HOME=/usr/src/jdk1.6.0_22/
export PATH=$PATH:$JAVA_HOME/bin

Also run the following lines
export JAVA_HOME=/usr/src/jdk1.6.0_22/
export PATH=$PATH:$JAVA_HOME/bin


== Installing apache maven ==

Download the packages from "http://maven.apache.org/download.html".
My decompression was done in /usr/src/apache-maven-3.0.1. THIS DIRECTORY CAN TO CHANGE depending the version that you are using, pay attention to the paths bellow, you may have to change them.
Download and decompress the packages:
wget http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.1-bin.tar.gz
tar -xzvf apache-maven-3.0.1-bin.tar.gz

Environment variables:
vim /root/.bash_profile
export PATH=$PATH:/usr/src/apache-maven-3.0.1/bin

Also run the following lines:
export PATH=$PATH:/usr/src/apache-maven-3.0.1/bin

Test your configuration
mvn --version


== Installing apache-ant ==

Installation directory
cd /usr/src

You can to download the package from "http://ant.apache.org/bindownload.cgi", however pay attention to the paths names, you may have to change them. I'm downloading the version 1.8.1
Download and decompress the packages in /usr/src:
wget http://mirror.pop-sc.rnp.br/apache//ant/binaries/apache-ant-1.8.1-bin.tar.gz
tar -xzvf apache-ant-1.8.1-bin.tar.gz

Environment variables:
vim /root/.bash_profile
export ANT_HOME=/usr/src/apache-ant-1.8.1/
export PATH=$PATH:$ANT_HOME/bin/

Also run the following lines:
export ANT_HOME=/usr/src/apache-ant-1.8.1/
export PATH=$PATH:$ANT_HOME/bin/

Check if the installation is correct running the following commando, its return must be what's in quotes:
ant -version
"Apache Ant version 1.8.1 compiled on April 30 2010"


== Installing the postgres data base==

Downloading the packages
yum install postgresql84-server postgresql84-libs postgresql84

Starting initial configuration of postgres:
su - postgres
initdb -E utf-8 /var/lib/pgsql/data
exit

Enabling TCP/IP connections by JDBC, just comment the line that has "listen_addresses"
vi /var/lib/pgsql/data/postgresql.conf
.
.
.
#listen_addresses = 'localhost'
.
.
.


Allowing local connections in postgres, add the line "host dspace...":
vi /var/lib/pgsql/data/pg_hba.conf
.
.
.
host dspace dspace 127.0.0.1 255.255.255.255 md5
.
.
.

Restart the service to commit the settings:
/etc/init.d/postgresql restart

Configuring postgres to startup automaticaly:
chkconfig postgresql on

== Installing tomcat ==

Installing the repository that has tomcat for yum:
cd /etc/yum.repos.d/
wget http://www.jpackage.org/jpackage50.repo

Downloading the packages:
yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps --skip-broken

Answer "yes" to the questions about GPG keys:
Importing GPG key 0xC431416D "JPackage Project (JPP Official Keys) " from http://www.jpackage.org/jpackage.asc
Is this ok [y/N]: y

Environment variables:
vim /root/.bash_profile
export TOMCAT_USER=tomcat

Also run the following lines:
export TOMCAT_USER=tomcat

Add the attribute URIEncoding into the server.xml file:
vi /etc/tomcat6/server.xml
.
.
.
<connector port="8080" protocol="HTTP/1.1" connectiontimeout="20000" redirectport="8443" uriencoding="UTF-8">
.
.
.

Remove the tomcat repository. If you want to keep it, jump this line.
rm -f /etc/yum.repos.d/jpackage50.repo

Configuring tomcat to startup automaticaly:
chkconfig tomcat6 on


== Installing perl ==

Downloading the packages
yum install perl

== Installing dspace ==

Download the sources from "http://sourceforge.net/projects/dspace/"
The files were decompressed in "/usr/src/".

Create a database for dspace
createuser -U postgres -d -A -P dspace ; createdb -U dspace -E UNICODE dspace

Execute the package installation command:
cd /usr/src/dspace-1.6.2/dspace
mvn package

Building the packages:
cd /usr/src/dspace-1.6.2/dspace/target/dspace-1.6.2-build.dir/
ant fresh_install

After the execution of the "ant" command, the "dspace" installation will be create in the root directory "/dspace".
Deploy the installation to tomcat:
cp -R /dspace/webapps/* /var/lib/tomcat6/webapps

Create an administrator user for the dspace. Bear in mind: it will ask an e-mail, this e-mail will be your login.
/dspace/bin/create-administrator

Restart the tomcat service
/etc/init.d/tomcat6 restart

Test the dspace installation:
http://YOUR_SERVER_ADDRESS:8080/jspui/

== Possibles errors ==

"Unable to locate the Javac Compiler in: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../lib/tools.jar"
Do not use only the package "*openjdk*" from yum, it isn't complete. Install the JDK like I teach in "Installing JDK".

"WARNING: error instantiating 'org.apache.juli.ClassLoaderLogManager' referenced by java.util.logging.manager, class not found java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager not found"
If you installed the JDK like I teached in "Installing JDK", complete the installation (only if necessary) with "yum" command. Some packages may be missing.
yum install java-1.6.0-openjdk.x86_64

"org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections."
This happens because the postgres connection. Check if the service is running or if the login and password are correct, as well the IP, selinux rules, firewall rules, etc...

"The program package-cleanup is found in the yum-utils package"
Resolve the dependencies:
yum install yum-utils


SORRY MY ENGLISH, I'M LEARNING YET!

dspace - instalação no centos


== Pré-requisitos ==
CentOS-5.5
wget

== Instalando JDK ==

Baixando pacotes. Baixe do site: http://www.oracle.com/technetwork/java/javase/downloads/index.html, execute o .bin e crie as variaveis de ambiente abaixo

Configurando variáveis de ambiente (o yum não fez automático na minha instalação)
vim /root/.bash_profile
export JAVA_HOME=/usr/src/jdk1.6.0_22/
export PATH=$PATH:$JAVA_HOME/bin

Execute também as linhas abaixo
export JAVA_HOME=/usr/src/jdk1.6.0_22/
export PATH=$PATH:$JAVA_HOME/bin

== Instalando apache maven ==

Baixar pacotes de "http://maven.apache.org/download.html".
A descompactação foi realizada no diretório /usr/src/apache-maven-3.0.1. ESSE DIRETÓRIO PODE MUDAR de acordo com a versão que baixar, fique atento nos caminhos que irei informar abaixo, você pode ter que mudá-los.
Baixando e descompacte os pacotes:
wget http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.1-bin.tar.gz
tar -xzvf apache-maven-3.0.1-bin.tar.gz

Configurando variáveis de ambiente:
vim /root/.bash_profile
export PATH=$PATH:/usr/src/apache-maven-3.0.1/bin

Execute também a linha abaixo
export PATH=$PATH:/usr/src/apache-maven-3.0.1/bin

Teste a configuração com o comando abaixo
mvn --version

== Instalando apache-ant ==

Diretorio de instalação
cd /usr/src

Você pode baixar o pacote que quiser em "http://ant.apache.org/bindownload.cgi", porém preste atenção nos nomes dos caminhos que podem mudar de acordo com a versão que baixar. Abaixo adotaremos 1 versão.
Baixe e descompacte o pacote em /usr/src:
wget http://mirror.pop-sc.rnp.br/apache//ant/binaries/apache-ant-1.8.1-bin.tar.gz
tar -xzvf apache-ant-1.8.1-bin.tar.gz

Colocando pasta bin do apache-ant no path do centos e definindo variável de ambiente com o home do apache ant
vim /root/.bash_profile
export ANT_HOME=/usr/src/apache-ant-1.8.1/
export PATH=$PATH:$ANT_HOME/bin/

Execute também
export ANT_HOME=/usr/src/apache-ant-1.8.1/
export PATH=$PATH:$ANT_HOME/bin/

Verifique se a instalação está correta executando o comando abaixo, o retorno deve ser os que está entre aspas:
ant -version
"Apache Ant version 1.8.1 compiled on April 30 2010"


== Instalando banco de dados postgres ==

Baixando pacotes
yum install postgresql84-server postgresql84-libs postgresql84

Configuração inicial do postgres
su - postgres
initdb -E utf-8 /var/lib/pgsql/data
exit

Habilitando conexões TCP/IP pelo JDBC, comente a linha que contém a declaração "listen_addresses"
vi /var/lib/pgsql/data/postgresql.conf
.
.
.
#listen_addresses = 'localhost'
.
.
.

Permitindo conexões locais no postgres, adicione a linha "host dspace..."
vi /var/lib/pgsql/data/pg_hba.conf
.
.
.
host dspace dspace 127.0.0.1 255.255.255.255 md5
.
.
.

Reinicie o serviço para efetivar as configurações
/etc/init.d/postgresql restart

Forçando postgres a iniciar automaticamente
chkconfig postgresql on

== Instalando tomcat ==

Instalando repositório que possui o tomcat para yum
cd /etc/yum.repos.d/
wget http://www.jpackage.org/jpackage50.repo

Baixando pacotes
yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps --skip-broken

Responda "yes" às perguntas sobre chaves:
Importing GPG key 0xC431416D "JPackage Project (JPP Official Keys) " from http://www.jpackage.org/jpackage.asc
Is this ok [y/N]: y

Crie uma variável de ambiente com o usuário tomcat para que o dspace possa utilizá-lo
vim /root/.bash_profile
export TOMCAT_USER=tomcat

Execute também
export TOMCAT_USER=tomcat

Adicione o atributo URIEncoding no arquivo server.xml
vi /etc/tomcat6/server.xml
.
.
.
<connector port="8080" protocol="HTTP/1.1" connectiontimeout="20000" redirectport="8443" uriencoding="UTF-8">
.
.
.

Remova o repositório utilizado para baixar o tomcat. Caso deseja mante-lo, pule essa linha.
rm -f /etc/yum.repos.d/jpackage50.repo

Forçando tomcat a iniciar automaticamente
chkconfig tomcat6 on


== Instalando perl ==

Baixando pacotes
yum install perl

== Instalando dspace ==

Baixe os fontes em "http://sourceforge.net/projects/dspace/"
Os arquivos foram descompactados em "/usr/src/"

Crie um banco de dados dspace
createuser -U postgres -d -A -P dspace ; createdb -U dspace -E UNICODE dspace

Executar comando de instalação dos pacotes
cd /usr/src/dspace-1.6.2/dspace
mvn package

Construindo pacotes
cd /usr/src/dspace-1.6.2/dspace/target/dspace-1.6.2-build.dir/
ant fresh_install

Após a execução do comando "ant", a instalação do "dspace" será criada no diretório raiz "/dspace".
Distribua essa instalação para o tomcat:
cp -R /dspace/webapps/* /var/lib/tomcat6/webapps

Criando usuário administrador, será pedido um e-mail, esse e-mail será seu login.
/dspace/bin/create-administrator

Reinicie o serviço tomcat
/etc/init.d/tomcat6 restart

Teste o funcionamento do dspace:
http://ENDERECO_DO_SEU_SERVIDOR:8080/jspui/

== Possíveis erros ==

"Unable to locate the Javac Compiler in: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../lib/tools.jar"
Não utilize somente o pacote "*openjdk*" do yum, pois ele não é completo. Instale o JDK da maneira que ensino no tópico "Instalando jdk".

"WARNING: error instantiating 'org.apache.juli.ClassLoaderLogManager' referenced by java.util.logging.manager, class not found java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager not found"
Caso tenha instalado o JDK da maneira que ensino em "Instalando jdk" e mesmo assim esteja recebendo a mensagem acima, complemente a instalação com o comando "yum" para baixar alguns pacotes que ainda podem estar faltando.
yum install java-1.6.0-openjdk.x86_64

"org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections."
Esse problema é relativo à conexão com o postgres. Verifique se o serviço está funcionando ou se o login e senha estão corretos, bem como endereço IP, selinux, firewall, entre outros.

"The program package-cleanup is found in the yum-utils package"
Resolva a dependência:
yum install yum-utils

quarta-feira, 1 de dezembro de 2010

asterisk - instalação no centos

Passo a passo retirado de "http://www.asterisk.org/downloads/yum"
Baixe a máquina virtual que utilizei para fazer esse tutorial clicando aqui: asterisk-vm.
Essa máquina já está com uma configuração básica que fiz seguindo o tutorial do link http://phplinuxandthelike.wordpress.com/2007/09/04/basic-asterisk-configuration/
Para utiliza-la, inicie a máquina e configure os sip-phones com os logins e senhas contidos em /etc/asterisk/sip.conf.


== Instalação do asterisk ==

- adicione no arquivo "/etc/yum.repos.d/centos-asterisk.repo" as seguinte linhas:

[asterisk-tested]
name=CentOS-$releasever - Asterisk - Tested
baseurl=http://packages.asterisk.org/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium

[asterisk-current]
name=CentOS-$releasever - Asterisk - Current
baseurl=http://packages.asterisk.org/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium

- adicione no arquivo "/etc/yum.repos.d/centos-digium.repo" as seguinte linhas:

[digium-tested]
name=CentOS-$releasever - Digium - Tested
baseurl=http://packages.digium.com/centos/$releasever/tested/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium

[digium-current]
name=CentOS-$releasever - Digium - Current
baseurl=http://packages.digium.com/centos/$releasever/current/$basearch/
enabled=1
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium


- Atualize o yum

yum update


- Instale o asterisk e suas dependencias

yum install asterisk16 asterisk16-configs asterisk16-voicemail dahdi-linux dahdi


- Teste a instalação do asterisk

asterisk -vvvgci

sexta-feira, 29 de outubro de 2010

Instalando phpmotion no centos 5.5 64bits

-------------------------------------------------------------------------------
Instalando phpmotion no centos 5.5 64bits
-------------------------------------------------------------------------------
[Informações]

Maquina: VMWare esxi 4.0
Sistema: Centos 5.5 x86_64

-------------------------------------------------------------------------------
[Instalando dependências]

- Adicionando repositorios para yum:
# vim /etc/yum.repos.d/dag.repo
.
.
.
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
.
.
.
# rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

- Instalando via yum:
# yum install ffmpeg ffmpeg-devel flvtool2 mencoder libogg.x86_64 libvorbis.x86_64 php-gd

-------------------------------------------------------------------------------
[Habilitando phpshield]

- Copiando modulo phpshield para extension_dir do php:
# cp /var/www/html/phpshield/* /usr/lib64/php/modules

- Habilitando no php.ini o modulo /usr/lib64/php/modules/phpshield.5.2.lin:
# vim /etc/php.ini
.
.
.
extension=phpshield.5.2.lin
.
.
.

Nota: Não utilize o caminho completo, somente o nome do modulo mesmo.


-------------------------------------------------------------------------------
[Possiveis erros]

- Ao fazer upload de um video, o seguinte erro aparece no site:
"
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
"

Ou então no log de erro do apache:

"
[Fri Aug 13 09:35:21 2010] [error] [client 172.20.7.0] (13)Permission denied: exec of '/var/www/html/cgi-bin/uu_ini_status.pl' failed, referer: http://video.com/uploader.php
[Fri Aug 13 09:35:21 2010] [error] [client 172.20.7.0] Premature end of script headers: uu_ini_status.pl, referer: http://video1.ufes.br/uploader.php
[Fri Aug 13 09:35:21 2010] [error] [client 172.20.7.0] (13)Permission denied: exec of '/var/www/html/cgi-bin/uu_upload.pl' failed, referer: http://video.com/uploader.php
[Fri Aug 13 09:35:21 2010] [error] [client 172.20.7.0] Premature end of script headers: uu_upload.pl, referer: http://video.com/uploader.php
"

Esse erro ocorre se o usuario "apache", ou o usuário que o servidor web utiliza para acessar os arquivos, estiver sem permissão de execução na pasta cgi-bin. Execute o seguinte comando para resolver:
# chmod -R 774 /var/www/html/cgi-bin


- Links não funcionam:
"
Not Found
The requested URL /albums/load/featured was not found on this server.
"

Em "/etc/httpd/conf/httpd.conf" altere as seguintes linhas para:
.
.
.
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All #nao pode ser none, deve ser All
Order allow,deny
Allow from all
</Directory>
.
.
.

Verifique também se o arquivo .htaccess existe no diretório raiz do site com as declarações de tradução da url.


- Ao fazer upload de video, o seguinte erro é retornado:
"Access Forbidden!"

Em "/etc/httpd/conf/httpd.conf" altere as seguintes linhas para:
.
.
.
<Directory "/var/www/html/cgi-bin">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
.
.
.

- Faz upload do vídeo porém o mesmo não aparece. Deve-se retirar o caminho "/usr/share/ffmpeg" na pagina "/siteadmin/settings_general.php" na variável "Path to ffmpeg".


- "Checking if PHPshield encoded files are working: The results above indicate that there is a problem with PHPShield".
Certifique-se que você executou o comando abaixo:
cp /var/www/html/phpshield/* /usr/lib64/php/modules


- "Error! - Can't connect to MySQL server on 'db.teste.com' (13)"
Durante a instalação você pode receber essa mensagem. Suas configurações podem estar erradas ou então, no meu caso, o selinux pode estar bloqueando. Para habilitar o selinux, consulte o tópico "http://andreob.blogspot.com/2010/10/compilar-regra-no-selinux-para-liberar.html"


- "Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-gd-5.1.6-27.el5_5.3.x86_64 (updates)"
Apague a instalação do php-common pois isso pode estar dando algum conflito com os pacotes. Após isso, reinstale os pacotes separadamente.
yum remove php-common
yum install php-gd
yum install php php-cli php-mysql php-pdo php-pgsql


- "Error! - Some files and folders are not CHMOD correctly "
No diretório que as páginas do phpmotion, execute os seguintes comandos para alterar as permissões nas pastas:
chown -R apache.apache ./*
chmod -R 755 uploads
chmod -R 755 classes
chmod -R 755 logs
chmod -R 755 setup
chmod -R 755 pictures
chmod -R 755 temp

- "Not Found The requested URL /cgi-bin/uu_upload.pl was not found on this server."
Infelizmente não consegui descobrir exatamente o que gera esse erro. Mas fiz algo para contornar o problema, crio um link simbolico em /var/www/cgi-bin apontando para o cgi-bin do phpmotion:
ln -s /var/www/html/cgi-bin/ /var/www/cgi-bin
-------------------------------------------------------------------------------

quarta-feira, 7 de julho de 2010

Instalando postgres 8.4 + tcl + tk no centos 5.5 x86_64

-------------------------------------------------------------------------------
Instalando postgres 8.4 + tcl + tk no centos 5.5 x86_64
-------------------------------------------------------------------------------
[Informações]

Maquina: VMWare esxi 4.0
Sistema: Centos 5.5 x86_64
Postgres: 8.4

-------------------------------------------------------------------------------
[Procedimento de instalação do postgres]

- instalando servidor postgres e bibliotecas:
yum install postgresql84-server postgresql84-libs postgresql84

- configurando inicio do postgres:
# su - postgres
# initdb -E utf-8 /var/lib/pgsql/data

- configurando permissões para nossas redes:
# vim /var/lib/pgsql/data/pg_hba.conf
...
host all all 172.20.6.0/23 md5
host all all 172.20.2.0/23 md5
host all all 172.20.10.0/23 md5
...

- habilitando serviço para escutar externamente:
# vim /var/lib/pgsql/data/postgresql.conf
...
listen_addresses = '*'
...

- iniciando serviço:
# /etc/init.d/postgresql restart

- forçando postgresql iniciar automaticamente durante o boot:
# chkconfig postgresql on

- criando usuario administrador:
# su - postgres
# createuser -P
Enter name of role to add: super
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) y

-------------------------------------------------------------------------------
[Procedimento de instalação do tcl/tk]

- instalando tcl e tk:
# yum install tcl tk postgresql84-pltcl.x86_64


- ativando linguagem em um banco de dados:
# createlang -U postgres pltcl NOME_DO_BANCO_DE_DADOS

-------------------------------------------------------------------------------
[Possiveis erros]

- ao executar "createlang -U postgres pltcl NOME_DO_BANCO_DE_DADOS" o seguinte erro retorna:
createlang: language installation failed: ERROR: could not access file "$libdir/pltcl": No such file or directory
Esse erro pode ocorrer caso o pacote "postgresql84-pltcl.x86_64" não seja instalado.

-------------------------------------------------------------------------------

sexta-feira, 2 de julho de 2010

Instalando httpd + php 5.2 no centos 5.5

-------------------------------------------------------------------------------
Instalando httpd + php 5.2 no centos 5.5
-------------------------------------------------------------------------------
[Informações]

Maquina: VMWare esxi 4.0
Sistema: Centos 5.5

-------------------------------------------------------------------------------
[Procedimento de instalação]

- instalando repositorio que possui o php 5.2:
# rpm -ivh http://software.virtualmin.com/bleed/centos/5/x86_64/virtualmin-bleed-release-1.0-1.rhel.noarch.rpm

- pegando arquivo de autenticação do repositorio:
# rpm -import http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin

- instalando httpd e php:
# yum install httpd php

- forçando httpd iniciar automaticamente durante o boot:
# chkconfig httpd on

- iniciando serviço:
# /etc/init.d/httpd start

-------------------------------------------------------------------------------

terça-feira, 11 de maio de 2010

centos + httpd + php + pgsql + selinux: Unable to connect to PostgreSQL server: could not connect to server: Permission denied

Uma forma de resolver esse problema é desativar o selinux somente para o httpd.
Execute o seguinte comando:

# setsebool -P httpd_can_network_connect_db=1