当前位置:Gxlcms > PHP教程 > 编译安装ruby和Nginx

编译安装ruby和Nginx

时间:2021-07-01 10:21:17 帮助过:9人阅读

安装依赖:

    sudo apt-get install zlib1g-dev    sudo apt-get install libxslt-dev    sudo apt-get install libxml2-dev    sudo apt-get install libssl-dev    sudo apt-get install libmysqlclient-dev    apt-get-y install  libreadline6 libreadline6-dev    libpcre3 libpcre3-dev    sudo apt-get install g++    sudo apt-get install gcc 

安装yaml-dev:

 apt-get-y install libyaml-dev

安装build-essential (make /automake时需要)

apt-get-y install build-essential

下载ruby:(新版本的修复了readline中的bug)
编译安装ruby 和Nginx

    wget 'https://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p647.tar.gz'

下载之后进入下载目录:

tar xvzf ruby*.tar.gz 
cd ruby*
./configure
make
sudo make install

安装ngnix:

wget 'http://nginx.org/download/nginx-1.8.0.tar.gz'tar xvzf nginx*
cd ngnix*
./confirgure --prefix=/opt/nginx(指定目录)
make 
sudo make install

如果有pcre错误:

apt-get install libpcre3 libpcre3-dev

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('
  • ').text(i)); }; $numbering.fadeIn(1700); }); });

    以上就介绍了编译安装ruby 和Nginx,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

  • 人气教程排行