`
hyl198611
  • 浏览: 225389 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

centos 6.7 安装软件

阅读更多

设置固定ip
http://jingyan.baidu.com/article/455a99508be7cda167277865.html

centos6.7  nginx 1.8.0

1. nginx 安装

添加 nginx操作用户 useradd www
参见 http://blog.csdn.net/yuanchao99/article/details/46357173
手动安装 GEOip http://www.vpsee.com/2011/03/install-nginx-with-geoip-module-for-country-targeting/


    ./configure: error: C compiler cc is not found
    yum install gcc gcc-c++ ncurses-devel perl

yum install zlib-devel.x86_64
# wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
# tar -zxvf GeoIP.tar.gz
# cd GeoIP-1.4.6
# ./configure
# make; make install

# echo '/usr/local/lib' > /etc/ld.so.conf.d/geoip.conf
# ldconfig

下载 IP 数据库

MaxMind 提供了免费的 IP 地域数据库,这个数据库是二进制的,不能用文本编辑器打开,需要上面的 GeoIP 库来读取:

# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
# gunzip GeoIP.dat.gz


配置 Nginx

最后是配置 nginx,在相关地方加上如下的配置就可以了:

# vi /etc/nginx/nginx.conf

http {
...
geoip_country /home/vpsee/GeoIP.dat;
fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;
fastcgi_param GEOIP_COUNTRY_CODE3 $geoip_country_code3;
fastcgi_param GEOIP_COUNTRY_NAME $geoip_country_name;
...
}

server {
...
        location / {
            root   /home/vpsee/www;
            if ($geoip_country_code = CN) {
                root /home/vpsee/cn;
            }
            ...
        }
...
}

这样,当来自中国的 IP 访问网站后就自动访问到预定的 /home/vpsee/cn 页面。关于 Nginx + GeoIP 还有很多有用的用法,比如做个

简单的 CDN,来自中国的访问自动解析到国内服务器、来自美国的访问自动转向到美国服务器等。MaxMind 还提供了全球各个城市的 IP

信息,还可以下载城市 IP 数据库来针对不同城市做处理。


./configure: error: libatomic_ops library was not found. 问题 安装 yum install libatomic_ops-devel.x86_64

 5、如果安装出现在下面的错误是缺少编译环境。安装编译源码所需的工具和库

 

以上都执行后再执行 安装脚本

    #!/bin/bash 
     
    user=www          # change to user who run nginx 
    dir_prefix=/data/nginx       # change to your prefered install dir 
    script_path=`readlink -f $0` 
    script_dir=`dirname $script_path` 
    opath=`pwd` 
     
    yum install -y gd-devel pcre-devel libgcrypt-devel libxml2-devel libxslt-devel
     
    tar zxvf $script_dir/zlib-1.2.8.tar.gz -C $script_dir 
    tar zxvf $script_dir/openssl-1.0.1m.tar.gz -C $script_dir 
    tar zxvf $script_dir/nginx-1.8.0.tar.gz -C $script_dir 
     
    cd $script_dir/nginx-1.8.0 
    ./configure --prefix=$dir_prefix --user=$user --group=$user --http-log-path=$dir_prefix/log/access.log --error-log-

path=$dir_prefix/log/error.log --pid-path=$dir_prefix/pid/nginx.pid --lock-path=$dir_prefix/lock/nginx.lock --with-

http_ssl_module --with-http_spdy_module --with-http_realip_module --with-http_xslt_module --with-

http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module

--with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-

http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module

--with-pcre --with-libatomic --with-zlib=$script_dir/zlib-1.2.8 --with-openssl=$script_dir/openssl-1.0.1m 
     
    make 
     
    make install 
     
    mkdir -p $dir_prefix/sites-enabled 
    mkdir -p $dir_prefix/lock 
     
    \cp -f $script_dir/etc.initd.nginx-$user /etc/init.d/nginx-$user 
    \cp -f $script_dir/conf.nginx.conf $dir_prefix/conf/nginx.conf 
    \cp -f $script_dir/sites-enabled.$user.conf $dir_prefix/sites-enabled/$user.conf 
     
    chown -R $user: $dir_prefix 
     
    service nginx-$user start 
    chkconfig nginx-$user on 
     
    rm -Rf $script_dir/zlib-1.2.8 
    rm -Rf $script_dir/openssl-1.0.1m 
    rm -Rf $script_dir/nginx-1.8.0 
 cd $opath 


安装redis  http://blog.csdn.net/ludonqin/article/details/47211109

卸载jdk http://linux.it.net.cn/CentOS/server/set/2014/1006/6242.html

安装jdk http://www.cnblogs.com/kenshinobiy/p/4747888.html

安装resin http://blog.csdn.net/liuxiao723846/article/details/50781025

安装mysql http://blog.csdn.net/wendi_0506/article/details/39478369  不需要 -DENABLE_DOWNLOADS=1  参数

 

安装ImageMagick http://blog.csdn.net/gycsjz/article/details/42707981

 

yum install libjpeg libjpeg-devel libpng libpng-devel libtiff libtiff-devel

解压安装包后查看执行

./configure

 

留意 DELEGATES 刚开始的时候并没有 jpeg, yum install 后出现 支持jpeg、png、tiff。

然后

make 

make install

分享到:
评论

相关推荐

    Linux环境(CentOS6.7 64位)下安装subversion1.9.5的方法

    本文实例讲述了Linux环境(CentOS6.7 64位)下安装subversion1.9.5的方法。分享给大家供大家参考,具体如下: 安装环境以及软件版本如下。 subversion使用1.9.5版本,服务器使用阿里云服务器,CentOS6.7(64位)。 1....

    openssh8.9p1 for centos6 or rhel6 rpm包,可直接升级,无需源码编译

    安装及设置方法在附件中。 openssh-8.9p1 rpm 升级包,适用于RHEL6/CENTOS6。 openssh-8.9p1取消了部份弱算法,所以有些低版本的软件会无法连接,更换到新版本后即可正常连接。 [root@localhost ~]# cat /etc/...

    Docker及主要软件的安装(基于centos 7 以及 root 用户)

    1 Docker的安装及启动 1.1安装docker yum包更新到最新 yum update 安装需要的软件包,yun-uti提供yun-config-manager功能, 另两个是devicemapper驱动依赖的 yum install -y yum-utils device-mapper-persistent-...

    Omega2014安装包下载地址.txt

    Omega2014的安装包,可在redhat6.7或centos6.7系统下安装。具体安装流程可参考我提供的对应的安装教程,本人已亲测可用

    AutoDock Vina 1.1.2 - 64-bit:针对x86_64系统CentOS 6.7的AutoDock Vina 1.1.2的编译。-开源

    利用Oleg Trott博士的AutoDock Vina 1.1.2的开源代码,提供了vina和vina_split的有效二进制文件。 对于不太熟悉在Linux机器上构建源代码的人,这些文件可能会有所帮助。 由于在超级计算机上对某些系统配置进行更改后...

    设计模式EA类图并使用C++实现了19个设计模式

    使用EA软件绘制相关设计模式的类图,并使用C++语言实现了对应的类图,并在centos6.7上完成了测试

    Linux基本环境及远程软件安装

    我踩过的坑(1)VMware下安装centos6.7的步骤(2)此主机支持 Intel VT-x,但 Intel VT-x 处于禁用状态(3)linux虚拟机网络配置(Centos6.5)二、初步了解Linux环境1.重新开启虚拟机,登录2.# 和$3.在Linux系统下,...

    cfl3dv6.7 windows运行版本

    cfl3dv6.7 编译完成版本 需要安装intel fortran 运行环境 集成了cgns3.2.1和hdf5 1.8.12

    centos7 esxi6.7模板实际应用详解

    一、创建centos7.6系统并优化系统 1.关闭NetworkManager systemctl disable NetworkManager systemctl stop NetworkManager 2.关闭selinux ...sed -i s#SELINUX=enforcing#...4.安装日常需要用的软件 yum install

    YUMI-2.0.6.7.exe

    除此以外,杀毒软件的救援光盘、dos、分区魔术师等也可以使用YUMI安装进u盘,从而重启后引导使用。 YUMI在创建自启动u盘的时候,会在u盘中创建mbr,并且还带有自己的引导界面,从而可以对多个需要自启动系统进行有效...

    IxChariot6.7 Part 3 of 5

    美国IXIA公司的应用层性能测试软件IxChariot是一个独特的测试工具,也是在应用层性能测试领域得到业界认可的测试系统。对于企业网而言,IxChariot可应用于设备选型、网络建设及验收、日常维护等3个阶段,提供设备...

    CFL3D-6.7.zip_Baldwin-Lomax_cfl3d计算_nasa cfd_structured mesh_tur

    NASA的CFD计算流体力学软件,功能强大,用途广,可用于科研和实际工程计算。 源代码,已开源,可用于科研

    fpm模式安装php-5.4.40及xcache 1

    fpm模式安装php-5.4.40及xcache环境介绍: 操作系统:CentOS release 6.7 (Final) 所需软件:php-5.4.40.ta

    模块式安装php-5.4.40及xcache 1

    模块式安装php-5.4.40及xcache环境介绍: 操作系统:CentOS release 6.7 (Final) 所需软件:php-5.4.40.tar.

    hwx-isilon:Isilon Hortonworks安装

    [这允许安装Ambari 2.1] CentOS 6.7上带有Ambari 2.1的HDP 2.3假设本实验假定您在笔记本电脑上安装了VMware Fusion。 如果您没有VMWare Fusion软件,请下载该软件的30天试用版。机器要求您的计算机应具有16GB的RAM...

    biemond-orawls-vagrant-12.1.3-infra-osb:oracle weblogic 服务总线 12.1.3 (OSB) vagrant box

    with OSB ,ESS Cluster ##细节CentOS 6.7 流浪盒子傀儡3.7.4 流浪者 >= 1.41 Oracle Virtualbox >= 4.3.6 下载所有 Oracle 二进制文件并将其添加到 /software 编辑 Vagrantfile 并将软件共享更新到您自己的本地...

    matlab代码sqrt-ASUMathLabG09:ASUMathLabG09

    实施数学库软件。 与Matlab,Octave和类似工具相似。 项目规格书 使用C / C ++ linux下的开发 生产到linux服务器(Centos 6.7) g ++编译器 相数 核心业务 高级操作和调整 先进的系统操作 阶段1:核心运营 A = [1.4 ...

    matlab代码sqrt-matlab:Matlab的

    数学库软件。 类似于Matlab,Octave和类似工具 规格 使用C / C ++ linux下的开发 生产到linux服务器(Centos 6.7) 任何C / C ++ IDE都可以在linux下运行。 g ++编译器,需要makefile。 源代码管理,问题跟踪,Bit...

    matlab代码sqrt-Mathlab:数学实验室

    数学库软件。 类似于Matlab,Octave和类似工具 规格 使用C / C ++ linux下的开发 生产到linux服务器(Centos 6.7) 任何C / C ++ IDE都可以在linux下运行。 g ++编译器,需要makefile。 源代码管理,问题跟踪,Bit...

    matlab代码sqrt-AsuMathlabG22:AsuMathlabG22

    数学库软件。 类似于Matlab,Octave和类似工具 规格 使用C / C ++ linux下的开发 生产到linux服务器(Centos 6.7) 任何C / C ++ IDE都可以在linux下运行。 g ++编译器,需要makefile。 源代码管理,问题跟踪,Bit...

Global site tag (gtag.js) - Google Analytics