美文网首页
Yum安装Nginx+NodeJs+php

Yum安装Nginx+NodeJs+php

作者: Godtoy | 来源:发表于2017-03-15 14:32 被阅读0次

NodeJs 二进制包安装版

文档

Centos

#curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
#yum install -y gcc-c++ cmake
#yum install -y nodejs

Nginx

文档

To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with the following contents:

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/
gpgcheck=0
enabled=1
Replace “OS” with “rhel” or “centos”, depending on the distribution used, and “OSRELEASE” with “5”, “6”, or “7”, for 5.x, 6.x, or 7.x versions, respectively.

php

配置yum源
追加CentOS 6.5的epel及remi源。

# rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

以下是CentOS 7.0的源。

# yum install epel-release
# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

使用yum list命令查看可安装的包(Packege)。

# yum list --enablerepo=remi --enablerepo=remi-php56 | grep php

安装PHP5.6
yum源配置好了,下一步就安装PHP5.6。

# yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-fpm php-gd -y

用PHP命令查看版本。

# php --version

相关文章

网友评论

      本文标题:Yum安装Nginx+NodeJs+php

      本文链接:https://www.haomeiwen.com/subject/ubvlnttx.html