-
Notifications
You must be signed in to change notification settings - Fork 2
Installing PostgreSQL Explain Graph
Java must be installed.
Installing on Windows
Installing on Linux
Installing on Mac
Make sure you have a Java Runtime Environment installed, at least version 8. To see what version of Java you have installed, open a command prompt, and enter this command:
java -version
# or for older versions: java --version
Create a new directory on your machine. Suggestion #1:
cd c:\Users\%USERNAME%\Desktop
mkdir "PostgreSQL Explain Graph BETA"
Suggestion #2:
cd %USERPROFILE%\Desktop
mkdir "PostgreSQL Explain Graph BETA"
Don't create the file in a directory you don't have write access to. The Java application has to create a sqlite file for it to work.
Download the peg-*.jar.zip file from the project homepage.
Unzip the file in the directory you created.
Double-click the file to launch it.
If it doesn't launch, create a batch file:
rem BEGIN peg.bat
c:
cd \Users\%USERNAME%\Desktop\"PostgreSQL Explain Graph BETA"
rem -OR- cd %USERPROFILE%\Desktop\"PostgreSQL Explain Graph BETA"
java -jar peg.jar
rem END peg.bat
Double-click peg.bat
to launch the application.
Make sure you have a Java Runtime Environment installed, at least version 8. Enter this command to install Java:
sudo apt install default-jdk
To see what version of Java you have installed, open a terminal, and enter this command:
java --version
If you're using Ubuntu, copy / paste these commands to automate creating a directory, downloading PEG, and creating a shell script to launch PEG:
cd ~/Desktop
mkdir "PostgreSQL Explain Graph BETA"
cd ~/Desktop/Post*
curl -L https://github.com/wmeitzen/postgresql-explain-graph/blob/master/peg-latest.jar.zip?raw=true --output peg.jar.zip
unzip -o peg.jar.zip
cat > peg.sh << "EOF"
# BEGIN peg.sh
cd ~/Desktop/"PostgreSQL Explain Graph BETA"
java -jar peg.jar
# END peg.sh
EOF
cd ~/Desktop/"PostgreSQL Explain Graph BETA"
chmod +x peg.sh
echo To launch PostgreSQL Explain Graph, enter \"./peg.sh\"
You can also follow these steps manually.
Create a new directory on your machine. Suggestion:
cd ~/Desktop
mkdir "PostgreSQL Explain Graph BETA"
Don't create the file in a directory you don't have write access to. The Java application has to create a sqlite file for it to work.
Download the peg-*.jar.zip file from the project homepage, or enter this command to download it directly:
cd ~/Desktop/Post*
curl -L https://github.com/wmeitzen/postgresql-explain-graph/blob/master/peg-latest.jar.zip?raw=true --output peg.jar.zip
Copy the file to the directory you created.
Decompress the file into the directory you created.
Open a terminal, and change to the directory you created.
cd ~/Desktop/"PostgreSQL Explain Graph BETA"
Create a shell file to execute the .JAR file.
# BEGIN peg.sh
cd ~/Desktop/"PostgreSQL Explain Graph BETA"
java -jar peg.jar
# END peg.sh
After creating peg.sh
, enable permissions to execute it:
cd ~/Desktop/"PostgreSQL Explain Graph BETA"
chmod +x peg.sh
Enter the command ./peg.sh
to launch the application.
Make sure you have a Java Runtime Environment installed, at least version 8. To see what version of Java you have installed, open Terminal, and enter this command:
java --version
Create a new directory on your machine.
Don't create the file in a directory you don't have write access to. The Java application has to create a sqlite file for it to work.
Suggestion:
cd ~/Desktop
mkdir "PostgreSQL Explain Graph BETA"
Download the peg-*.jar.zip file from the project homepage.
Copy the file to the directory you created.
Decompress the file into the directory you created.
Open a terminal, and change to the directory you created.
cd ~/Desktop/"PostgreSQL Explain Graph BETA"
Create a shell file to execute the .JAR file.
# BEGIN peg.sh
cd ~/Desktop/"PostgreSQL Explain Graph BETA"
java -jar peg.jar
# END peg.sh
After creating peg.sh
, enable permissions to execute it:
cd ~/Desktop/"PostgreSQL Explain Graph BETA"
chmod +x peg.sh
Double-click peg.sh
or enter the command ./peg.sh
to launch the application.