Web Server | ActiveMQ | Maven | Ant URLs | End

Apache

Apache homepage,

Apache projects

Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns provider. Tested inside popular J2EE servers such as Geronimo, JBoss 4, GlassFish and WebLogic.

Apache CXF is an open source services framework. CXF helps you build and develop services using frontend programming APIs, like JAX-WS and JAX-RS.

Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration. Camel also provides a powerful set of testing tools for validating your integration logic, so you can fully testing your integration logic, as you did unit test your business logic.

Apache ServiceMix is a flexible, open-source integration container that unifies the features and functionality of Apache ActiveMQ, Camel, CXF, ODE, Karaf into a powerful runtime platform you can use to build your own integrations solutions. It provides a complete, enterprise ready ESB exclusively powered by OSGi.


Amunt! Top Amunt!
Apache Web Server

For complete installation documentation, see [ht]docs/manual/install.html or http://httpd.apache.org/docs/2.2/install.html

$ ./configure --prefix=PREFIX $ make $ sudo make install $ /usr/local/apache2/bin/apachectl start

NOTES: Replace PREFIX with the filesystem path under which Apache should be installed. A typical installation might use

{linux} /usr/local/apache2 {win} c:\Program Files\Apache Software Foundation\Apache2.2\

Configuration file (default path):

{linux} /usr/local/apache2/conf/httpd.conf {win} c:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf

A typical problem is :

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

To fix it, we edit httpd.conf to include this line :

ServerName 1.2.3.4

And restart the service :

{linux} sudo /etc/init.d/apache2 restart {win}

We also did define the document root in httpd.conf

{linux} DocumentRoot "/usr/local/apache2/htdocs" {win} DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" - compte : barres "/" !?

So now, if we browse

http://localhost/

We receive ( from file /usr/local/apache2/htdocs/index.html or {win} C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\index.html )

==> It Works !

Error log is located at

{linux} $PREF/logs/error.log {win} %PREF%\logs\error.log

We changed the documents directory to c:\ and now get this error :

C:\Program Files\Apache Software Foundation\Apache2.2\logs>type error.log Starting the Apache2.2 service The Apache2.2 service is running. [Thu Jan 05 15:18:27 2012] [error] [client 9.137.164.152] (OS 5)Access is denied. : file permissions deny server access: C:/bisc/pages/BISC/test.htm

Nice Tips.


Amunt! Top Amunt!
ActiveMQ

Apache ActiveMQ is a highly configurable, extensible, and feature-rich message-oriented middleware (MOM) system.

Homepage, download, features, good FAQs, forum [u/k]

Environment requirements:

Install : download

27.685.511 apache-activemq-5.5.0-bin.zip

and unzip into destination directory : no other installation is required !

Configure JAVA_HOME:

c:\eines>echo %JAVA_HOME% c:\Program Files\Java\jre7

Start :

