linux下python工作环境配置

1 安装ubuntu10.10

2 软件中心搜索gnome 在搜索结果中安装gnome shell

3 注消用户登录,返回登录屏幕,在齿轮上点击选择gnome classic 切换到经典界面

4 安装oracle-java

Oracle's Java 6 and 7.

Ubuntu 11.10 does not offer Oracle's Java because OpenJDK can now replace it.

However you can install Oracle's Java 6.2 from this PPA (Private Package Archive).
Please see ppa:ferramroberto/java...

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-cache search sun-java6
sudo apt-get install --reinstall sun-java6-jre sun-java6-plugin sun-java6-fonts

Then set java-6-sun as default. Choose java-6-sun/jre/ from the list. This step is important:
sudo update-alternatives --config java

This command does it directly without asking:
sudo update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java

5 复制aptana到主目录,解压(直接使用不需要安装)

6 安装SVN sudo apt-get install subversion

7 从SVN获取项目代码

$ cd ~

$ mkdir workspace

$ cd workspace

$ svn co http://...

8 打开aptana,导入项目

9 下载webpy(http://webpy.org)

  python setup.py install

10 下载apache2

  sudo apt-get install apache2

 11 配置apache和webpy

  sudo apt-get install libapache2-mod-wsgi

  修改/etc/apache2/sites-enabled/000-default

<VirtualHost *:80>

WSGIScriptAlias / /home/shujunli/workspace/hp2/code.py/
AddType text/html .py
Alias /static /home/shujunli/workspace/hp2/static/
Alias /html /home/shujunli/workspace/hp2/html/
Alias /css /home/shujunli/workspace/hp2/css/
Alias /js /home/shujunli/workspace/hp2/js/
Alias /images /home/shujunli/workspace/hp2/images/

ErrorLog /tmp/error.log
LogLevel warn
CustomLog /tmp/access.log combined
</VirtualHost>

12 安装MySqlDb

sudo apt-get install python-mysqldb

13安装mysql

sudo apt-get install mysql-server

你可能感兴趣的:(python)