|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
欢迎大家来到仓酷云论坛!1.概述
centos6.4装置Python,setuptool,pip,virtualenv,mysql,django,libevent,memcache,nginx,git,beyondcompare,jdk,eclipse,pydev
2.参考下令
centos6.4自带Python2.6,归正2.x区分不年夜,也就迁就着用了.
1.装置setuptool
[plain]viewplaincopy
- wget--no-check-certificatehttps://bootstrap.pypa.io/ez_setup.py
- pythonez_setup.py
固然也能够往下载setuptool源码,解压后编译装置
2.装置pip
[plain]viewplaincopy
- wget--no-check-certificatehttp://pypi.python.org/packages/source/p/pip/pip-1.0.2.tar.gz
- tarzxfpip-1.0.2.tar.gz
- cdpip-1.0.2
- pythonsetup.pyinstall
3.装置virtualenv
[plain]viewplaincopy
4.创立一个假造情况,并激活
[plain]viewplaincopy
- virtualenvpydj14
- sourcepydj14/bin/activate
5.装置mysql
[plain]viewplaincopy
- wgethttp://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-5.5.17-1.linux2.6.x86_64.tar
- tar-xfMySQL-5.5.17-1.linux2.6.x86_64.tar
- yumerasemysql-libs
- rpm-ivhMySQL-server-5.5.17-1.linux2.6.x86_64.rpm
- rpm-ivhMySQL-devel-5.5.17-1.linux2.6.x86_64.rpm(装置devel才会有mysql_config文件,不然MySQL-python报错找不到此文件)
- rpm-ivhMySQL-client-5.5.17-1.linux2.6.x86_64.rpm可选
- chown-Rmysql:mysql/var/lib/mysql
- /etc/init.d/mysqlstart启动
- mysqladmin-urootpasswordppp
- /usr/bin/mysqladmin-uroot-pshutdown封闭
开机启动可选:
[plain]viewplaincopy
- /sbin/chkconfig--addmysql
数据库目次/var/lib/mysql/
设置文件/usr/share/mysql
相干下令/usr/bin(mysqladminmysqldump等下令)
启动剧本/etc/rc.d/init.d/
6.装置django开辟情况
[plain]viewplaincopy
- pipinstallsouth
- pipinstall--downloadMySQL-python解压后修正setup_posix.py将mysql_config路径改成/usr/bin/mysql_config
- pipinstallpython-memcached
- pipinstalldjango==1.4.5
- pipinstalluwsgi
7.装置libevent
[plain]viewplaincopy
- yuminstallgcc
- yuminstallgcc-c++libstdc++-devel
- yuminstallzlib-devel
- wgethttp://monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
- tarzxvflibevent-1.4.14b-stable.tar.gz
- cdlibevent-1.4.14b-stable
- ./configure--prefix=/usr/local/libevent/
- make&&makeinstall
- 上面二选一
- ln-s/usr/local/libevent/lib/libevent-1.4.so.2/lib/libevent-1.4.so.232位体系
- ln-s/usr/local/libevent/lib/libevent-1.4.so.2/lib64/libevent-1.4.so.264位体系
8.装置memcache
[plain]viewplaincopy
- wgethttp://www.danga.com/memcached/dist/memcached-1.2.5.tar.gz
- tarzxvfmemcached-1.2.5.tar.gz
- cdmemcached-1.2.5
- ./configure--prefix=/usr/local/memcached/--with-libevent=/usr/local/libevent/
- make&&makeinstall
- /usr/local/memcached/bin/memcached-d-m64-uroot-l127.0.0.1-p11211-c128-P/tmp/memcached.pid
9.装置nginx
[plain]viewplaincopy
- wgethttp://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
- rpm-ivhnginx-release-centos-6-0.el6.ngx.noarch.rpm
- yuminstallnginx
- 修正防火墙
- vi/etc/sysconfig/iptables
- -AINPUT-mstate--stateNEW-mtcp-ptcp--dport80-jACCEPT
- serviceiptablesrestart
设置目次:/etc/nginx/
PID目次:/var/run/nginx.pid
毛病日记:/var/log/nginx/error.log
会见日记:/var/log/nginx/access.log
默许站点目次:/usr/share/nginx/html
启动nginx:nginx
重启nginx:killall-HUPnginx
测试nginx设置:nginx-t
10.装置git
[plain]viewplaincopy
- yum-yinstallzlib-developenssl-develperlcpioexpat-develgettext-devel
- yuminstallautoconf
- yuminstallgit
11.装置BeyondCompare
http://www.scootersoftware.com/download.php下载rpm包装置
12.git设置bc3
[plain]viewplaincopy
- [color]
- ui=true
- [core]
- editor=vim
- [diff]
- tool=bc3
- [difftool"bc3"]
- cmd=bcompare$LOCAL$REMOTE
- [difftool]
- prompt=false
13.Pythonweb开辟情况
下载jdk1.7rpm包,rpm下令装置
下载eclipse解压,mv至/usr/local目次下,设置桌面启动图标以下代码
注重jdk版本与eclipse版本,eclipse4.3及之前可使用jdk1.6(保举jdk1.6装置3.3--3.7的eclipse),eclipse4.4起必需jdk1.7及以上.
注重jdk与eclipse位数分歧,最好与操纵体系分歧,都用64位,32位。从下面装置下令能够看出,本文章是centos6.464位
桌面增加eclipse启动图标(centos6.4增加后桌面不会当即呈现该图标,仅仅放在桌面备选项中,手动点击左上角,使用,找到eclipse,右键,增加至桌面)
[plain]viewplaincopy
- vim/usr/share/applications/eclipse.desktop
- 输出以下
- [DesktopEntry]
- Encoding=UTF-8
- Name=Eclipse
- Comment=EclipseIDE
- Exec=/usr/local/eclipse/eclipse
- Icon=/usr/local/eclipse/icon.xpm
- Terminal=false
- Type=Application
- Categories=GNOME;Application;Development;
- StartupNotify=true
装置pydev
下载源码包解压至eclipsedropins目次,大概在线装置(3.7以下版本eclipse在线装置极可能失利),略往
仅必要注重pydev2.Xjdk1.6或以上,但1.8有点小成绩。pydev3必需jdk1.7以上。
详细mysql设置,nginx设置,memcache设置就各自百度谷歌吧.
欢迎大家来到仓酷云论坛! |
|