c:\apache-activemq-5.5.0\bin> activemq.bat Warning: JAVA_HOME environment variable is not set. Java Runtime: Sun Microsystems Inc. 1.6.0_29 C:\Program Files\Java\jre6 Heap sizes: current=15872k free=14585k max=506816k JVM args: -Dcom.sun.management.jmxremote -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dactivemq.classpath=c:\apache-activemq-5.5.1\bin\../conf;c:\apache-activemq-5.5.1\bin\../conf; -Dactivemq.home=c:\apache-activemq-5.5.1\bin\.. -Dactivemq.base=c:\apache-activemq-5.5.1\bin\.. ACTIVEMQ_HOME: c:\apache-activemq-5.5.1\bin\.. ACTIVEMQ_BASE: c:\apache-activemq-5.5.1\bin\.. Loading message broker from: xbean:activemq.xml INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@1f4689e: startup date [Wed Feb 01 16:14:55 CET 2012]; root of context hierarchy WARN | destroyApplicationContextOnStop parameter is deprecated, please use shutdown hooks instead INFO | PListStore:c:\apache-activemq-5.5.1\bin\..\data\localhost\tmp_storage started INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[c:\apache-activemq-5.5.1\bin\..\data\kahadb] INFO | ActiveMQ 5.5.1 JMS Message Broker (localhost) is starting INFO | For help or more information please see: http://activemq.apache.org/ INFO | Listening for connections at: tcp://bcnlab005:61616 INFO | Connector openwire Started INFO | ActiveMQ JMS Message Broker (localhost, ID:bcnlab005-1085-1328109297609-0:1) started INFO | jetty-7.1.6.v20100715 INFO | ActiveMQ WebConsole initialized. INFO | Initializing Spring FrameworkServlet 'dispatcher' INFO | ActiveMQ Console at http://0.0.0.0:8161/admin INFO | ActiveMQ Web Demos at http://0.0.0.0:8161/demo INFO | RESTful file access application at http://0.0.0.0:8161/fileserver INFO | Started SelectChannelConnector@0.0.0.0:8161 + + + "Control-C" at DOS prompt ... INFO | ActiveMQ Message Broker (localhost, ID:bcnlab005-1078-1328179573171-0:1) is shutting down INFO | ActiveMQ Message Broker (localhost, ID:bcnlab005-1078-1328179573171-0:1) is shutting down INFO | Connector openwire Stopped INFO | PListStore:c:\apache-activemq-5.5.1\bin\..\data\localhost\tmp_storage stopped INFO | Stopping async queue tasks INFO | Stopping async topic tasks INFO | Stopped KahaDB INFO | KahaDB: Recovering checkpoint thread after death INFO | Connector openwire Stopped INFO | ActiveMQ JMS Message Broker (localhost, ID:bcnlab005-1078-1328179573171-0:1) stopped INFO | ActiveMQ JMS Message Broker (localhost, ID:bcnlab005-1078-1328179573171-0:1) stopped Terminate batch job (Y/N)?

Testing the installation :

Running the samples (as video shows) :

Note the -Durl=tcp://localhost:61616 optional argument to the example ant scripts. Use the -Durl option but replace "localhost" with the remote node name. {Thanks, Gary !}

Configuring : conf/activemq.xml

ActiveMQ ports

To change them, modify conf/servicemix.properties and also conf/activemq.xml.

ActiveMQ Monitoring

Start here : you can monitor ActiveMQ using the Web Console : http://localhost:8161/admin
Or you can use the JMX support to view the running state of ActiveMQ : jmx.html :

You can enable/disable JMX support as follows...
(2) Run a JMX console, e.g. jconsole - JMX console included in the JDK /bin/jconsole.exe
See "run.jar start" at port 3264 ...

To connect to a remote ActiveMQ instance, or if the local process does not show up, use Remote Process option, and enter an URL. Here is an example localhost URL:

service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
setup JMX

In "activemq.bat" file, uncoment line

set SUNJMX=-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

Now you can see

c:\apache-activemq-5.5.1\bin> netstat -an | find "1099" TCP 0.0.0.0:1099 0.0.0.0:0 LISTENING

Otherwise you get

c:\apache-activemq-5.5.1\bin> activemq-admin.bat list Java Runtime: Oracle Corporation 1.7.0_01 c:\Program Files\Java\jre7 Heap sizes: current=15872k free=15494k max=253440k JVM args: -Dactivemq.classpath=c:\apache-activemq-5.5.1\bin\../conf; -Dactivemq.home=c:\apache-activemq-5.5.1\bin\.. -Dactivemq.base=c:\apache-activemq-5.5.1\bin\.. ACTIVEMQ_HOME: c:\apache-activemq-5.5.1\bin\.. ACTIVEMQ_BASE: c:\apache-activemq-5.5.1\bin\.. Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi ERROR: java.lang.RuntimeException: Failed to execute list task. Reason: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost;
ActiveMQ Command-Line commands

In versions prior to 5.0 the functionality of activemq-admin script was scattered over multiple scripts, such as:

url

To display ActiveMQ version, use the command :

activemq --version

To display the running brokers list, use the command :

c:\apache-activemq-5.5.1\bin> activemq-admin.bat list Java Runtime: Oracle Corporation 1.7.0_01 c:\Program Files\Java\jre7 Heap sizes: current=15872k free=15494k max=253440k JVM args: -Dactivemq.classpath=c:\apache-activemq-5.5.1\bin\../conf; -Dactivemq.home=c:\apache-activemq-5.5.1\bin\.. -Dactivemq.base=c:\apache-activemq-5.5.1\bin\.. ACTIVEMQ_HOME: c:\apache-activemq-5.5.1\bin\.. ACTIVEMQ_BASE: c:\apache-activemq-5.5.1\bin\.. Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi BrokerName = localhost

To display all the attributes and object name information of all registered queues, use :

c:\apache-activemq-5.5.1\bin> activemq-admin query -QQueue=* DequeueCount = 0 Name = TEST.FOO MinEnqueueTime = 0 CursorMemoryUsage = 0 MaxAuditDepth = 2048 Destination = TEST.FOO AverageEnqueueTime = 0.0 InFlightCount = 0 MemoryLimit = 1048576 Type = Queue EnqueueCount = 0 MaxEnqueueTime = 0 MemoryUsagePortion = 0.0 ProducerCount = 0 UseCache = true BlockedProducerWarningInterval = 30000 MaxProducersToAudit = 64 PrioritizedMessages = false CursorFull = false BrokerName = localhost ConsumerCount = 0 ProducerFlowControl = true CacheEnabled = true Subscriptions = [] QueueSize = 0 MaxPageSize = 200 CursorPercentUsage = 0 DispatchCount = 0 MemoryPercentUsage = 0 ExpiredCount = 0 DequeueCount = 0 Name = FOO.BAR2

To display all the attributes and object name information for all connections and connectors for broker 'localhost' except its network connectors, use :

c:\apache-activemq-5.5.1\bin> activemq-admin query --objname Type=Connect,BrokerName=localhost -xQNetworkConnector=*
ActiveMQ tools

URL

MAVEN ?

Notes / Tuning Information

KahaDB:

Non-Standard Settings: indexCacheSize="100000" journalMaxFileLength="64mb" indexWriteBatchSize="100000"

ActiveMQ-JVM args:

-Xmx3G -Xms3G -Dorg.apache.activemq.UseDedicatedTaskRunner=false -XX:+AggressiveHeap -XX:+UseParallelGC -XX:ParallelGCThreads=2 -XX:LargePageSizeInBytes=4m -XX:+UseParallelOldGC -verbose:gc -Dcom.sun.management.jmxremote

URL, url,

Books
ActiveMQ versus WebSphereMQ

There is no direct correlation between WMQ objects and ActiveMQ because the ActiveMQ architecture is different. However, there are some loose correlations that can be made. The WMQ queue manager is roughly equivalent to the ActiveMQ broker. When an application is connected to an ActiveMQ broker, it is simply making use of JMS destinations, i.e., there is no distinction between local and remote. Also, ActiveMQ has no distinction between channels and queues -- again, it's all just JMS destinations.

JMS destination objects are destination objects that a client uses to specify the target of messages that it produces and the source of messages that it consumes. A JMS destination provides a specific end point for messages.

ActiveMQ 2 Websphere MQ

Follow the suggestions of many postings on how to get ActiveMQ to forward msg's to Websphere MQ using Camel.

Mind "concurrentConsumers" : url.

url :

ActiveMQ can talk to IBM's MQ via the "jmsBridgeConnectors" http://activemq.apache.org/jms-to-jms-bridge.html. I've tested it in 5.5 successfully. I defined a remote ConnectionFactory like so:

<bean id="remoteBlueFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory"> <property name="transportType" value="1"/> <property name="hostName" value="ibmbrokerhost1"/> <property name="port" value="1414"/> <property name="queueManager" value="QMGRNAME"/> <property name="channel" value="UNSECURE.BKR.CHANNEL"/> </bean>

