|A user with System Administration privileges must perform this operation.|
When you install LAMS, you may have another server running on the same ports that LAMS uses.
Skype can sometimes conflict with LAMS but it won't be consistent. Skype will select a port from whatever appears to be free so when you install LAMS on a computer running Skype, you should shutdown Skype before installingLAMS. After that, make sure LAMS starts up before Skype does, and then LAMS and Skype should never conflict.
LAMS defaults to port 8080, so normally it won't conflict with Apache which usually runs on port 80. But occasionally Apache is set up to use port 8080, in which case LAMS and Apache will conflict. If Apache, or some other server, is using 8080, then the instructions on this page should help you move LAMS to a different port.
If you wish to run multiple instances of LAMS on the one server, see Configuring Multiple LAMS Instances on One Machine.
If you are having trouble working out which ports are in use on Windows, you could try Active Ports. We don't recommend, test, give any guarantees about the safety of, etc this program, but we do use it ourselves.
But there are other servers that also using port 8080. If your port 8080 is already used then you will need to assign it to another port. There are two ways to do this. Method 1 is simpler, so do that if you can. There is no hard and fast rule about when is it best to do Method 1 or Method 2 - you do whichever sounds more like your situation.
1. If the other server uses just one port, such as a web caching program, then you can just set LAMS to port 8180 (or some other free port). At install time, you can set the port to 8180 using the installer.
If LAMS was already installed before you discovered the problem, the port can be changed by <LAMS JBoss Server Directory>\server\default\deploy\jbossweb-tomcat55.sar\server.xml (e.g. C:\lams\jboss-4.0.2\server\default\deploy\jbossweb-tomcat55.sar\server.xml) in Wordpad or another text editor, change the following entry to port 8180. You need to change the bit that says 'port="8080"'.
2. If the other server may use many ports, e.g. an application server like Weblogic or Websphere, then install LAMS using port 8180. In this case, we want to use a JBoss feature that shifts all the ports JBoss uses to another port and it will automatically set it to 8180 so you don't get any choice about which port number it chooese.
This will reduce the chance of other ports used by JBoss conflicting with the other application server.
- Install LAMS, setting the port to 8180.
- Once installed, open <LAMS JBoss Server Directory>\server\default\conf\jboss-service.xml (e.g. C:\lams\jboss-4.0.2\server\default\conf\jboss-service.xml) in Wordpad or another text editor, and uncomment the following block (it's commented out by default):
After changing the jboss-service.xml file, restart LAMS.
If both port 8080 and Port 8180 are already used on the server, then there is further configuration that you can do t try 8280, 8380, etc. For the full details, see http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfiguringMultipleJBossInstancesOnOneMachine.
Start JBoss with the VM parameter jboss.service.binding.set set to either ports-default, ports-01, ports-02 etc. For example:
see http://community.jboss.org/wiki/ConfigurePorts for further details.
When you run the installer, it creates an entry in the database for the ServerURL. This url is http://<servername>:<port number>/lams/.
If you change the port number, you need to make sure that the entry in the database matches, otherwise LAMS won't display properly. If you are unsure if it is set right after you have changed the port configuration then it only takes a few minutes to check it.
If you can log into LAMS, log in as sysadmin and go to the System Administration screen. Select "Edit Configuration Settings" and find the entry for ServerURL. It should be the first entry on the list. Check the port, and if it is wrong then change the port number. Log out and log in again - once you log in you will have the correct port number. You don't need to restart the server.
If you can't log into LAMS then change the value in the database directly. Go into a MySQL client, go to the LAMS database, find the lams_configuration table and look at the entry for ServerURL. If you don't have a nice GUI program to access MySQL such as the MySQL GUI tools, you can do it from the command line:
If this value is http://<yourservername>:8180/lams/ then you are okay and you don't need to do anything.
If this value is http://<yourservername>:8180/lams/ then you need to change it. Use the following statement in your MySQL client, replacing <yourservername> with the name of your server.