jueves, 27 de septiembre de 2012
Locuras
La loca me miró através de las rejas y sonrió. Era joven y hermosa y soñé con hacer mía a aquella mujer después de rescatarla de la oscuridad. Volví una y otra vez, pero el medico me dijo: "Es incurable"; La miraba y me dolía su hermosura y su sonrisa de niña confíada. Mi sueño de curarla y tenerla se hizo trizas, pues ella nunca sería cuerda.. Sin embargo, ahora somos felices. Yo me volvi loco, estamos juntos
Halley Mora
martes, 25 de septiembre de 2012
Servidor Web
Instalar apache
[root@heavymetal ~]$ yum -y install httpd php java
Revisar /etc/httpd/conf/httpd.conf
Descomentar ServerName xxx:80
Listen 80
Leer y configurar los demás de acuerdo a tus necesidades.
Hacer que inicie:
[root@heavymetal ~]$ service httpd on
Para el init:
[root@heavymetal ~]$ chkconfig httpd on
[root@heavymetal ~]$ chkconfig --add httpd
[root@heavymetal ~]$ chkconfig --levels 245 on-----------------------------------------------------------------------------------------------------------------
INSTALAR TOMCAT
-----------------------------------------------------------------------------------------------------------------Descargar e instalar JRE y JDK desde:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Declaras:
[root@heavymetal ~]JAVA_HOME=/usr/lib/jvm/java-1.6.0
[root@heavymetal ~]export JAVA_HOME
[root@heavymetal ~]PATH=$JAVA_HOME/bin:$PATH
[root@heavymetal ~]PATH=$JAVA_HOME/bin:$PATH
Ahora proba si configuraste bien:
[root@heavymetal ~]$ echo $JAVA_HOME
/usr/lib/jvm/java-1.6.0
Ok, si te sale así esta todo bien y ya cumpliste la primera parte.
-----------------------------------------------------------------------------------------------------------------
Nos queda descargar y configurar el Tomcat.
Bajas la ultima version del tomcat aca.
Movemos /opt/tomcat y desempaquetamos ahi, y dp hacemos un acceso directo al tomcat 7 ahi en la misma carpeta nomas.
[root@heavymetal ~]$ mv /home/cfleytas/Descargas/apache-tomcat-7.0.30.tar.gz /opt/
[root@heavymetal ~]$ cd /opt/
[root@heavymetal opt]$ tar -xzf apache-tomcat-7.0.30.tar.gz
Ahora tenemos que configurar para que inicie cuando arranque el sistema.
[root@heavymetal opt]$ cd /etc/init.d/y copiamos el siguiente script
[root@heavymetal init.d]$ vim tomcat
#!/bin/bashSe le da los permisos para que sea ejecutable
#description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/usr/lib/jvm/java-1.6.0
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/opt/apache-tomcat-7.0.30
case $1 in
start)
sh $CATALINA_HOME/bin/startup.sh
;;
stop)
sh $CATALINA_HOME/bin/shutdown.sh
;;
restart)
sh $CATALINA_HOME/bin/shutdown.sh
sh $CATALINA_HOME/bin/startup.sh
;;
esac
exit 0
[root@heavymetal init.d]# chmod 775 tomcatSe le agrega para el inicio del sistema
[root@heavymetal init.d]# chkconfig --add tomcatVerificar si esta todo bien:
[root@heavymetal init.d]# chkconfig --level 234 tomcat on
[root@heavymetal init.d]# chkconfig --list tomcatAhora iniciamos el script
tomcat 0:desactivado 1:desactivado 2:activo 3:activo 4:activo 5:desactivado 6:desactivado
Iniciar:
[root@heavymetal init.d]# service tomcat start
Using CATALINA_BASE: /opt/tomcat7
Using CATALINA_HOME: /opt/tomcat7
Using CATALINA_TMPDIR: /opt/tomcat7/temp
Using JRE_HOME: /usr/lib/jvm/java-1.6.0
Using CLASSPATH: /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
Parar:
[root@heavymetal init.d]# service tomcat start
Using CATALINA_BASE: /opt/tomcat7
Using CATALINA_HOME: /opt/tomcat7
Using CATALINA_TMPDIR: /opt/tomcat7/temp
Using JRE_HOME: /usr/lib/jvm/java-1.6.0
Using CLASSPATH: /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
Reiniciar (Para re-iniciar tiene que estar INICIADO [para los que no entienden lo que significa reiniciar]):
[root@heavymetal init.d]# service tomcat restartY ya esta funcionando el servidor, para ingresar le das en tu explorador localhost:8080 ha opama.
Using CATALINA_BASE: /opt/tomcat7
Using CATALINA_HOME: /opt/tomcat7
Using CATALINA_TMPDIR: /opt/tomcat7/temp
Using JRE_HOME: /usr/lib/jvm/java-1.6.0
Using CLASSPATH: /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
Using CATALINA_BASE: /opt/tomcat7
Using CATALINA_HOME: /opt/tomcat7
Using CATALINA_TMPDIR: /opt/tomcat7/temp
Using JRE_HOME: /usr/lib/jvm/java-1.6.0
Using CLASSPATH: /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
Suscribirse a:
Entradas (Atom)