IronPDF for Java on AWS Elastic Beanstalk
Déployer IronPDF for Java sur AWS Elastic Beanstalk avec l'image de base Amazon Linux 2023 nécessite une configuration supplémentaire. Amazon Linux 2023 est basé sur Fedora, donc les dépendances natives sur lesquelles IronPDF repose doivent être installées explicitement, et Tomcat a besoin de la permission pour exécuter le moteur. Vous configurez les deux via .ebextensions plutôt que d'installer directement IronPDF.
1. Accorder un accès à Tomcat pour le moteur
Ajoutez un fichier de configuration .ebextensions qui donne à Tomcat un accès complet au répertoire du moteur IronPDF :
01_grant_tomcat_root:
command: chmod -R 777 /usr/share/tomcat10/IronPdfEngine.2024.6.1.Linux.x64/
01_grant_tomcat_root:
command: chmod -R 777 /usr/share/tomcat10/IronPdfEngine.2024.6.1.Linux.x64/
2. Mettre à jour le Package Manager
Rafraîchissez dnf pour que les installations de dépendances récupèrent les versions actuelles :
02_update_dnf:
command: dnf update -y
02_update_dnf:
command: dnf update -y
3. Installer les dépendances natives
Le moteur de rendu d'IronPDF nécessite plusieurs bibliothèques système. Installez-les, puis rendez le sous-processus exécutable:
03_install_dependencies:
command: |
dnf -y install glibc-devel
dnf -y install nss
dnf -y install at-spi2-atk
dnf -y install libXcomposite
dnf -y install libXrandr
dnf -y install mesa-libgbm
dnf -y install alsa-lib
dnf -y install pango
dnf -y install cups-libs
dnf -y install libXdamage
dnf -y install libxshmfence
chmod 755 IronCefSubprocess
03_install_dependencies:
command: |
dnf -y install glibc-devel
dnf -y install nss
dnf -y install at-spi2-atk
dnf -y install libXcomposite
dnf -y install libXrandr
dnf -y install mesa-libgbm
dnf -y install alsa-lib
dnf -y install pango
dnf -y install cups-libs
dnf -y install libXdamage
dnf -y install libxshmfence
chmod 755 IronCefSubprocess
Avec le répertoire du moteur accessible en écriture, dnf à jour et ces bibliothèques présentes, IronPDF fonctionne sous Tomcat sur l'instance Elastic Beanstalk. Pour la liste complète des dépendances et d'autres cibles Linux, voir le guide de déploiement Linux d'IronPDF.


