How to setup AEM in Linux system.
If you want to set up AEM on your local Linux machine, you need to do some steps . I hope you are a beginner and you did not have any dependencies for setup. AEM required Java and Maven setup. So I will explain that also.
Step 1. Install java
That is for Linux systems. Open terminal and run below cmd
sudo apt update sudo apt install default-jre java -version sudo apt install default-jdk
Set path of Java: Please run the below command for setup of the Java path in Linux.
sudo update-alternatives --config java sudo nano /etc/environment Paste below at the end JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64" source /etc/environment echo $JAVA_HOME
Output :- /usr/lib/jvm/java-11-openjdk-amd64
Step 2. Setup maven
Maven is a build automation and project management tool, widely used in Java development, that automates tasks like compiling, testing, and packaging Java projects
sudo apt-get install maven sudo gedit /etc/profile
Paste at the end of the file.
M2_HOME="/usr/share/maven" export M2_HOME export PATH=$PATH:$M2_HOME/bin
Run below cmd to verify it installed.
source /etc/profile
echo $M2_HOME
Verify the output should be /usr/share/maven
Srep 3. AEM Set Up
Create a folder AEM and create two folders in the AEM folder :- publish and author
Extract the SDK zip file and paste the jar file in both folder
Change the name of the file as below:
aem-author-p4502.jar aem-publish-p4503.jar
Give the permission to the folder
Launch AEM with below command
java -jar aem-publish-p4503.jar (For Publish)
java -jar aem-author-p4502.jar (For Author)
$ cd ~/aem-sdk/author $ java -jar aem-author-p4502.jar $ cd ~/aem-sdk/publish $ java -jar aem-publish-p4503.jar
Url will open auto:
user and pass: admin/admin
http://localhost:4502/
Step 4. Project Set up
Clone Git repo (cloud git repo)
git clone https://github.com/adobe/aem-guides-wknd.git
Open terminal in project folder. Run the command :
mvn clean install -PautoInstallSinglePackage
Result:
