博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
阿里云环境配置
阅读量:7077 次
发布时间:2019-06-28

本文共 1663 字,大约阅读时间需要 5 分钟。

1. yum

默认的环境并不 OK.

1) 运行出错提示    No module named yum

解决方案: #vi /usr/bin/yum 将 #!/usr/bin/python 修改为  #!/usr/bin/python2.4

2) 下载yum的配置源

mkdir /etc/yum.repos.d/cd /etc/yum.repos.d/wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

3) 运行yum makecache生成缓存

若重新安装

查看yum包  
rpm -qa|grep yum 
卸载  
rpm -qa|grep yum|xargs rpm -e --nodeps 
安装:

1) 下载安装所需的三个文件, 下载地址: 

yum-3.2.22-40.el5.centos.noarch.rpmyum-fastestmirror-1.1.16-21.el5.centos.noarch.rpmyum-metadata-parser-1.1.2-4.el5.x86_64.rpm

2)  安装命令

rpm -ivh yum-*

注意:yum和yum-fastestmirror相互依赖,所以需要同时安装。

3) 恢复 /etc/yum.conf 文件, 一般卸载时会自动备份.

 2. 开发环境依赖包更新

$ yum update$ yum -y install gcc g++ autoconf $ yum -y install openssl openssl-devel zlib zlib-devel

3. 手动安装 git

http://distfiles.macports.org/git/ 下载最新 git
$ yum install gettext-devel$ wget http://distfiles.macports.org/git/git-2.1.1.tar.gz$ tar zxvf git-2.1.1.tar.gz$ cd git-2.1.1$ autoconf $ ./configure$ make $ make install

 4. 免密码登陆

# 本机生成密钥, 并将 pub 复制到阿里云服务器上$ ssh-keygen -t rsa -P ''  # -P表示密码,-P '' 就表示空密码$ scp ~/.ssh/FILENAME.pub root@server_ip:/root# 阿里云服务器上将 pub 放入 authorized_keys 中# cat FILENAME.pub >> ~/.ssh/authorized_keys# chmod 600 ~/.ssh/authorized_keys

 5. python

手动编译安装 Python, 官网下载源码即可.

./configure  --enable-shared  # if not, erro: libpython2.7.a:  could not read symbols: Bad valuemakemake install

此时运行 python 可能报错: 

python: error while loading shared  libraries: libpython2.7.so.1.0:

  cannot open shared object file: No such file or

 解决方案:

$ vim /etc/ld.so.conf.d/python2.7.conf# 加入内容:/usr/local/lib#保存退出后运行:$ ldconfig

pip 与 库

yum install -y  python-setuptools python-develsudo easy_install -U distribute

 

转载于:https://www.cnblogs.com/misspy/p/4099687.html

你可能感兴趣的文章
web前端性能优化指南
查看>>
NEC Topaz电话交换机简单管理
查看>>
深度剖析:远程控制软件如何实现隐性监控
查看>>
如何用C++ 写Python模块扩展(一)
查看>>
[20170705]diff比较执行结果的内容.txt
查看>>
Ajax
查看>>
VS2010安装与启动
查看>>
linux 压缩解压缩命令
查看>>
BZOJ1820:[JSOI2010]Express Service 快递服务(DP)
查看>>
MapReduce数据筛选
查看>>
Laravel 建站随笔
查看>>
Cesium入门6 - Adding Imagery - 添加图层
查看>>
将打开的网页以html格式下载到本地
查看>>
Spring Boot:快速入门(二)
查看>>
Spring思维导图(AOP篇)
查看>>
消息中间件的应用——谈谈秒杀(转)
查看>>
使用SQL Server Management Studio 创建数据库备份作业
查看>>
[转] 梦里Babel知多少(一)
查看>>
JS设计模式一:单例模式
查看>>
二叉树的三种遍历方式
查看>>