在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的更多相关文章
- Centos 6.4 安装mysql-5.6.14-linux-glibc2.5-i686.tar.gz
创建用户和组 创建链接 授权own和grp给mysql-5.5.8-linux2.6-i686文件夹,就是下面的BASE_DIR 执行的mysql_install_db的时候后面带参数 ./scrip ...
- MySQL脚本自动安装mysql-5.6.15-linux-glibc2.5-x86_64.tar.gz
脚本安装mysql-5.6.15-linux-glibc2.5-x86_64.tar.gz 先准备好数据文件的路径 softdir='/data/soft' 把脚本和tar包放在相应的路径下,其实就是 ...
- linux安装 redis(redis-3.0.2.tar.gz) 和 mongodb(mongodb-linux-x86_64-rhel62-4.0.0)
1:首先 要下载 这两个 压缩包 注意:liunx是否已经安装过 gcc没安装的话 先安装:yum install gcc-c++ 2:安装 redis:redis-3.0.2.tar.gz (1): ...
- 如何在Ubuntu下安装”.deb“、”.bin“、”.tar.gz“、”.tar.bz2“格式的软件包!
今天在Ubuntu11.10中安装Google chrome浏览器是遇到了问题,下载好的“.deb”格式的安装文件google-chrome-stable.deb双击后或者右键快捷菜单选择 Synap ...
- Linux CenterOS安装mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz步骤
1.首先配置IP. Cd /etc/sysconfig/network-scripts/ vim ifcfg-ens32 将ONBOOT=no,改为ONBOOT=yes.(开机启动激活网卡) 2.构建 ...
- Linux下安装解压版(tar.gz)MySQL5.7
最近尝试在Linux中安装了解压版MySQL,期间查阅了许多博客.很多博客看得我很懵逼,因此记录下自己的安装过程,方便后续查阅. 环境说明:CentOs7.2 一.清理 ...
- centos 安装 mysql-5.7.23-linux-glibc2.12-x86_64.tar.gz 详细步骤
1.卸载Linux系统上自带的mysql插件(old版本) 查找mysql相关安装: rpm -qa|grep -i mysql 可能会出现以下的一个或多个,没有更好,说明你的系统很干净,但是以防万一 ...
- Ubuntu系统里下载安装配置redis-2.2.13.tar.gz
不多说,直接上干货! Redis是一个NoSQL数据库,在数据需要频繁更新,并且数据的访问热点范围比较广的应用场景下,Redis的效率很不错. 下面介绍Redis的安装过程,如下面的步骤所示. 第一步 ...
- LINUX 安装JDK (rpm格式和tar.gz格式)
谷歌博客地址:http://tsaiquinn.blogspot.com/2014/10/linux-jdk-rpmtargz.html JDK rpm方式: 我使用的是SecureCRT,先下载了然 ...
随机推荐
- BZOJ 2286: [Sdoi2011]消耗战 虚树 树形dp 动态规划 dfs序
https://www.lydsy.com/JudgeOnline/problem.php?id=2286 wa了两次因为lca犯了zz错误 这道题如果不多次询问的话就是裸dp. 一棵树上多次询问,且 ...
- Codeforces.809E.Surprise me!(莫比乌斯反演 虚树)
题目链接 \(Description\) 给定一棵树,求\[\frac{1}{n(n-1)/2}\times\sum_{i\in[1,n],j\in[1,n],i\neq j}\varphi(a_i\ ...
- 洛谷.4238.[模板]多项式求逆(NTT)
题目链接 设多项式\(f(x)\)在模\(x^n\)下的逆元为\(g(x)\) \[f(x)g(x)\equiv 1\ (mod\ x^n)\] \[f(x)g(x)-1\equiv 0\ (mod\ ...
- PHP 大神的十大优良习惯
1.多阅读手册和源代码 没什么比阅读手册更值得强调的事了–仅仅通过阅读手册你就可以学习到很多东西,特别是很多有关于字符串和数组的函数.就在这些函数里面包括许多有用 的功能,如果你仔细阅读手册,你会经常 ...
- [CC-SEINC]Sereja and Subsegment Increasings
[CC-SEINC]Sereja and Subsegment Increasings 题目大意: 有长度为\(n(n\le10^5)\)的序列\(A\)和\(B\). 在一次操作中,可以选择一个区间 ...
- FLASK开发简易blog的学习笔记
首先,学会了如何创建一个新的包.就是在文件夹下创建__init__.py文件,就是在其他地方导入这个包了.
- 几张图理解Roll, Pitch, Yaw的含义
Roll:翻滚 Pitch:俯仰 Yaw:偏航 有时候不知道它到底绕着哪个轴旋转得到的角,一个比较容易的记法是根据字母的排列顺序PRY分别对应XYZ轴进行旋转得到的角,即: Pitch是绕 ...
- 【原】Order属性决定了不同切面类中通知执行的先后顺序
[障碍再现] MyBatis配置多数据源时,数据源切换失败. [原因分析] 自定义切面和Spring自带事务切面“即<aop:advisor>”执行的先后顺序导致数据源不能切换成功. ...
- A profile to detect when a SMS database has been changed
http://webmail.dev411.com/t/gg/tasker/12bdddbsak/a-profile-to-detect-when-a-sms-has-been-sent A bela ...
- 轨至轨运算放大器 rail to rail
http://www.360doc.com/content/10/1102/16/2285160_66006645.shtml Rail to rail: 轨至轨,指器件的输入输出电压范围可以达到电源 ...