1、以用户身份登录jiangshan 并建立/home/jiangshan/pycharm文件夹
2、下载 pycharm-community-anaconda-2019.1.3.tar.gz 放置在/home/jiangshan/pycharm/下
3、解压 tar -zxvf pycharm-community-anaconda-2019.1.3.tar.gz
4、进入 /home/jiangshan/pycharm/pycharm-community-anaconda-2019.1.3/bin/
5、安装 ./pycharm.sh
[有的人可能会出错Startup Error: Unable to detect graphics environment,解决办法超级用户下:systemctl set-default graphical.target,然后重启shutdown -r now]
6、给pycharm.sh加入应用程序列表,并创建快捷方式
vim /usr/share/applications/pycharm.desktop
编辑如下:
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Name=pycharm
Comment=pycharm-community
Exec=/home/jiangshan/pycharm/pycharm-community-anaconda-2019.1.3/bin/pycharm.sh
Icon=/home/jiangshan/pycharm/pycharm-community-anaconda-2019.1.3/bin/pycharm.png
Terminal=false
StartupNotify=true
Type=Application
Categories=Application;
7、chmod a+x /usr/share/applications/pycharm.desktop
8、进入/usr/share/applications
cd /usr/share/applications/
9、将应用程序列表找到pycharm并发送到桌面
右键pycharm.desktop送到桌面
PS:添加环境变量如下
[jiangshan@localhost ~]$ sudo vim /etc/profile
在文件内容最后,加:
export PATH=$PATH:/home/jiangshan/pycharm/pycharm-community-anaconda-2019.1.3/bin
$PATH 表示所有以前的环境变量,:号后路径为新增变量