在Foreda8上试安装Apchehttpd-2.4.6.tar.gz
下文是我边试边做的记录,不保证内容的完整性和正确性。
由于我的Apsire机器是最简安装Foreda8,所以需要安装httpd,熟悉一遍也是很好的嘛。
我从网上搜罗并下载了apchehttpd-2.4.6.tar.gz以及安装httpd需要的包apr-1.4.6.tar.gz,apr-util-1.5.1.tar.gz。
安装apr-1.4.6基本是解压,make,make install;安装过程中提示gcc没安,于是用yum install gcc*安上了。
安装apr-util-1.5.1也是一样的解压,make,make install;
Apchehttpd-2.4.6.tar.gz是解压,./configure,make,make install.
安装后httpd被放到了usr/local/apache2下。
之后将usr/local/apache2/conf/httpd.conf 拷贝到/usr/local/httpd/conf/下,之前需要创建目录http和子目录conf。
然后进入usr/local/apache2/bin,用命令 ./apachectl start 启动httpd。下图就是浏览器看到的启动结果。
但是,使用service httpd start/stop ,系统不识别,说httpd: unrecognized service。
So,又去请教百度大神,大神保佑这次没花多少时间,具体操作如下:
把apachectl拷贝到/etc/rc.d/init.d/下,名为httpd
[root@bogon init.d]# cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd
加权限
[root@bogon init.d]# chmod 700 /etc/rc.d/init.d/httpd
看一下
[root@bogon init.d]# ls
acpid dund killall nfslock rsyslog
anacron firstboot kudzu nscd saslauthd
atd functions lm_sensors ntpd sendmail
auditd fuse mdmonitor openvpn setroubleshoot
autofs gpm messagebus pand single
avahi-daemon haldaemon microcode_ctl pcscd smartd
bluetooth halt multipathd psacct smolt
btseed httpd netconsole racoon sshd
bttrack ip6tables netfs rdisc udev-post
capi iptables netplugd restorecond winbind
ConsoleKit irda network rpcbind wpa_supplicant
cpuspeed irqbalance NetworkManager rpcgssd ypbind
crond isdn NetworkManagerDispatcher rpcidmapd yum-updatesd
cups jexec nfs rpcsvcgssd
然后编辑httpd这个文件
[root@bogon init.d]# vi httpd
下面是文件内容,下面第三行起的三行红字是新增加的,其它部分照旧。
#!/bin/sh
#
#
#Comments to support chkconfig on Redhat Linux
#chkconfig:2345 90 90
#description:http server
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Apache control script designed to allow an easy command line interface
# to controlling Apache. Written by Marc Slemko, 1997/08/23
#
# The exit codes returned are:
# XXX this doc is no longer correct now that the interesting
# XXX functions are handled by httpd
# 0 - operation completed successfully
# 1 -
# 2 - usage error
# 3 - httpd could not be started
# 4 - httpd could not be stopped
# 5 - httpd could not be started during a restart
# 6 - httpd could not be restarted during a restart
# 7 - httpd could not be restarted during a graceful restart
# 8 - configuration syntax error
#
# When multiple arguments are given, only the error from the _last_
# one is reported. Run "apachectl help" for usage info
#
ACMD="$1"
ARGV="$@"
.....
加完三行就行了,它的目的是在使用chkconfig时不会提示你这个错service httpd does not support chkconfig。
之后执行
[root@bogon init.d]# chkconfig --add httpd
[root@bogon init.d]# chkconfig --level 2345 httpd on
完成后就能用service httpd start/stop了
[root@bogon init.d]# service httpd start
AH00557: httpd: apr_sockaddr_info_get() failed for bogon
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
httpd (pid 2293) already running
[root@bogon init.d]# service httpd stop
AH00557: httpd: apr_sockaddr_info_get() failed for bogon
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[root@bogon init.d]# service httpd start
AH00557: httpd: apr_sockaddr_info_get() failed for bogon
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
[root@bogon init.d]#
<全文完>
在Foreda8上试安装Apchehttpd-2.4.6.tar.gz相关推荐
- slackware12.0 安装AdobeReader_chs-7.0.9-1.i386.tar.gz后程序启动报错解决?
在Slackware12.0上安装AdobeReader_chs-7.0.9-1.i386.tar.gz,安装成功后,在终端窗口中运行acroread,会不停的出现 expr: 语法错误 expr: ...
- 如何在Windows上创建,解压,更新.tar.gz压缩包
Linux上常用的压缩包格式是.tar.gz..tar.gz文件的创建过程有两步.首先把文件打包到tar文件中,然后用gzip压缩tar文件.这里分享下如何在Windows上创建,解压,更新.tar. ...
- mysql gz 安装_Linux下安装mysql 5.7.17.tar.gz的教程详解
1.创建MySQL组和mysql用户 groupadd mysql useradd -r -g mysql mysql 2.拷贝: cp -R mysql-5.7.16-linux-glibc2.5- ...
- centos mysql tar 安装mysql_centos 安装 mysql-5.7.23-linux-glibc2.12-x86_64.tar.gz 详细步骤
1.卸载Linux系统上自带的mysql插件(old版本) 1.先检查要安装的Linux服务器cglib版本号,命令 strings /lib64/libc.so.6 | grep GLIBC ,查看 ...
- Nexus【环境搭建 01】CentOS 7.5 环境下搭建私有Maven仓库实录(启动问题处理+安装文件 nexus-3.4.0-02-unix.tar.gz 云盘链接)
1. 为什么要搭建私有Maven仓库 废话少说,只说主要原因,我现在参与的项目各个模块都是以微服务形式进行部署的,包括权限验证模块,我之前参与过一个项目,使用的是自己封装的权限验证setter依赖 ...
- linux上怎么解压zip文件和tar.gz文件
解压zip文件的方法 使用命令: unzip xxx.zip 解压tar.gz文件的方法 使用命令: tar -zxvf xxx.tar.gz
- 在 OSX 10.9.4 上编译安装 FastDFS 及其 PHP 扩展
2019独角兽企业重金招聘Python工程师标准>>> 经我测试,在OSX 10.9.4上安装FastDFS V5.01的话会很悲剧,一开始就无法安装,会遇到这帖子中的问题:http ...
- linux上nagios安装完整版
监控服务器端的安装部署 一.apache的安装 下载httpd-2.2.15.tar.gz gunzip httpd-2.2.15.tar.gz tar xvf httpd-2.2.15.tar cd ...
- linux安装多个mysql数据库_linux下多个mysql5.7.19(tar.gz)安装图文教程
初级第一次在Linux下安装MySQL-5.7.19版本教程请看上一篇,如果已经会安装了,那么请看这篇linux下安装多个mysql-5.7.19 环境:centos 6.5 1-下载 2-跳过登陆 ...
最新文章
- 跨域的原因以及解决方案
- 图像处理之基础---极坐标系及其与直角坐标系的关系
- @scheduled注解配置时间_探究 Spring 的定时任务配置
- 防抖 节流_面试必备考点:防抖与节流
- SQL Server 索引结构及其使用(一)[转]
- POI读取Excel文件时,row.getCell(0).getStringCellValue()报错:数字转换异常
- gtk不是C语言的专属,c++也可以
- 没有为此文件配置应用程序上下文_如何在macOS中管理文件关联?
- 2021年最值得推荐的13个提高开发效率工具,程序员必备
- 统计用区划代码和城乡划分代码编制规则
- 第一个动态网页——留言板
- 2口百兆光纤收发器工业导轨式发送机
- Richardson–Lucy滤波的一点个人理解
- C# BitConverterExt 对BitConverter的GetBytes 方法扩展
- python股票量化交易从入门到实践df_Python股票量化交易从入门到实践/金融科技系列...
- 计算机性能和拷机软件
- linux/android系统开发,高级adb 命令汇总
- python官方文档学习_Python3.5.2官方文档学习备忘录
- C++进程间通信 详解2
- asp.net文件下载,实现隐藏文件下载地址
热门文章
- c 输出中文乱码_pandas常用函数学习,从文件读取输出过程中学会处理数据
- Python设计模式面向对象编程
- 同时打包多个场景_人机CP模式闯入“打包界”,智能设备让每一厘米纸箱物尽其用...
- tabcontainer控件太长_AjaxControlToolKit--TabContainer控件的介绍收藏[摘录]
- noj数据结构稀疏矩阵的加法十字链表_数据结构学习(C )稀疏矩阵(十字链表1)
- 梦到计算机坏了无法算账,梦见算账,做梦梦见算账是什么征兆?
- android下载后的app自动安装,Android 7.0 下载APK后自动安装
- 如何平稳入门并掌握inux系统?
- 7个让你惊叹的HTML技巧
- 烽火服务器装系统,烽火 FitServer R2200 V5 机架式服务器