Friends in need can also refer to this official tutorial: https://support.wolfram.com/46072
First download the Wolfram engine from the Mathematica official website to the Mac local. If you use curl to download directly on the server, it may always fail due to the external network, and you can only save the country by curve. Then upload the Wolfram engine to cloud server through the scp tool (for uploading files from the local to the cloud server, please refer to the document center https://cloud.tencent.com/document/product/213/39138)
scp /Users/username/Downloads/WolframEngine_12.0.1_LINUX.sh [email protected]:/home/ubuntu
After entering the password, you can upload the locally downloaded installation package to Tencent Cloud
Then SSH into the server, run the .sh file according to the installation path
ssh [email protected] #execute in terminal
sudo bath /home/ubuntu/WolframEngine_12.0.1_LINUX.sh #Execute in ssh
Or use
sudo ./home/ubuntu/WolframEngine_12.0.1_LINUX.sh
Use bath directly
bath /home/ubuntu/WolframEngine_12.0.1_LINUX.sh
During the installation, an error will be reported asking for root privileges
After successfully entering the installation interface, the installation package requires us to select the installation path and script path
We choose the default path, script is installed in /usr/local/bin, the main body of the program is installed in /usr/local/Wolfram/WolframEngine/12.0 and then Wolfram script is added to the shell
export PATH=/usr/local/bin:$PATH
Wolframscript can now be called, but it doesn’t seem to find where the kernel is
First, we find the location of the kernel in the installation path, and then manually set it according to the prompt
export WolframKernel=/usr/local/Wolfram/WolframEngine/12.0/Executables/WolframKernel
This way wolframscript will work
After activating the Wolfram Engine license of the account on the Wolfram official website (https://www.wolfram.com/engine/free-download-thank-you/), come back and enter the mathID account and password to use.
To run Mathematica Engine on Tencent Cloud, we need to prepare the wolframscript executable .wl file (https://reference.wolfram.com/language/ref/program/wolframscript.html) in advance, and then upload it to the server for execution.
wolframscript -file Hello_world.wl
When running a more complicated program on the server, I often wonder if my program is running. I usually go to the Tencent Cloud controller to check the monitoring to determine whether the program is running. This function is still very comfortable.
Recommended Posts