Installing Magnolia
Installing Magnolia
This guide assumes that you are installing Magnolia for non-production purposes. Installation and deployment of Magnolia for production is usually associated with additional installation, configuration steps and testing phases that are not mentioned in this guide. See also the Modifying the magnolia.home property section on the Configuration management page. |
Get Java
Magnolia needs at least a Java Runtime Environment (JRE) to run. Check if there’s a version of Java already installed on your computer by opening the terminal or command prompt and typing java -version
in a terminal or command prompt. If the system reports a version number, Java is installed on your computer.
See the Certified stack page to confirm that the version installed is supported. |
If you don’t have Java on your computer, proceed to install it.
On Windows, you need a Java SE Development Kit (JDK). The Java Runtime Environment (JRE) is not enough because the Tomcat application server does not recognize it.
What is the difference?
-
JRE is for users who run Java programs on their computers.
-
JDK is for developers who write Java-based applications.
Download and install JDK. By default, JDK is installed at C:\Program Files\Java\jdk-<version>\. You can choose another location.
Check JAVA_HOME environment variable
-
Open the command prompt.
-
Type
set
and press ENTER. -
Find
JAVA_HOME
in the command output and verify that the path points to your JDK installation directory, for example,C:\Program Files\Java\jdk-<version>>.xx
. -
If
JAVA_HOME
is missing or it points to the wrong directory, see Set JAVA_HOME environment variable below.
Set JAVA_HOME environment variable
-
Right-click My Computer and select Properties.
-
Go to the Advanced tab.
(In Windows 7+, right-click Computer and select Advanced System Settings, then Environment variables.) -
If the
JAVA_HOME
environment variable does not exist in User variables or System variables, create it:-
User variables apply to the currently signed-in user only. Create
JAVA_HOME
here if you want it to apply only to the currently logged-in user. These variables take precedence over system variables. -
System variables apply to all users. Create
JAVA_HOME
here if you want it to apply to all users. You must be an administrator to modify a system environment variable.
-
-
Set the value of
JAVA_HOME
to the path of your JDK installation directory, for exampleC:\Program Files\Java\jdk-10.0.xx
. -
Optional step: Add the Magnolia
bin
directory to thePATH
variable, for example,C:\Program Files\magnolia\apache-tomcat-x.y\bin
. Setting thePATH
allows you to issue the Magnoliastart
andstop
commands from anywhere without navigating to the installation directory first. Separate the path from existing paths with a semicolon ( ; ). If you do this, you also need to addCATALINA_HOME
to environment variables. Set the value ofCATALINA_HOME
to the Tomcat installation directory, for example,C:\Program Files\magnolia\apache-tomcat-x.y
-
Click OK.
-
Go back to Check JAVA_HOME environment variable above and test that the variable is found and has the correct value. You need to open a new command prompt since environment variables are session specific.
Alternatively, you can set JAVA_HOME with a batch file. Add this line to
/apache-tomcat/bin/magnolia_control.bat
:
set JAVA_HOME=C:\Program Files\Java\jdk-<version>>.xx
The set
command creates the JAVA_HOME
environment variable and sets
its value to the JDK directory. The command is executed when Magnolia
starts.
For Mac, you need to download or update to Java 11 or higher. After reviewing and agreeing to the terms of the license agreement, download the file, then double-click it to launch the installation wizard and follow the installation instructions.
The installation directory varies from one Linux system to another. On Debian-based distributions, JREs or JDKs are usually installed in /usr/lib/jvm/
.
As an alternative to the following instructions, you can use the Magnolia CLI to install and start Magnolia.
Extracted folder structure
magnolia-x.y/ ├── add-ons/ └── apache-tomcat-x.y/ ├── bin/ ├── conf/ ├── lib/ ├── logs/ ├── temp/ ├── webapps/ | ├── magnoliaAuthor/ | ├── magnoliaPublic/ | └── ROOT/ └── work/
Where to extract:
Extract the zip to /Applications
or another directory on your
computer.
Extract the zip to C:\Users\<username>\magnolia
or another directory
on your computer.
If you are installing Magnolia for personal use extract the zip to
/home/<your account>
or equivalent directory. If you are installing
onto a production server extract the zip to /usr/local
or /opt
. A
normal user account may not have permissions to extract files into a
target directory such as /opt
. If this is the case extract the zip in
the folder where you downloaded it, open a terminal window, and move the
extracted folder using sudo mv magnolia-x.y
. The sudo
command will
execute the mv
(move) command as superuser, prompting you for a
password.
If you are installing Magnolia for personal use extract the zip to
/export/home/<your account>
or equivalent directory. If you are
installing onto a production server extract the zip to /usr/local
or
/opt
. A normal user account may not have permissions to extract files
into a target directory such as /opt
. If this is the case extract the
zip in the folder where you downloaded it, open a terminal window, and
move the extracted folder using sudo mv magnolia-x.y
. The sudo
command will execute the mv
(move) command as superuser, prompting you
for a password.
GPL v3 disclaimer
Magnolia Community Edition software is distributed free-of-charge and without any warranty under the terms of the GNU General Public License (version 3), a license that permits you to redistribute and modify the software under certain terms and conditions. It is important that you read the license to understand your rights and obligations.
Start Magnolia
Go to the magnolia-x.y/apache-tomcat-x.y/bin
directory and type:
./magnolia_control.sh start
If you get an error due to a low max open files limit, try
executing the command with the --ignore-open-files-limit option:
|
./magnolia_control.sh start --ignore-open-files-limit
Detailed instructions
Mac OS
-
Open a terminal window in Applications > Utilities > Terminal.
-
Go to the Magnolia installation directory
cd /Applications/magnolia-x.y/apache-tomcat/bin
-
Start Magnolia.
./magnolia_control.sh start && tail -f ../logs/catalina.out
The first part of the startup command ./magnolia_control.sh start
launches Magnolia. The second part && tail -f ../logs/catalina.out
displays log messages written to /apache-tomcat/logs/catalina.out
log
file. This makes it easier to troubleshoot startup errors.
Magnolia reports startup information. If startup fails, look for the
reason in the report. In a successful startup the last line reads:
INFO: Server startup in 12345 ms
.
To stop Magnolia, type |
Windows
-
Open a command prompt and go to the Magnolia installation directory.
(To do this, typecd C:\Users\<username>\magnolia-x.y\apache-tomcat\bin
) -
Type
magnolia_control.bat start
and press ENTER.
Magnolia reports startup information in a new Tomcat window. If startup fails, look for the reason in the report. In a successful startup the last line reads:INFO: Server startup in 12345 ms
To stop Magnolia, type |
Linux
-
Open a terminal window.
-
Go to the Magnolia installation directory:
cd /home/<your account>/magnolia-x.y/apache-tomcat/bin
Your path may be different. -
Start Magnolia:
In bash shell:./magnolia_control.sh start && tail -f ../logs/catalina.out
In fish shell:./magnolia_control.sh start; tail -f ../logs/catalina.out
The first part of the startup command ./magnolia_control.sh start
launches Magnolia. The appended part tail -f ../logs/catalina.out
displays log messages written to /apache-tomcat/logs/catalina.out
log
file. This makes it easier to troubleshoot startup errors.
Magnolia reports startup information. If startup fails, look for the
reason in the report. In a successful startup the last line reads:
INFO: Server startup in 12345 ms
To stop Magnolia, type |
Solaris
-
Open a terminal window.
-
Go to the Magnolia installation directory:
cd /home/userAccount/magnolia-x.y/apache-tomcat/bin
Your path may be different. -
Start Magnolia:
./magnolia_control.sh start && tail -f ../logs/catalina.out
The first part of the startup command ./magnolia_control.sh start
launches Magnolia. The second part && tail -f ../logs/catalina.out
displays log messages written to /apache-tomcat/logs/catalina.out
log
file. This makes it easier to troubleshoot startup errors.
Magnolia reports startup information. If startup fails, look for the
reason in the report. In a successful startup the last line reads:
INFO: Server startup in 12345 ms
To stop Magnolia, type |
Web update
To install Magnolia:
-
Open a browser and go to
http://localhost:8080
. -
Click Run the Web update on the author instance, then Start installation.
-
Click Run the Web update on the public instance, then Start installation.
Magnolia installs its modules. When the installation is complete on the author and public instances, click Start up Magnolia on both.
Login
Go to http://localhost:8080/magnoliaAuthor
and sign in as:
-
Username:
superuser
-
Password:
superuser
Magnolia is ready to use and gives you a list of suggestions to get started.
A superuser is a system administrator account that has permissions to do everything. It is useful for testing.
|
Troubleshooting
Having problems? See Known issues for help.