在CentOS上配置Postman可以通過以下步驟完成:
tar -xzf Postman-linux-x64-*.tar.gz -C /opt
請注意將“Postman-linux-x64-*.tar.gz”替換為您下載的實際文件名,并將“/opt”替換為您要安裝Postman的目標目錄。
sudo ln -s /opt/Postman/Postman /usr/bin/postman
請注意將“/opt/Postman/Postman”替換為實際的Postman可執行文件路徑。
export PATH=$PATH:/path/to/postman/folder
請確保將 /path/to/postman/folder
替換為您實際保存Postman文件夾的路徑。
sudo touch /usr/share/applications/postman.desktop
sudo vim /usr/share/applications/postman.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Postman
GenericName=Api Tools
Comment=Postman
Exec=/usr/bin/postman
Terminal=false
MimeType=text/plain
Icon=/usr/local/postman/app/resources/app/assets/icon.png
Categories=Development;
StartupNotify=true
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
Exec=/usr/bin/postman -n
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
通過以上步驟,您可以在CentOS上成功配置并啟動Postman。