linux杂记

vim 编辑器使用

这里写图片描述

apt-get install vim #安装vim编辑器,乌班图默认是vi感觉很难用
touch test #创建用于测试的test文件
vim test.txt #创建并打开文件
vi test #使用vi编辑器打开文件
# 安 i 进入编辑模式
# 编辑完成 按esc :wq!保存并推出 或 :q!不保存退出
cat test #查看文件内容

有时间了继续学习啊

linux 安装Python 3.2

apt-get homebrew
brew install pythonbrew
pythonbrew_install
#然后依据提示使用vim在~/.bashrc中增加一串串。。。
pythonbrew install 3.2  #安装Python3.2 版本

linux 安装pip3

sudo apt install python3-pip

linux安装virtualenv virtualenvwrapper

pip install virtualenv 
pip install virtualenvwrapper
# 进行如下配置
Add three lines to your shell startup file (.bashrc, .profile, etc.) to set the location where the virtual environments should live, the location of your development project directories, and the location of the script installed with this package:

export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
# 刷新
source ~/.bashrc    or .profile  or .bash_profile

Ubuntu mysql 安装

安装参考

安装mysql-python

安装参考

pip install mysql-python
#如果上面安装出错,则先执行下面的步骤再安装
sudo apt-get install aptitude
sudo aptitude install python-dev

安装Memcache django内存缓存

#首先安装libevent
$ wget http://monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
$ tar xzf libevent-1.4.14b-stable.tar.gz
$ cd libevent-1.4.14b-stable
$ ./configure --prefix=/opt/libevent
$ make
# make install
#然后安装 Memcache
pip install python-memcached
posted @ 2017-10-15 23:42  icanactnow  阅读(68)  评论(0编辑  收藏  举报