zoukankan      html  css  js  c++  java
  • RedHat下安装idea并创建桌面快捷方式

    首先以root用户的身份登录到主页
    我们可以通过共享文件夹或者其它的方式将下载好的tar.gz文件共享到Linux目录下

    输入如下命令进行解压

    tar zxvf ideaIU-2020.3.3.tar.gz -C ../../../opt/software/

    tar命令参数:
    -c :create 建立压缩档案的参数;
    -x : 解压缩压缩档案的参数;
    -z : 是否需要用gzip压缩;
    -v: 压缩的过程中显示档案;
    -f: 置顶文档名,在f后面立即接文件名,不能再加参数

    其中 tar zxvf 是命令 ideaIU-2020.3.3.tar.gz是你要解压的文件名,-C后面是你想要解压到的位置,我选择解压到了根目录下opt下的software中,可以根据自己的需要执行创建

    在安装完毕后,我们进入到其bin目录下

    只需要执行./idea.sh即可运行idea
    第一次运行会弹出同意用户协议之类的东西,选择接受即可

    这样我们就可以使用了,接下来是创建快捷方式

    在桌面创建一个文件

    输入以下内容

    [Desktop Entry]
    Name=IntelliJ IDEA
    Comment=IntelliJ IDEA
    Exec=/opt/idea/idea-IU-182.3684.101/bin/idea.sh  //你安装的文件地址下的idea.sh
    Icon=/opt/idea/idea-IU-182.3684.101/bin/idea.png //你安装的文件地址下的idea.png
    Terminal=false
    Type=Application
    Categories=Developer;   
    

    这里不要急着去尝试,可以先往下看

    esc+:wq
    在修改后赋予权限
    sudo chmod +x idea.desktop
    但打开时仍然出现问题

    键入命令,查看系统提示

    desktop-file-validate idea.desktop

    idea.desktop: warning: value "IntelliJ IDEA" for key "Comment" in group "Desktop Entry" looks redundant with value "IntelliJ IDEA" of key "Name"
    idea.desktop: error: value "Developer;" for key "Categories" in group "Desktop Entry" contains an unregistered value "Developer"; values extending the format should start with "X-"
    idea.desktop: hint: value "Developer;" for key "Categories" in group "Desktop Entry" does not contain a registered main category; application might only show up in a "catch-all" section of the application menu
    
    

    修改为如下

    [Desktop Entry]
    Name=IntelliJ IDEA
    Comment=IntelliJ IDEA
    Exec=/opt/software/idea-IU-203.7717.32/bin/idea.sh
    Icon=/opt/software/idea-IU-203.7717.32/bin/idea.png
    Terminal=false
    Type=Application
    Categories=X-Application;
    

    选择信任该文件

    之后就可以启动啦

  • 相关阅读:
    ThinkPHP5.0更改框架的验证方法:对象->validate(true)->save();
    ThinkPHP5.0版本和ThinkPHP3.2版本的区别
    ThinkPHP5.0版本的优势在于:
    11: django-haystack+jieba+whoosh实现全文检索
    10: supervisor进程管理工具
    09: redis集群之sentinel
    08: python支付宝支付
    07: redis分布式锁解决超卖问题
    06:keepalive高可用集群(新)
    05: 使用docker部署nginx负载均衡
  • 原文地址:https://www.cnblogs.com/yeyueweiliang/p/14633103.html
Copyright © 2011-2022 走看看