在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,先下载了然 ...
随机推荐
- luoguP2303 [SDOI2012]Longge的问题 化式子
求\(\sum \limits_{i = 1}^n gcd(i, n)\) \(\sum \limits_{i = 1}^n gcd(i, n)\) \(=\sum \limits_{i = 1}^n ...
- BZOJ 2843: 极地旅行社 lct splay
http://www.lydsy.com/JudgeOnline/problem.php?id=2843 https://blog.csdn.net/clove_unique/article/deta ...
- 慎用 new、delete
C++ STL 为我们提供了一套容器.在多数情况下,这套容器已足够让我们使用.所以,需要我们自己去用 new/new []/delete/delete [] 来管理内存的必要性并不是很大.此外,自己管 ...
- HTTP首部字段
HTTP首部由首部字段名和首部字段值组成,以逗号隔开.如果首部出现重复,有些浏览器优先处理第一个出现的首部,有些优先处理后者. 主要分为四大类 通用首部字段 请求首部字段 响应首部字段 实体首部字段 ...
- [Cocos2dx] CCCamera照相机 详解
前言 在3D游戏当中,我们经常会使用到照相机这个东西,无论你使用的是哪一款引擎,都会用到,同时,照相机这个东西涉及到的东西比较多,基础知识需要扎实一些才可以. 如何使用 很久之前做项目的时候用到过一次 ...
- Mysql show indexes 查看索引状态
查看表中有哪些已建立的索引 SHOW INDEX FROM tbl_name [FROM db_name] SHOW INDEX会返回以下字段: | Table | Non_unique | Key ...
- ROS知识(19)----写一个简单的pluginlib例子
参考资料: 官方教程:Writing and Using a Simple Plugin
- Spring源码解析 – @Configuration配置类及注解Bean的解析
在分析Spring 容器创建过程时,我们知道容器默认会加载一些后置处理器PostPRocessor,以AnnotationConfigApplicationContext为例,在构造函数中初始化rea ...
- 传智播客PHP面试题宝典开放下载
上下卷面试题更新完毕,一部让菜鸟4k+入职的 面试题宝典 http://php.itcast.cn/news/20130806/11490333788.shtml php视频教程 下载 http:// ...
- ios项目开发(天气预报项目):使用正则获取 weather.com.cn站点信息
NSString *pattern = @"(?<=<td class=\"bigblod\">).*?(?=</td>)"; 2 ...