在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 4408: [Fjoi 2016]神秘数 数学 可持久化线段树 主席树
https://www.lydsy.com/JudgeOnline/problem.php?id=4299 一个可重复数字集合S的神秘数定义为最小的不能被S的子集的和表示的正整数.例如S={1,1,1 ...
- windows提权exp列表
漏洞列表 #Security Bulletin #KB #Description #Operating System CVE-2017-0213 [Windows COM Elevation of P ...
- setTimeout 第一个参数类型
读别人代码的时候看到这么一段,很不理解,然后就搜了一下百度 setTimeout / setInterval 第一个参数可以有三种类型: 字符串 . methods . 匿名函数 1.字符串 ...
- js取float型小数点后x位数的方法
js中取小数点后两位方法最常用的就是四舍五入函数了,前面我介绍过js中四舍五入一此常用函数,这里正好用上,下面我们一起来看取float型小数点后两位一些方法总结 以下我们将为大家介绍 JavaScri ...
- 读书笔记_Effective_C++_条款四十:明智而审慎地使用多重继承
多重继承是一种比较复杂的继承关系,它意味着如果用户想要使用这个类,那么就要对它的父类也了如指掌,所以在项目中会带来可读性的问题,一般我们都会尽量选择用单继承去替代它. 使用多重继承过程容易碰到的问题就 ...
- js ajax post 提交的时候后台接收不到参数,但是代码没有错,怎么回事
这个错误有两点,你自己写的php页面里面的参数接收出错了 还有就是你没有写一句重要的代码告诉浏览器 你使用post提交方式去提交 xhr.setRequestHeader("Content- ...
- JS实现《黑客帝国》落地字母背景
JS实现<黑客帝国>落地字母背景.这个特别有意思,主要是通过设置字符相关属性.控制循环字母距离顶部的高度值,来达到字母不断循环下落的功能. 恩,还有加上一个随机机制,出现各种大小 各个位置 ...
- LINUX block I/O --systemtap
http://hushi55.github.io/2015/10/16/Block-Input-Output/ http://myaut.github.io/dtrace-stap-book/kern ...
- 百度地图api改变覆盖物背景实例及css颜色值简介
在此鸣谢buptwusuopu的技术支持 在调用百度地图api的时候,为了改变覆盖物的颜色,如图中椭圆型的填充色.可以到百度api的库中查找方法http://developer.baidu.com/m ...
- echarts在数据改变后,折线图并没有全部刷新
在做一个BI项目的时候,图表需要区分国内和国外显示.当前用户所属企业具备国内外权限的时候,展示两条图表,当查看其他企业需要根据选中的企业所具备的权限改变图表.即刚开始显示两条折线图,更改选择条件并重新 ...