We saw an issue where ActiveMQ needed to be restarted to send messages "stuck" while the WMQ was down, but we haven't followed up on whether that was a bug or a configuration issue.

Note that <property name="channel" value="UNSECURE.BKR.CHANNEL"/> should point to a server connection channel in WMQ parlance (SVRCONN), and not to a sender or receiver channel (those are for WMQ-to-WMQ queue manager connection).

SVRCONN is the channel type you get by default when you don't specify the channel property at all on the MQ connection factory.

url : JMS bridge.

ActiveMQ links

Amunt! Top Amunt!
Ant

Apache Ant is a Java library and command-line tool who's mission is to drive processes described in build files as targets and extension points dependent upon each other.

If you use Unix scripts as well as Windows BATs, the solution to have only one source is to use Apache Ant, which is a Java-based build tool that uses XML-based configuration files as input.

wiki, homepage.


Pending


Resum
  Apache PHP MySQL Nuke
Homepage Homepage Homepage Homepage Homepage
Docs Apache Docu & FAQs MySQL  
Cfg /etc/apache2/httpd.conf /etc/php.ini /etc/my.cnf /srv/www/htdocs/config.php
Log /var/log/apache2/error.log
[ httpd.conf ErrorLog ]
/var/log/php/error_log.txt
[ php.ini error_log ]
/var/lib/mysql/mysqld.log
[ my.cnf err-log ]
 
Activació /etc/init.d/rc5.d/S90apache2 -> ../apache2   safe_mysqld &  

Maven

Maven is a software tool for project management and build automation. While primarily used for Java programming, it can also be used to build and manage projects written in C#, Ruby, Scala, and other languages.

wiki.


Amunt! Top Amunt!
Tomcat

Lets rotate "catalina.out", tomcat's log, in order not to overflow all filesystem :

$ vi /etc/logrotate.d/tomcat5 /var/log/tomcat5/catalina.out { copytruncate daily rotate 5 compress missingok size 100M }

Apache al P4 sota SuSE 8.2


Perl

P4

uno.pl

 #!/usr/bin/perl
 print "Content-type: text/html\n\n";
 print "Hello.";
 

Tinet


Amunt! Top Amunt!
SSI

P4

sample.shtml

 <hr>
 <!--#echo var="DATE_LOCAL" -->
 <hr>
 

Amunt! Top Amunt!
PHP4


prova.php

 <hr>
 <?php
 echo "Hi, I'm a PHP Script !"
 ?>
 <hr>
 <?="Hello World"?>
 <hr>
 <? print("Hello World using PRINT") ?>
 <hr>
 mm/dd/yyyy : <? print date("m/j/Y"); ?>
 <p>
 mm/dd/yyyy : <? print date("H:i:s"); ?>
 <hr>
 <?php phpinfo() ?>
 <hr>
 

Sequència inicial (gràcies, Xavi !)

  1. - El Nuke carrega index.php
  2. - D'aquí recupera el config.php i les dades per accedir a la BD
  3. - Ara el mainfile. php
  4. - Despreś el Theme.
  5. - Després recupera el mòdul per carregar al home i els blocs laterals
  6. - Finalment el peu de pàgina.

Funcions interessants :


Good intro says : What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server.
Tutorial, download links, instructions. Select install (1/4) mode
Complete scripts
Lots of PHP, even Socket Programming


Linex té associat modules.php a tots els botonets de "mostrar" / "amagar" !


Amunt! Top Amunt!
MySQL


Amunt! Top Amunt!
PHP-Nuke

Jordi's


Opera config (SuSE 8.2 : v 6.03 build 219)


VMWARE : Apache under SuSE 8.2 at T30


Amunt! Top Amunt!
Links to Apache tutorials

Not mine, but from /usr/share/apache2/manual/tutorials.html

Installation & Getting Started
Basic Configuration
Security
Logging
CGI and SSI
Other Features

Amunt! Top Amunt!
Links/URLs


Ep ! Site under construction. Escriu-me ! Actualitzat el 28/3/2012 (a). Uf !