在ubuntu 13.10 搭建python开发环境详解:
步骤一 安装jdk(为了安装eclipse ide)
解压缩安装包,并设置jdk。
update-alternatives –install选项的功能就是增加一组新的系统命令链接符。
tar -zxvf jdk-7u45-linux-x64.tar.gzsudo mkdir -p /usr/lib/jvmsudo mv ./jdk1.7.0_45 /usr/lib/jvm/jdk1.7.0sudo update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jdk1.7.0/bin/java” 1sudo update-alternatives –install “/usr/bin/javac” “javac” “/usr/lib/jvm/jdk1.7.0/bin/javac” 1sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/lib/jvm/jdk1.7.0/bin/javaws” 1
用update-alternatives –config命令,在现有的命令链接符中选择一个作为系统默认。
sudo update-alternatives –config javasudo update-alternatives –config javac
比如,如果安装了多个jdk,就可以选择一个作为默认的:
$sudo update-alternatives –config javathere are 3 choices for the alternative java (providing /usr/bin/java).
selection path priority status————————————————————* 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode3 /usr/lib/jvm/jdk1.7.0/jre/bin/java 3 manual mode
press enter to keep the current choice[*], or type selection number: 3update-alternatives: using /usr/lib/jvm/jdk1.7.0/jre/bin/java to provide /usr/bin/java (java) in manual mode.
设置执行权限:
sudo chmod a+x /usr/bin/java sudo chmod a+x /usr/bin/javac sudo chmod a+x /usr/bin/javawssudo chown -r root:root /usr/lib/jvm/jdk1.7.0
如果要安装firefox plugin
mkdir ~/.mozilla/pluginsln -s /usr/lib/jvm/jdk1.7.0/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/sudo /etc/init.d/apparmor restart
检查java安装是否成功
java -version
推荐阅读:
《python开发技术详解》.( 周伟,宗杰).[高清pdf扫描版+随书视频+代码] http://www.linuxidc.com/linux/2013-11/92693.htm
python脚本获取linux系统信息 http://www.linuxidc.com/linux/2013-08/88531.htm
ubuntu 12.04下用eclipse搭建python集成开发环境 http://www.linuxidc.com/linux/2012-06/61649.htm
python 的详细介绍:请点这里python 的下载地址:请点这里