一、环境
ubuntu10.4
mysql5.1.60
python.6.6
java7
二、搭建
1. 安装ubuntu10.4,并更新软件包
2. sudo su- 切换到root用户下 安装mysql5.1.60
groupadd mysql useradd -g mysql mysql ./configure --prefix=/usr/local/mysql --with-unix-socket-path=/usr/local/mysql/var/mysql.sock --sysconfdir=/usr/local/mysql/etc --with-charset=utf8 --without-debug --with-mysqld-user=mysql --with-extra-charsets=gb2312,big5,gbk make make install mkdir /usr/local/mysql/etc cp support-files/my-medium.cnf /usr/local/mysql/etc/my.cnf cp support-files/mysql.server /etc/init.d/mysqld chmod 755 /etc/init.d/mysqld PATH=/usr/local/mysql/bin:$PATH echo "PATH=/usr/local/mysql/bin:\$PATH" >> /etc/profile cd /usr/local/mysql bin/mysql_install_db --user=mysql chown -R root . chown -R mysql var chgrp -R mysql . bin/mysqld_safe --user=mysql &
3. 安装python2.6.6
(1)安装支持包
sudo apt-get install -y build-essential sudo apt-get install -y libncursesw5-dev sudo apt-get install -y libssl sudo apt-get install -y libssl-dev sudo apt-get install -y python-dev sudo apt-get install -y libreadline5-dev sudo apt-get install -y libgdbm-dev sudo apt-get install -y libc6-dev sudo apt-get install -y libsqlite3-dev sudo apt-get install -y tk-dev sudo apt-get install -y ruby sudo apt-get install -y zlib1g sudo apt-get install -y zlib1g.dev sudo apt-get install -y libbz2-dev sudo apt-get install -y libdb-dev sudo apt-get install -y lzma-dev
(2)编译安装python2.6.6
sudo ./configure --prefix=/usr/local/python266 sudo make sudo make install
(3)安装python虚拟隔离环境
sudo apt-get install python-setuptools sudo easy_install virtualenv virtualevn --no-site-packages --python /usr/local/python266/bin/python env source env/bin/activate (进入python2.6.6的隔离环境) #-- 使用pip安装相关的模块,例如安装MySQLdb,如下 pip install MySQL-python
4.安装java7
sudo apt-get purge openjdk* sudo rm /var/lib/dpkg/info/oracle-java7-installer*sudo apt-get purge oracle-java7-installer* sudo rm /etc/apt/sources.list.d/*java* sudo apt-get update sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer
本文出自 “test” 博客,请务必保留此出处http://zhaoq.blog.51cto.com/1374836/1408473