linux下安裝軟體的shell學習

來源:互聯網
上載者:User

linux下安裝軟體的shell學習 每次重裝linux都是痛苦的,軟體安裝好麻煩啊!所以決定多多學習shell,把每次安裝軟體的步驟寫成shell指令碼,分享給大家。不定期更新。注意:指令碼中的檔案名稱是我下載的檔案名稱,各位視情況修改。[plain] #ubuntu下常用軟體安裝  #!/bin/sh    uid=$(id -u)  if [ "$uid" != "0" ]  then      echo 請以ROOT身份運行      exit 1  fi  #這是改變源的,視情況。  #perl -p -i -e "s/uuuuu/xjtuns.cn/g" /etc/apt/sources.list  #apt-get update  #apt-get install leksah ghc  #apt-get install ntfs-3g ntfs-config   apt-get install vim geany anjuta  nemiver  apt-get install chmsee gparted filezilla openfetion  #apt-get install chromium virtualbox wireshark  apt-get install build-essential  apt-get install ubuntu-restricted-extras  [plain] <span style="font-family: Arial, Helvetica, sans-serif;">#ubuntu下神器sublime安裝,包括快捷表徵圖。  #!/bin/sh  uid=$(id -u)  if [ "$uid" != "0" ]  then      echo 請以ROOT身份運行      exit 1  fi  mkdir ./sublime/  tar -jxvf ./S* -C ./sublime/  mv -f ./sublime/S* /opt/Sublime/  rm -rf ./sublime/  chmod 777 -f /opt/Sublime/  ln -s /opt/Sublime/sublime_text /usr/bin/sublime  touch sublime.desktop  echo "[Desktop Entry]" >> sublime.desktop  echo "Version=1.0" >> sublime.desktop  echo "Name=Sublime Text 2" >> sublime.desktop  echo "GenericName=Text Editor" >> sublime.desktop  echo "Exec=sublime" >> sublime.desktop  echo "Terminal=false" >> sublime.desktop  echo "Icon=/opt/Sublime/Icon/48x48/sublime_text.png" >> sublime.desktop  echo "Type=Application" >> sublime.desktop  echo "Categories=TextEditor;IDE;Development" >> sublime.desktop  echo "X-Ayatana-Desktop-Shortcuts=NewWindow" >> sublime.desktop  echo "[NewWindow Shortcut Group]" >> sublime.desktop  echo "Name=New Window" >> sublime.desktop  echo "Exec=sublime -n" >> sublime.desktop  echo "TargetEnvironment=Unity" >> sublime.desktop  chmod 644 ./sublime.desktop  mv sublime.desktop /usr/share/applications/  perl -p -i -e "s/gedit/sublime/g" /usr/share/applications/defaults.list  perl -p -i -e "s/gedit/sublime/g" /etc/gnome/defaults.list</span>  [plain] #ubuntu下eclipse安裝  #!/bin/sh  uid=$(id -u)  if [ "$uid" != "0" ]  then      echo 請以ROOT身份運行      exit 1  fi  tar -zxvf ./eclipse-* -C /opt/  chmod 777 -f /opt/eclipse/  chmod 777 -f /opt/eclipse/con*  ln -s /opt/eclipse/eclipse /usr/bin/eclipse  touch eclipse.desktop  echo "[Desktop Entry]" >> eclipse.desktop  echo "Version=1.0" >> eclipse.desktop  echo "Name=eclipse" >> eclipse.desktop  echo "GenericName=Text Editor" >> eclipse.desktop  echo "Exec=eclipse" >> eclipse.desktop  echo "Terminal=false" >> eclipse.desktop  echo "Icon=/opt/eclipse/icon.xpm" >> eclipse.desktop  echo "Type=Application" >> eclipse.desktop  echo "Categories=TextEditor;IDE;Development" >> eclipse.desktop  echo "X-Ayatana-Desktop-Shortcuts=NewWindow" >> eclipse.desktop  echo "[NewWindow Shortcut Group]" >> eclipse.desktop  echo "Name=New Window" >> eclipse.desktop  echo "TargetEnvironment=Unity" >> eclipse.desktop  chmod 644 ./eclipse.desktop  mv eclipse.desktop /usr/share/applications/  [plain] #jdk,jre的安裝  #!/bin/sh  #install java  uid=$(id -u)  if [ "$uid" != "0" ]  then      echo 請以ROOT身份運行      exit 1  fi  tar -zxvf ./jdk* -C ./java/  mv -f ./java/j* /opt/java/  rm -rf ./java/  chmod +777 -f /opt/java/  touch environment   echo "PATH=\"$PATH:${JAVA_HOME}\"" >> environment  echo "JAVA_HOME=/opt/java" >> environment  echo "CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib" >> environment  rm -rf /etc/environment  mv environment /etc/  chmod 644 /etc/environment  source /etc/environment  update-alternatives ——install /usr/bin/java java /opt/java/bin/java 300  update-alternatives ——install /usr/bin/javac javac /uopt/java/bin/javac 300  update-alternatives ——config java  [plain] #掛在vbox共用分區  #!/bin/sh  uid=$(id -u)  if [ "$uid" != "0" ]  then      echo 請以ROOT身份運行      exit 1  fi  mount -t vboxsf share ~/share   

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.