cacti学习笔记-lamp环境的安装

 引用http://www.icanwen.cn/article.asp?id=20

安装环境:

  • 所用操作系统 CENTOS 5.3
  • 开发库全选
  • 系统工具全选
  • 安装或升级程序库

 

sudo -s

LANG=C

yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-
 
devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc
 
glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel
 
curl curl-devel openssl openssl-devel

 

 

 

 

 

 

 

 

  • 为了便于初学者系统防火墙及selinux disable

mysql的安装

  1. 添加用户及组:

groupadd mysql useradd -g mysql mysql

 

 

    2.  编译安装:

/configure  --prefix=/usr/local/mysql  --enable-local-infile  --with-charset=gbk
 
--with-extra-charsets=all  --with-low-memory  --with-mysqld-user=mysql        
 
--enable-thread-safe-client                         
 
 make && make install
 
  cd  /usr/local/mysql                               
 
chown –R mysql:mysql .                     
 
./bin/mysql_install_db -–user=mysql
 
chown –R root .                                  
 
chown –R mysql var                           
 
./bin/mysqld_safe –user=mysql &    
 
netstat –nat | grep 3306                    
 
echo “/usr/local/mysql/lib/mysql “ >>/etc/ld.so.conf
 
ldconfig ldconfig –v
 
ln –s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
 
cp /support /mysql.server /etc/init.d/mysqld  
 
chmod 755 /etc/init.d/mysqld
 
cp /support/my-medium.cnf /etc/my-cnf
 
chkconfig –add mysqld
 
chkconfig mysqld on

 

APACHE的安装

  • 编译安装apache
 
./configure --prefix=/usr/local/httpd --enable-so --enable-rewrite -- enable-ssl
 
--with-ssl=/usr/local/openssl --with-zlib --enable-mods- shared=all --enable-
 
track-vars --with-mysql=/usr/local/mysql
 
make && make install
 
echo " /usr/local/httpd/bin/apacheclt start " >> /etc/rc.local
 
/usr/local/httpd/bin/apacheclt start
 
 
 

 

  • vi httpd.conf 添加: 支持php
 
addtype application/x-httpd-php .php
 
 
addtype application/x-httpd-php-source .phps
 
  • 测试apache 是否安装正功
 
netstat –nat | grep 80
 

  PHP的安装

  • 编译安装php
 
./configure --prefix=/usr/local/php --with-config-file-path=/etc
 
--with-apxs2=/usr/local/httpd/bin/apxs
 
--enable-fastcgi --enable-safe-mode
 
--with-zlib --with-bz2
 
--with-freetype-dir
 
--enable-mbstring
 
--with-mysql=/usr/local/mysql
 
 
--with-mysqli=/usr/local/mysql/bin/mysql_config
 
--with-gd --with-libxml-dir
 
--with-png-dir --with-jpeg-dir -- enable-sockets
 
make && make install
 
  •  php测试

vi info.php

 
  vi info.php
<?php
Phpinfo();
?>
 
如能正确获取php的信息就大功告成了! :)

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值