• centos7.4 服务器安装日志

    安装php5.6

    yum install epel-release
    rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmphp56w-pgsql
    yum install php56w php56w-fpm php56w-gd php56w-pgsql php56w-mcrypt php56w-mbstring php56w-xmlreader php56w-devel
    yum install ImageMagick

    安装redis扩展
    wget https://github.com/nicolasff/phpredis/archive/2.2.8.tar.gz
    mv 2.2.8.tar.gz redis-2.2.8.tar.gz
    tar xvzf redis-2.2.8.tar.gz
    cd phpredis-2.2.8
    /usr/bin/phpize
    ./configure --with-php-config=/usr/bin/php-config
    make
    make install

    安装完成之后,会出现nstalling shared extensions: /usr/lib64/php/modules/
    vim etc/php.ini
    添加extension=redis.so

    安装mongo扩展
    yum install openssl-devel
    下载PHP-mongodb扩展
    (https://pecl.php.net/package/mongo)

    wget http://pecl.php.net/get/mongo-1.6.12.tgz
    tar xvzf mongo-1.6.12.tgz
    cd mongo-1.6.12
    phpize
    ./configure --with-php-config=/usr/bin/php-config
    make && make install

    在安装过程中可能会报以下错误
    /var/tmp/mongo/contrib/php-ssl.h:33:25: error: openssl/evp.h: No such file or directory

    需要安装openssl-devel
    yum install openssl-devel

    在php.ini文件中添加extension=mongo.so
    extension=mongo.so

    安装postgresql9.4
    sudo rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm

    yum install postgresql94-server postgresql94-contrib

    初始化数据库
    /usr/pgsql-9.4/bin/postgresql94-setup initdb
    启动
    systemctl start postgresql-9.4

    service postgresql-9.4 restart

    参考连接:https://www.cnblogs.com/think8848/p/5877076.html