1. yum
The default environment is not OK.
1) Run error message No module named yum
Solution: #vi / usr / bin / yum will # / usr / bin / python amended as # / usr / bin / python2.4!!
2) download the configuration source of yum
mkdir /etc/yum.repos.d/ cd /etc/yum.repos.d/ wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
3) Run yum makecache generate cache
If reinstalling
1) download three files required for installation, download address: http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/
yum-3.2.22-40.el5.centos.noarch.rpm yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
2) Install Command
rpm -ivh yum-*
Note: yum and yum-fastestmirror interdependent, so you need to install at the same time.
3) recovery /etc/yum.conf files automatically backed up when the general unloaded.
2. Development Environment dependencies update
$ yum update $ yum -y install gcc g++ autoconf
$ yum -y install openssl openssl-devel zlib zlib-devel
3. Manually install git
Download the latest git http://distfiles.macports.org/git/
$ yum install gettext-devel $ Programs wget http: // distfilesmacportsorggitgit211targz $ tar zxvf git Over 2.1 . 1 . tar .gz $ Cd Go - 2.1 . one $ autoconf $ ./configure $ make $ make install
4. Free password
# The machine generates the key and copy to the pub Ali cloud server $ SSH-keygen -t rsa -P '' # -P represent password, -P '' says an empty password $ scp ~/.ssh/FILENAME.pub root@server_ip:/root # Ali cloud server on the pub into the authorized_keys # cat FILENAME.pub >> ~/.ssh/authorized_keys # chmod 600 ~/.ssh/authorized_keys
5. python
Manually compile and install Python, the official website you can download the source code.
./configure --enable-shared # if not, erro: libpython2.7.a: could not read symbols: Bad value make make install
At this point run python possible error:
python: error while loading shared libraries: libpython2.7.so.1.0:
cannot open shared object file: No such file or
solution:
$ vim /etc/ld.so.conf.d/python2.7.conf # Into the content: /usr/local/lib # Save the exit: $ ldconfig
pip with the library
yum install -y python-setuptools python-devel sudo easy_install -U distribute
Reproduced in: https: //www.cnblogs.com/misspy/p/4099687.html