#安装yaml
#-------------------------------------------------------
tar zxf yaml-0.1.7.tar.gz
./configure --prefix=/usr/local
make
make install
#安装openssl
#------------------------------------------------------
cd openssl-1.0.2i
./config --prefix=/usr/local/openssl --shared
make
make install
cd /usr/local/
ln -s openssl ssl
cd /etc/
vi ld.so.conf
#在include ld.so.conf.d/*.conf代码下面增加以下代码
/usr/local/openssl/lib
vi profile
#在文件最下面增加,以下代码
export PATH=/usr/local/openssl/bin:$PATH
ldconfig
安装ruby
#------------------------------------------------------
tar zxf ruby-2.1.10.tar.gz
cd ruby-2.1.10
./configure --prefix=/usr/local/ruby --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
make && make install
echo "/usr/local/lib" >> /etc/ld.so.conf
vi /etc/profile
#在文件最下面增加下段代码
export PATH=/usr/local/ruby/bin:$PATH
source /etc/profile
#配置ruby的openssl扩展
#------------------------------------------------------
ruby extconf.rb --with-openssl-include=/usr/local/openssl/include/ --with-openssl-lib=/usr/local/openssl/lib
make && make install
ldconfig
#更新Gem
#------------------------------------------------------
#检查当前gem版本
gem update --system
gem -v
# rvm requirements
rvmsudo yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel
yum install *gdbm*
vi /etc/rvmrc
rvm_configure_flags="--with-openssl-dir=/usr/local/ssl"
保存退出
rvm reload
步骤2:安装ruby
同样可以用yum install ruby和yum install –y ruby-rdoc 或者源码安装。此处我们用yum方式。
或者
rvm install ruby-2.4.0
rvm docs generate-ri
gem install libxml-ruby
python必要工具
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz
xz -d Python-3.6.0.tar.xz
tar -xvf Python-3.6.0.tar
cd Python-3.6.0
./configure --prefix=/usr/local --enable-shared
make && make install
6、设置别名方便使用
alias py=python3
ln -sf /usr/local/lib/libz.so.1.2.8 /usr/lib64/libz.so
wget ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz
tar zxvf libxml2-2.9.4.tar.gz
cd libxml2-2.9.4
./configure --prefix=/usr/local/libxml2 --with-zlib=/usr/local/zlib/ --with-python=/usr/lib/python2.6
make && make install
gem install nokogiri -- --with-xml2-include=/usr/include/libxml2 --with-xml2-lib=/usr/lib --with-xslt-dir=/usr/
gem install rails