Linux configure for java web develop

來源:互聯網
上載者:User

標籤:分區   develop   ubuntu   mysql   

安裝ubuntu需要設定檔和安裝許多軟體,因為自己對ubuntu沒有深入的瞭解,出了一些問題就會重裝系統。多裝幾次後總結了一些常用的配置和踩過的坑:

資料分割配置
/boot     boot分區,引導系統程式所需要的檔案,安裝多個作業系統時用來引導/         根分區/usr      系統使用者工具和程式/home     使用者目錄swap分區   大小約等於記憶體的大小,相當於win下的虛擬記憶體
更改root許可權密碼

剛安裝好的ubuntu root許可權密碼需要啟用

sudo passwd
更新軟體源

設定–>軟體和更新–>更改伺服器,取消掉下載源碼選項會節省很多時間。

 sudo apt-get update sudo apt-get upgrade
刪除不必要的軟體

亞馬遜等封裝在ubuntu的軟體對我們沒用,在軟體中新刪除

安裝搜狗拼音

檢查是否安裝fcitxbssh

sudo apt-get install fcitx libsshdpkg -l|grep fcitxdpkg -l|grep libssh

去搜狗IME官網下載安裝,重啟之後生效

配置java
  • 下載jdk
  • 配置環境變數
sudo vim /etc/profileaddexport JAVA_HOME=your jdk direxport CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/libexport PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATHEXITsource /etc/profile
  • /etc/environment與/etc/profile的區別
    /etc/environment針對的時整個系統的設定,而/etc/profile針對/home目錄下的使用者
    如果以上兩個檔案的配置相同,會在使用者的案頭環境中顯示/etc/profile中的配置
安裝GIT

git官網
git協助

$ git help <verb>$ git <verb> --help$ man git-<verb>e.g.git help config
ssh

ssh與git和github相關的配置
公開金鑰和私密金鑰

ssh-keygen -t rsa -C "your email"cd ~/.ssh將id_rsa.pub中的內容複寫到github中測試ssh -T [email protected].com
install mysql

ubuntu內建的包版本和社區維護的版本有區別,一般官方社區維護的版本要比ubuntu團隊的版本更新快,所以我們安裝社區的版本

  1. 下載.deb檔案,注意選擇版本
  2. Adding the MySQL APT Repository
    1. sudo dpkg -i mysql-apt-config_w.x.y-zubuntu14.04_all.deb
    2. During the installation of the package, you will be asked to choose the versions of the MySQL server and other components (for example, the MySQL Workbench) that you want to install. If you are not sure which version to choose, do not change the default options selected for you. You can also choose none if you do not want a particular component to be installed. After making the choices for all components, choose Apply to finish the configuration and installation of the release package.
    3. 可以重新設定選擇的軟體包sudo dpkg-reconfigure mysql-apt-config
  3. sudo apt-get update(更新軟體列表)點我查看更新了那些軟體包
  4. sudo apt-get install package-name
  5. 安裝 sudo apt-get install mysql-server
Starting and Stopping the MySQL Server

shell> sudo service mysql status

Stop the MySQL server with the following command:
shell> sudo service mysql stop

To restart the MySQL server, use the following command:
shell> sudo service mysql start

參考

  • mysql官方安裝指南

以上是多次安裝配置linux總結的經驗。

Linux configure for java web develop

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.