Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOw TO DEPLOY ON UBUNTU SERVER #2407

Open
1 task done
AftabUfaq opened this issue Dec 6, 2024 · 3 comments
Open
1 task done

HOw TO DEPLOY ON UBUNTU SERVER #2407

AftabUfaq opened this issue Dec 6, 2024 · 3 comments
Labels
Documentation Improvements or additions to documentation enhancement New feature or request

Comments

@AftabUfaq
Copy link

Feature Description

HOw TO DEPLOY ON UBUNTU SERVER

Why is this feature valuable?

HOw TO DEPLOY ON UBUNTU SERVER

Suggested Implementation

HOw TO DEPLOY ON UBUNTU SERVER

Additional Information

HOw TO DEPLOY ON UBUNTU SERVER

No Duplicate of the Feature

  • I have verified that there are no existing features requests similar to my request.
@AftabUfaq AftabUfaq added the enhancement New feature or request label Dec 6, 2024
Copy link

dosubot bot commented Dec 6, 2024

Hey there, @AftabUfaq! 👋 I'm here to help you with your deployment question. I'm a bot designed to assist with bug fixes, answer questions, and guide you on your open source journey while you wait for a human maintainer.

To deploy Stirling-PDF on an Ubuntu server, follow these steps:

  1. Install Prerequisites: Update your package list and install necessary software:

    sudo apt-get update
    sudo apt-get install -y git automake autoconf libtool libleptonica-dev pkg-config zlib1g-dev make g++ openjdk-21-jdk python3 python3-pip
  2. Clone and Build jbig2enc: This is required for certain OCR functionalities.

    mkdir ~/.git
    cd ~/.git &&\
    git clone https://github.com/agl/jbig2enc.git &&\
    cd jbig2enc &&\
    ./autogen.sh &&\
    ./configure &&\
    make &&\
    sudo make install
  3. Install Additional Software: Install LibreOffice, OCR tools, and OpenCV.

    sudo apt-get install -y libreoffice-writer libreoffice-calc libreoffice-impress unpaper ocrmypdf
    pip3 install uno opencv-python-headless unoconv pngquant WeasyPrint --break-system-packages
  4. Clone and Build Stirling-PDF:

    cd ~/.git &&\
    git clone https://github.com/Stirling-Tools/Stirling-PDF.git &&\
    cd Stirling-PDF &&\
    chmod +x ./gradlew &&\
    ./gradlew build
  5. Move the JAR File: Move the built JAR file to your desired location.

    sudo mkdir /opt/Stirling-PDF &&\
    sudo mv ./build/libs/Stirling-PDF-*.jar /opt/Stirling-PDF/ &&\
    sudo mv scripts /opt/Stirling-PDF/ &&\
    echo "Scripts installed."
  6. Run Stirling-PDF:

    ./gradlew bootRun
    or
    java -jar /opt/Stirling-PDF/Stirling-PDF-*.jar

Make sure to set the DBUS_SESSION_BUS_ADDRESS environment variable to avoid permission issues with LibreOffice:

mkdir temp
export DBUS_SESSION_BUS_ADDRESS="unix:path=./temp"

For more detailed instructions, you can refer to the Stirling-PDF documentation [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the Documentation Improvements or additions to documentation label Dec 6, 2024
@AftabUfaq
Copy link
Author

@dosu i have a whm server in whihc i have domain ww.myown.domain.com . so how can i deploy it there

Copy link

dosubot bot commented Dec 6, 2024

To deploy Stirling-PDF on a WHM/cPanel server, you will need to ensure that the server supports Java applications, as Stirling-PDF is a Java-based application. Here are some general steps you can follow:

  1. Ensure Java is Installed: Make sure your WHM/cPanel server has Java installed. You might need to install it manually if it's not available.

  2. Upload Stirling-PDF: Use the cPanel File Manager or an FTP client to upload the Stirling-PDF JAR file to your server.

  3. Configure the Application: You may need to configure the application to run on your server. This could involve setting environment variables or modifying configuration files.

  4. Open Required Ports: Ensure that port 8080 is open on your server, as Stirling-PDF uses this port by default [1].

  5. Run the Application: You can run the application using a command like:

    java -jar /path/to/Stirling-PDF.jar

    You might need to set up a script to run this command automatically on server startup.

  6. Configure Domain: In WHM/cPanel, set up your domain (e.g., ww.myown.domain.com) to point to the server where Stirling-PDF is running. This typically involves setting up DNS records and configuring the web server to proxy requests to the application.

These steps are quite general, and the exact process may vary depending on your server's configuration and the specific requirements of Stirling-PDF. If you encounter specific issues, you may need to consult the server's documentation or seek assistance from a server administrator.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant