免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1783 | 回复: 0
打印 上一主题 下一主题

LAMP 编译安装基本步骤 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-12-22 18:47 |只看该作者 |倒序浏览
安装mysql
shell>; groupadd mysql
shell>; useradd -g mysql mysql
shell>; cd /usr/local
shell>; tar zxvf mysql.tar.gz
shell>; cd mysql
shell>; ./configure –prefix=/usr/local
shell>;make;make install
shell>; scripts/mysql_install_db --user=mysql
shell>; chown -R root .
shell>; chown -R mysql var
shell>; chgrp -R mysql .
shell>; bin/mysqld_safe --user=mysql &
./bin/mysqladmin -u root password "123456" 基于安全的原因,为root用户设置密码才能让root用户登陆mysql,不然会有2002错误出现
建立启动脚本:
cp ./support-files/mysql.server /etc/init.d/mysql

安装apache
tar -zxvf httpd-2.0.54.tar.gz
cd  httpd-2.0.54.tar.gz
./configure --prefix=/var/www --enable-so 这个选项一定要有
make && make install
建立启动脚本
cp /var/www/bin/apachectl /etc/init.d/httpd
cd /etc/rc3.d
ln -s ../init.d/httpd S85httpd
ln -s ../init.d/httpd K85httpd
安装php
#./configure --prefix=/usr/local
--with-apxs2=/var/www/bin/apxs
--with-config-file-path=/usr/local
--enable-socket
--with-mysql=/usr/local/mysql  
--with-zlib-dir=/usr/include
--with-gd
--enable-mbstring (这个选项一定要有,否则在访问页面的时候会出现mb_ereg()函数未定义的提示)
注意:这些选项是必须的,如果有编译不能通过的情况,请安装相应的包。
#make && make install
cp php.ini-dist /user/local/php.ini
vi /www/conf/httpd.conf
加入:
###############for php and cacti###################
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType image/x-icon .ico
DirectoryIndex index.php index.html index.html.var
#######################over########################
/etc/init.d/httpd  restart
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP