查看: 723|回复: 0

RioTboard·····web服务器的配置之安装Apache

[复制链接]
  • TA的每日心情
    无聊
    2022-4-28 09:50
  • 签到天数: 443 天

    连续签到: 1 天

    [LV.9]以坛为家II

    发表于 2014-10-25 21:22:00 | 显示全部楼层 |阅读模式
    分享到:
    Apache据说是世界使用排名第一的web服务器。关于Apache服务器的优点大家可以自己百度哈。我现在想在Rio板子上安装配置Apache服务器。用于后面将web程序放进去运行。
         下载Apache的网址https://www.apache.org https://mirrors.hust.edu.cn/apache//httpd/httpd-2.4.9.tar.bz2
       将下载到的httpd-2.4.9.tar.bz2 放进Rio的系统中。 我是将其放在目录/usr/local/src 下
    1、从终端cd到该目录,输入指令#tar jxvf httpd-2.4.9.tar.bz2 解压 得到目录 httpd-2.4.9
    2、使用configure命令配置httpd
    输入#./configure --prefix=/usr/local/httpd-2.4.9 出现报错:

    意思是缺少APR (Apache Portable Runtime library)
    从网址https://apache.fayea.com/apache-mirror//apr/apr-1.5.1.tar.gz 和https://apache.fayea.com/apache-mirror//apr/apr-util-1.5.3.tar.gz 下载apr和apr-util。然后解压缩到/usr/local/src/httpd-2.4.9/srclib目录中   
    并将解压缩得到的目录apr-1.5.1 apr-util-1.5.3 重新命名为apr 和apr-util。
    使用#mv apr-1.5.1 apr      #mv apr-util-1.5.3 apr-util

    3、带上--with-included-apr选项重新配置httpd。
    #./configure --prefix=/usr/local/httpd-2.4.9 --with-included-apr
    结果还是报错:

    这次是缺少PCRE(Perl Compatible Regular Expressions)
    解决方法是# apt-get install libpcre3 libpcre3-dev
    4、配置、编译和安装httpd
    #./configure --prefix=/usr/local/httpd-2.4.9 --with-included-apr
    #make
    #make install
    5、配置apache服务、启动。
    #cd /etc/init.d
    # ln -s /usr/local/httpd-2.4.9/bin/apachectl
    #/etc/init.d/apachectl start
    # update-rc.d apachectl defaults   (配置每次开机时自动启动apache服务) 6、 服务启动成功,在Rio系统中,打开搜狐浏览器输入https://127.0.0.1/      或者 https://localhost

    用其他电脑浏览器,输入https://192.168.1.133/           (此IP地址为RIo板子Ubuntu系统的IP地址)
    回复

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /2 下一条

    手机版|小黑屋|与非网

    GMT+8, 2024-3-29 13:26 , Processed in 0.115456 second(s), 17 queries , MemCache On.

    ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

    苏公网安备 32059002001037号

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.