安装gcc编译器:

yum -y install gcc

 

安装wget:

yum -y install wget


安装python-setuptools:

wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py

 

安装https

yum install mysql-devel

 

安装下载python:

wget http://python.org/ftp/python/2.7.9/Python-2.7.9.tgz
tar zxvf Python-2.7.9.tgz
cd Python-2.7.9
./configure --prefix=/usr/local/python2.7
make
make install

 

配置环境默认使用python 2.7:

mv /usr/bin/python /usr/bin/python_old
ln -s /usr/local/python2.7/bin/python /usr/bin

 

安装mysql-devel:

yum install mysql-devel

 

安装mysql-python:

wget http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz

cd MySQL-python-1.2.3

python setup.py build

python setup.py install

 

yum需要使用旧版本的python2.4

# vim /usr/bin/yum 

#!/usr/bin/python 修改为 #!/usr/bin/python_old

 

测试mysql-python安装是否安装成功

python

>>> import MySQLdb

 

 

安装C++编译包

yum install glibc-headers
yum install gcc-c++

 

安装Protocal Buffer

wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz

cd protobuf-2.5.0

./configure

make

make check

make install

cd python

mkidr google/protobuf/compiler/ -p

python setup.py install

 

安装MYSQL客户端

yum install mysql

如果要安装完整的mysql数据库: 

yum install mysql-server

 

安装vsftp

yum install vsftpd

yum install ftp

userdel -r kingsoft

useradd -g ftpuser -d /data -s /sbin/nologin -M  kingsoft

passwd kingsoft

测试:ftp 127.0.0.1

被动模式完整配置文件

vi /etc/vsftpd/vsftpd.conf

listen=yes
listen_port=21
max_clients=100
max_per_ip=10
local_max_rate=5120000
anonymous_enable=no
local_enable=yes
write_enable=no
chroot_local_user=yes
chroot_list_enable=yes
chroot_list_file=/etc/vsftpd/chroot_list
guest_enable=yes
guest_username=kingsoft
virtual_use_local_privs=yes
user_config_dir=/etc/vsftpd/user_config
pasv_enable=yes
pasv_min_port=4500
pasv_max_port=5000
tcp_wrappers=yes
xferlog_enable=yes
xferlog_file=/var/log/ftp/vsftpd.log
idle_session_timeout=600
data_connection_timeout=120
accept_timeout=60
connect_timeout=60
connect_from_port_20=no
local_umask=022
pam_service_name=vsftpd.vu
pasv_address=101.2.3.4(机器的外网ip)
pasv_addr_resolve=yes

 

posted on 2015-03-26 13:53  凌度  阅读(370)  评论(0编辑  收藏  举报