建立virtualbox + ubuntu server環境< 二 >

事隔一年,漸漸移到linux下做開發,當前ubuntu使用的是ubuntukylin-14.04-desktop-amd64.iso.因爲是桌面版,提醒大家分配磁盤時,儘量分配大一些。

內容:

  安裝增強功能

  介紹文件夾共享

  安裝java8, mysql, redis

  安裝eclipse


安裝增強功能《VBoxGuestAdditions.iso》

  爲了能在guest和host自由的複製,guest的窗口能自由放大縮小。

  1.關閉系統,在storage裏IDE掛上VBoxGuestAdditions.iso,一般在virtualbox的安裝路徑裏。

  2.重啓系統,cd /media/ 在子目錄裏找到VBOXADDITIONS_XXX, 運行:
   sudo sh VBoxLinuxAdditions.run
  3.完成後重啓系統


與windows共享文件夾

  1.以mount的形式共享    

    step1:關閉系統,右健實例->Settings->Options->Shared Folders,選擇需要共享的文件。

        例如完成後創建了一個Name爲vm_shared, Path爲F:\vm_shared的項

     step2:開啓系統,執行命令:    

    mkdir -p /mnt/shared
    mount -t vboxsf vm_shared /mnt/shared

  2.安裝samba

    sudo apt-get install samba
    之後像操作windows一樣設置一個共享文件夾就行了。


安裝java,mysql,redis

  只需執行以下命令:

    #JAVA
    sudo apt-get install software-properties-common python-software-properties
    sudo apt-get purge openjdk*
    
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java8-installer
    sudo apt-get install oracle-java8-set-default
    
    #MYSQL
    sudo apt-get install mysql-server
    
    #NGINX
    sudo apt-get install nginx
    
    #REGIS
    sudo apt-get install redis-server
    
    
安裝eclipse

                step1.下載 Eclipse 最新版http://www.eclipse.org/downloads/?osType=linux&release=undefined

                step2.解壓 Eclipse: cd /opt/ && sudo tar -zxvf ~/下載/eclipse-*.tar.gz

                step3.創建 Eclipse 快捷方式

                    sudo gedit /usr/share/applications/eclipse.desktop

                    粘貼並保存如下內容

                [Desktop Entry]                    

    Encoding=UTF-8

    Name=Eclipse 4

    Type=Application

    Exec=/opt/eclipse_luna/eclipse

    Terminal=false

    Icon=/opt/eclipse_luna/icon.xpm

    Comment=Integrated Development Environment

    StartupNotify=true

    NoDisplay=false

    Categories=Development;IDE;

    Name[en]=Eclipse

    Exec=env UBUNTU_MENUPROXY= /opt/eclipse_luna/eclipse


    step4:最後,不要忘記安裝m2e插件

    http://stackoverflow.com/questions/7111483/installing-apache-maven-plugin-for-eclipse


    step5 elipse字體

    選擇Window->Preferences. 在彈出的對話框中選擇General->Appearance->Colors and Fonts 在右邊的對話框中選擇中java下的 Java Editor Text Font ,然後點擊Change按鈕,在彈出的字體選擇框中選擇DejaVu Sans Mono字體。


安裝maven環境

        step 1: sudo apt-get install maven


遠端用root賬號ssh登陸

sudo vim /etc/ssh/sshd_config

註釋行

#PermitRootLogin without-password

添加

PermitRootLogin yes

sudo service ssh restart



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章