Solaris 10 SPARC机器上装Apache失败

来源:百度知道 编辑:UC知道 时间:2024/06/20 05:19:26
OS:Solaris 10 SPARC
1.先是下载了apache软件“httpd-2.0.63.tar.gz”,解压后,执行“./configure”,报错如下:
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking target system type... sparc-sun-solaris2.10

Configuring Apache Portable Runtime library ...

checking for APR... reconfig
configuring package in srclib/apr now
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking target system type... sparc-sun-solaris2.10
Configuring APR library
Platform: sparc-sun-solaris2.10
checking for working mkdir -p... yes
APR Version: 0.9.17
checking for chosen layout... apr
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log

solaris10本身是带apache的。不知道你是否已经安装上了。另外,GCC也有。只不过,需要加个指定参数。我的也是SPARC,回去我看一下,然后在详细回复。

我的solaris10是完全安装,所以什么都有。但是,安装好像必须自己设定。
我的gcc在/bin/sfw里所以,需要添加个PATH设定。
例如:
添加 $HOME/.profile
PATH=/bin/sfw/bin:/bin:/usr/bin:/usr/ucb:/etc:.
export PATH

此外,make也在一个很特别的地方,你可以搜索一下。

Apache的激活
据说,启动Apache需要/etc/apache2/httpd.conf文件。开始的时候没有,需要用/etc/apache2/httpd-std.conf复制。
其中,确定有

309 user nobody
310 Group nobody

319 ServerAdmin root@mail.....(邮件地址)

333 ServerName www......(自己的网址);80

下面启动
root# svcadm -v enable apache2

root# svcs -a | grep apache2

root# cat /var/run/apache2/httpd.pid

root# ps -ef | grep httpd

root# cat /var/run/apache2/httpd.pid

后面的一些命令好像是用来测试的。

然后用http://localhost/