手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

RHEL6.4 源码包编译安装LAMP环境

[日期:2014-05-03] 来源:Linux社区  作者:jinjianjun [字体:大 中 小]

一,编译安装httpd

1.安装软件包

# tar zxf httpd-2.2.25.tar.gz

# cd httpd-2.2.25

# ./configure  --prefix=/usr/local/httpd  --enable-so  --enable-rewrite  --enable-cgi  --enable-ssl  --enable-charset-lite

--------------------------------------分割线 --------------------------------------

Ubuntu 13.04 安装 LAMP\Vsftpd\Webmin\phpMyAdmin 服务及设置 http://www.linuxidc.com/Linux/2013-06/86250.htm

CentOS 5.9下编译安装LAMP(Apache 2.2.44+MySQL 5.6.10+PHP 5.4.12) http://www.linuxidc.com/Linux/2013-03/80333p3.htm

RedHat 5.4下Web服务器架构之源码构建LAMP环境及应用PHPWind http://www.linuxidc.com/Linux/2012-10/72484p2.htm

LAMP源码环境搭建WEB服务器Linux+Apache+MySQL+PHP http://www.linuxidc.com/Linux/2013-05/84882.htm

LAMP+Xcache 环境搭建 http://www.linuxidc.com/Linux/2014-05/101087.htm

--------------------------------------分割线 --------------------------------------


配置参数用途:

--prefix=:指定安装目录

--enable-so:支持动态加载模块

--enable-rewrite :支持网站地址重写

--enable-cgi:支持CGI程序脚本

--enable-ssl:支持SSL加密

--enable-charset-lite:支持多语言编码

 


配置错误提示:


no SSL-C headers found

configure: error: ...No recognized SSL/TLS toolkit detected

安装相应库文件

# yum -y install openssl-devel

# ./configure  --prefix=/usr/local/httpd  --enable-so  --enable-rewrite  --enable-cgi  --enable-ssl  --enable-charset-lite

# make && make install

 


2.建立服务脚本

# cd /usr/local/httpd/bin/

# cp apachectl /etc/init.d/httpd

# vim /etc/init.d/httpd

#!/bin/sh

# chkconfig: 2345 85 35

# description:Apache is a world wide web server

……

# chkconfig --add httpd

# chkconfig --list httpd

httpd        0:off1:off2:on3:on4:on5:on6:off

 


3.修改主配置文件及启动服务

# vim /usr/local/httpd/conf/httpd.conf

ServerName www.linuxidc.com:80

# service httpd start

[root@client bin]# netstat -ln | grep :80

tcp        0      0 :::80                      :::*                        LISTEN     

 

 

 

二.编译安装mysql

1. 添加运行用户

# useradd -M -u 49 -s /sbin/nologin mysql

 


2.安装软件包

# tar zxf mysql-5.1.62.tar.gz

# cd mysql-5.1.62

# ./configure  --prefix=/usr/local/mysql --with-charset=utf8  --with-collation=utf8_general_ci  --with-extra-charsets=gbk,gb2312

 


配置参数用途:

--prefix=:指定安装目录

--with-charset=utf8:指定默认字符集

--with-collation=utf8_general_ci:指定默认的校对规则集

--with-extra-charsets=gbk,gb2312:设置支持的其他字符集

 


配置错误信息:

checking for termcap functions library... configure: error: No curses/termcap library found

安装库文件

# yum -y install ncurses-devel libtermcap-devel

 


# ./configure  --prefix=/usr/local/mysql --with-charset=utf8  --with-collation=utf8_general_ci  --with-extra-charsets=gbk,gb2312

# make && make install

编译错误信息:

../depcomp: line 571: exec: g++: not found

make[1]: *** [my_new.o] Error 127

make[1]: Leaving directory `/root/Desktop/mysql-5.1.62/mysys'

make: *** [all-recursive] Error 1

 


# yum -y install gcc gcc-c++  //需要安装软件


再重新配置编译安装

 

更多详情见请继续阅读下一页的精彩内容: http://www.linuxidc.com/Linux/2014-05/101171p2.htm

linux
相关资讯       lamp  源码安装LAMP 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款