【2】开发环境的搭建,Ubuntu14.04

这里使用的是Ubuntu14.04 Unity

更新源

首先,将更新源更换为国内更新源,我这里使用的是网易的更新源

sudo gedit /etc/apt/sources.list
 deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

更新源

sudo apt-get update

更新已安装的包

sudo apt-get upgrade

安装谷歌浏览器(默认是火狐浏览器):

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb 

出现安装错误的话,执行

sudo apt-get -f install

再继续上一步的安装

安装Monaco字体(字体自行下载)

$sudo cp Monaco_Linux.ttf /usr/share/fonts/truetype/  

$sudo fc-cache -f -v  

安装Sublime Text 3

添加sublime text 3的仓库:

sudo add-apt-repository ppa:webupd8team/sublime-text-
sudo apt-get update
sudo apt-get install sublime-text-installer

配置:http://www.cnblogs.com/waising/articles/3466120.html

我安装的有 JEDI/AotuPEP8/Theme-Soda

个人配置文件:http://www.cnblogs.com/jakeyChen/p/4755751.html

安装图标

sudo add-apt-repository ppa:numix/ppa
sudo apt-get update
sudo apt-get install numix-icon-theme-circle

Python包的安装

首先安装pip:

sudo apt-get install python-pip

安装Tornado

sudo pip install tornado

(目前我pip安装的版本为:

Downloading/unpacking tornado
Downloading tornado-4.2.1.tar.gz (434kB): 434kB downloaded

)

安装torndb

sudo pip install torndb

(torndb依赖

import MySQLdb.constants
ImportError: No module named MySQLdb.constants

)

sudo apt-get install python-mysqldb

安装yaml

sudo pip install pyyaml

安装Mysql5.5

sudo apt-get install mysql-server-5.6

安装过程中会让你设置root的密码,设置即可(创建新的database:blog,创建新的用户:jakey,赋予新用户对blog的所有权限)

 jakeychen@JakeyPC:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 45
Server version: 5.6.19-0ubuntu0.14.04.4 (Ubuntu) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database blog;
Query OK, 1 row affected (0.00 sec) mysql> create user jakey IDENTIFIED by '';
Query OK, 0 rows affected (0.00 sec) mysql> GRANT ALL ON blog.* TO jakey IDENTIFIED BY '';
Query OK, 0 rows affected (0.00 sec) mysql>

安装supervisor

sudo apt-get install supervisor

安装nginx

sudo apt-get install nginx
上一篇:Zero Copy I: User-Mode Perspective


下一篇:spring 入门级程序示例