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         显示长列表