linux杂记

来源:互联网 发布:金山软件安全卫士 编辑:程序博客网 时间:2024/06/08 13:54

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 homebrewbrew install pythonbrewpythonbrew_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/.virtualenvsexport PROJECT_HOME=$HOME/Develsource /usr/local/bin/virtualenvwrapper.sh# 刷新source ~/.bashrc    or .profile  or .bash_profile

Ubuntu mysql 安装

安装参考

安装mysql-python

安装参考

pip install mysql-python#如果上面安装出错,则先执行下面的步骤再安装sudo apt-get install aptitudesudo 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#然后安装 Memcachepip install python-memcached