ubuntu14.04配置開發環境

ubuntu14.04配置開發環境

說明:python

  • 1.每次在虛擬機重裝ubuntu,都要從新配置一遍開發環境.略繁瑣,整理個配置文檔記錄以下.
  • 2.本文檔以ubuntu 14.04 爲基準,其餘版本可能略有差別.
  • 3.會同步更新,等比較完善後.考慮寫成shell腳本,自動化配置.

0. 初始化設置

0.1 桌面環境設置選項更改

bash1. 設置語言
2. 設置分辨率
3. 設置輸入法
4. 設置內存,磁盤,CPU等

0.2 更改root密碼

bash默認root密碼是隨機的,即每次開機,都有一個新的root密碼。

修改方式:
sudo passwd  # 提示輸入當前用戶密碼.enter後,提示咱們輸入新的密碼並確認,此密碼即爲root密碼.
su root      # 切換root用戶

1. 更改下載源

1.1 更改源列表

bash
1. 首先備份源列表(for sure): sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup 2. 然後用gedit或其餘編輯器打開: sudo gedit /etc/apt/sources.list

1.2 源列表內容

  • 1.2.1 阿里雲更新服務器(北京萬網/浙江杭州阿里雲服務器雙線接入)
bash
deb http://mirrors.aliyun.com/ubuntu/ utopic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ utopic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ utopic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ utopic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ utopic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ utopic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ utopic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ utopic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ utopic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ utopic-backports main restricted universe multiverse
  • 1.2.2 網易163更新服務器(廣東廣州電信/聯通千兆雙線接入)
bash
deb http://mirrors.163.com/ubuntu/ utopic main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ utopic-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ utopic-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ utopic-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ utopic-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ utopic main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ utopic-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ utopic-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ utopic-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ utopic-backports main restricted universe multiverse

2. 安裝經常使用軟件

2.1 安裝deb包

2.2 apt-get安裝

bash
sudo apt-get update sudo apt-get install vim sudo apt-get install zsh sudo apt-get install git sudo apt-get install curl sudo apt-get install python-pip sudo apt-get install apache2-utils # 安裝併發測試工具 ab

2.3 刪除unity,安裝Mate桌面程序(Gnome x2分支)

bash
1. 刪除unity(能夠不刪除,只執行安裝步驟) sudo apt-get remove unity unity-asset-pool unity-control-center unity-control-center-signon unity-gtk-module-common unity-lens* unity-services unity-settings-daemon unity-webapps* unity-voice-service 2. 安裝Mate sudo apt-get update sudo apt-get install mate-desktop-environment-core 3. 安裝Mate插件 sudo apt-get install mate-desktop-environment-extra # 安裝插件 4. 安裝結束後,"註銷"系統,在登陸窗口,注意"選擇登陸GUI",選擇mate,輸入密碼登陸便可切換.

3. 配置開發環境

3.1配置python開發環境

bash
sudo pip install flask sudo pip install tornado

4. 查看並kill進程

bashps -e                # 查看全部進程
pgrep  firefox       # 查看僵死進程ID

sudo kill PID         # 殺死進程
sudo kill APP_NAME    # 採用軟件名稱,殺死
sudo kill -9 PID      # 強力殺死



ps  參數:                                         
    -aux      以BSD風格顯示進程 經常使用
    -efH      以System V風格顯示進程
    -e , -A   顯示全部進程
    a         顯示終端上全部用戶的進程
    x         顯示無終端進程
    u         顯示詳細信息
    f         樹狀顯示
    w         完整顯示信息
    l         顯示長列表
相關文章
相關標籤/搜索