码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS下的开发环境配置

时间:2014-06-03 06:47:31      阅读:201      评论:0      收藏:0      [点我收藏+]

标签:c   style   class   java   a   tar   

软件的安装路径可安装在/usr、/usr/local或/opt,安装完毕后可在/usr下建立软链接,或者配置BASH的PATH
建议开发环境安装在/opt/software,在~/.bash_profile中配置PATH

  • 中文输入法

若不存在system->preference->input method
则yum install ibus ibus-pinyin

  • Python

(1)下载源码

wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz

(2)编译,并安装

./configure --prefix=/opt/Python/python2.7.6
make && make install

(3)设置环境变量

mv /usr/bin/python /usr/bin/python2.6.6
export PYTHON_HOME=/opt/Python/python2.7.6
export PATH=$PATH:$PYTHON_HOME/bin

Linux下有大量与Python相关的软件,建议建立软链接
ln -s /opt/Python/python2.7.7/bin/python /usr/bin/python
vi /usr/bin/yum

(4)安装Pip,可选

wget http://pypi.python.org/packages/source/p/pip/pip-0.7.2.tar.gz
tar -xzf pip-0.7.2.tar.gz
cd pip-0.7.2
python setup.py install
包(.py文件)安装路径:/usr/local/lib/python2.7/dist-packages

(5)安装Numpy,Scipy

yum install lapack lapack-devel blas blas-devel
pip install numpy
pip install scipy

  • Node

wget http://nodejs.org/dist/node-v0.10.12.tar.gz
./configure --prefix=/opt/Node
make && make install

export NODE_HOME=/opt/Node
export PATH=$PATH:$NODE_HOME/bin

  • Java

(1)安装JDK

wget http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-i586.rpm
rpm -ivh jdk-7u51-linux-i586.rpm --prefix /opt/Java

(2)设置环境变量

export JAVA_HOME=/opt/Java/jdk1.7.0_45
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib/rt.jar
export PATH=$PATH:$JAVA_HOME/bin

alternatives --install /usr/bin/java java /usr/Java/jdk1.7.0_45/bin/java 50
alternatives --install /usr/bin/javac javac /usr/Java/jdk1.7.0_45/bin/javac 50

(3)安装Tomcat

wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.0.3/bin/apache-tomcat-8.0.3.tar.gz
mkdir /opt/Tomcat
cp apache-tomcat-8.0.3.tar.gz /opt/Tomcat
tar -zxvf apache-tomcat-6.0.37.tar.gz

chmod +x /opt/Tomcat/apache-tomcat-6.0.37/bin/startup.sh
chmod +x /opt/Tomcat/apache-tomcat-6.0.37/bin/shutdown.sh

export CATALINA_BASE=/opt/Tomcat/apache-tomcat-6.0.37
export CATALINA_HOME=/opt/Tomcat/apache-tomcat-6.0.37

(4)安装Ant

wget http://mirror.esocc.com/apache//ant/binaries/apache-ant-1.9.3-bin.tar.bz2
mkdir /opt/Ant
cp apache-ant-1.8.1-bin.tar.bz2 /opt/Ant
tar -jxvf apache-ant-1.8.1-bin.tar.gz

export ANT_HOME=/opt/Ant/apache-ant-1.8.1
export PATH=$PATH:$ANT_HOME/bin

  • OpenCV

参考:

http://docs.opencv.org/trunk/doc/py_tutorials/py_setup/py_setup_in_fedora/py_setup_in_fedora.html#install-opencv-python-in-fedora

(1) 安装依赖包(很重要)

(2)安装CMake

tar -zxvf cmake-2.8.10.2.tar.gz
cd cmake-2.8.10.2
./configure
make && make install

(3)安装OpenCV

tar -xvf OpenCV-2.4.3.tar.bz2
cd OpenCV-2.4.3
cmake CMakeLists.txt
make && make install

(4)添加Python支持

cp /usr/local/lib/python2.6/site-packages/cv2.so /usr/lib/python2.6/site-packages
cp /usr/local/lib/python2.6/site-packages/cv.py /usr/lib/python2.6/site-packages

CentOS下的开发环境配置,布布扣,bubuko.com

CentOS下的开发环境配置

标签:c   style   class   java   a   tar   

原文地址:http://www.cnblogs.com/huangavoid/p/3760838.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!