linux下python工作環境配置

來源:互聯網
上載者:User

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

相關文章

聯繫我們

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