在 CentOS 上远程使用 PHPStorm(JetBrains IDE),常见有 三种方式,按使用场景选:
适合:代码在 CentOS 上,本地 Windows / macOS 用 PHPStorm 编辑
# 安装(一般已装)
yum install -y openssh-server
# 启动
systemctl start sshd
systemctl enable sshd
# 确认端口
firewall-cmd --add-service=ssh --permanent
firewall-cmd --reload
File → Settings → PHP → CLI Interpreter+ → From Docker / SSHTools → Deployment → Configuration/var/www/html/xxx✅ 可自动上传 / 下载
适合:无本地电脑,服务器带桌面
yum groupinstall "GNOME Desktop"
# 下载
wget https://download.jetbrains.com/webide/PhpStorm-2023.3.tar.gz
tar -xzf PhpStorm-*.tar.gz
cd PhpStorm-*/bin
./phpstorm.sh
⚠️ 服务器资源占用高,一般不用
适合:必须图形界面
yum install -y epel-release
yum install -y xrdp
systemctl start xrdp
✅ SSH + Deployment(最稳定、最专业)
如果你愿意,可以告诉我:
我可以给你 一步步截图级配置。