CentOS5快速安装LAMP(10分钟)

yum -y update
yum -y install gcc gcc-c++ autoconf automake libtool libevent libevent-devel gmp gmp-devel
yum -y install gd gd-devel freetype freetype-devel fontconfig fontconfig-devel libjpeg libjpeg-devel zlib zlib-devel pcre pcre-devel
yum -y install ncurses ncurses-devel libmcrypt mhash

yum -y install mysql mysql-server mysql-devel
yum -y install httpd httpd-devel
yum -y install php53*

启动apache
/etc/init.d/httpd restart
启动mysql
/etc/init.d/mysqld restart
编辑一个php测试文件
vi /var/www/html/info.php
加入:
<?php
phpinfo();
?>

现在可以通过http://ip/info.php查看LAMP信息了

设置开机启动
chkconfig httpd on
chkconfig mysqld on

附:如果需要修改的话,那么修改配置文件即可。
附1:mysql配置文件所在位置:
# ls -l /etc/my.cnf
-rw-r–r– 1 root root 441 Nov  4 02:53 /etc/my.cnf
#

附2:apache配置文件所在位置:
# ls -l /etc/httpd/
total 8
drwxr-xr-x 2 root root 4096 Jan 11 07:06 conf
drwxr-xr-x 2 root root 4096 Jan 11 07:03 conf.d
lrwxrwxrwx 1 root root   19 Jan 11 06:53 logs -> ../../var/log/httpd
lrwxrwxrwx 1 root root   27 Jan 11 06:53 modules -> ../../usr/lib/httpd/modules
lrwxrwxrwx 1 root root   13 Jan 11 06:53 run -> ../../var/run
#

附3:php配置文件所在位置:
# ls -l /etc/php.ini
-rw-r–r– 1 root root 45079 Nov 30 00:53 /etc/php.ini

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值