zoukankan      html  css  js  c++  java
  • 安装linux环境

    1,apache

        a)apache官网下载 .tar.gz 结尾的文件,并且通过ftp传送到liunx下自建的目录里面。

        b)解压 tar -zxvf httpd-2.0.54.tar.gz,并mv将其重命名为 apach(随意)

        c) ./configure --prefix=/usr/local/http2 

    --enable-modules=all

    --enable-mods-shared=all

    --enable-so

    运行是出错。

    ........................

    checking for gcc... no
    checking for cc... no
    checking for cl.exe... no
    configure: error: in `/root/httpd-2.2.11/srclib/apr':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details.
    configure failed for srclib/apr

    查看了一下原来是错误开始于srclib/apr文件,检查gcc编译器时提示没发现并且在系统环境变量$PATH中没有合适的c编译器,以是使用yum -y install gcc来安装gcc编译器/或者用rpm包安装,就可继续安装了

    再运行,发现


    checking whether to enable mod_deflate... checking dependencies
    checking for zlib location... not found
    checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures

    缺少zlib,yum install zlib-devel –y

    make && make install

    等待安装

    完毕后

    cd /usr/local/apache/bin/conf  备份配置文件 cp –a  httpd.conf httpd.conf.back

    chkconfig --list httpd //查看httpd服务是否已存在

    chkconfig httpd off //关闭系统自带了httpd的服务,如果存在httpd服务

    service httpd status //查看自带httpd服务状态

    接着启动apache

    /usr/local/apache/bin/apachect1 –k start

    发现无法启动

    httpd: apr_sockaddr_info_get() failed for web154
    httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

    解决:将apache的配置文件

    ServerName localhost:80
    再次启动。ok
    #ps aux | grep httpd //linux下查看apache进程
    用wget http://127.0.0.1 后无法链接,检查后是防火墙80端口没有开。
    通过 setup 配置下80端口tcp协议
    在启动还是没有启动,检查 apache 的错误日志发现

    [Thu Sep 25 16:49:57 2014] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "web154"
    Configuration Failed

    在 /etc/hosts 下追加一行 127.0.0.1 web154 localhost
    重启,ok
    cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/apache //拷贝apache启动脚本
    vi /etc/rc.d/init.d/apache // 这里是编辑apache启动脚本

    在开头的#!/bin/sh 下面加上
    #chkconfig: 2345 85 15

    chkconfig --add apache //添加apache服务

    chkconfig --list apache //列出apache服务

    ps -aux | grep httpd //查看是否存在httpd服务

    至此,apache安装ok
     
     
     
  • 相关阅读:
    结构化数据上的 TopN 运算
    Excel 分组后计算
    主流开源 BI 产品对比
    职场人员该学什么程序语言
    Python 并不合适职场编程,SPL 才行
    v-if 和 v-show 到底有什么区别 何时用v-if 何时用v-show
    APP 在退出登录 页面 注意事项
    APP 项目,登录注册页面,注意事项
    input 文本内容 ,才用正则过滤后,内容没有实时更新 的 处理方法
    实现 长按复制粘贴文本
  • 原文地址:https://www.cnblogs.com/lxdd/p/3993400.html
Copyright © 2011-2022 走看看