继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

Install LAMP in RHEL4

largeQ
关注TA
已关注
手记 978
粉丝 92
获赞 585


#!/bin/sh

#Install LAMP in RHEL4

INSTALL_DIR=`pwd`

tar -zxf httpd-2.2.13.tar.gz;

cd httpd-2.2.13;

./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite;

make;

make install;

cd $INSTALL_DIR

tar -zxf mysql-5.1.37-linux-i686-glibc23.tar.gz -C /usr/local

rm -rf /etc/my.cnf

cd /usr/local

ln -s mysql-5.1.37-linux-i686-glibc23 mysql

adduser mysql

cd /usr/local/mysql

./scripts/mysql_install_db

chown -R mysql.mysql /usr/local/mysql-5.1.37-linux-i686-glibc23

./bin/mysqld_safe --user=mysql & > /dev/null

cd $INSTALL_DIR

tar -zxf php-5.3.0.tar.gz

cd php-5.3.0

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php;make;make install;

cp php.ini-production /usr/local/php/php.ini

cd $INSTALL_DIR

echo "AddType application/x-httpd-php .php" >> /usr/local/apache2/conf/httpd.conf

echo "DirectoryIndex index.php" >> /usr/local/apache2/conf/httpd.conf

killall -9 httpd

/usr/local/apache2/bin/apachectl start

 

 

首先将LNS-C5-LAMP.zip文件放入你想用的linux系统中

然后执行下列步骤:

1. unzip LNS-C5-LAMP.zip

2. cd LNS-C5-LAMP

3. sh install.sh

等待结束。Apache+Mysql+PHP环境就装好了

要想看如何安装的。vi install里面写的很清楚

 

©著作权归作者所有:来自51CTO博客作者makewong的原创作品,谢绝转载,否则将追究法律责任

职场休闲Redhat从入门到精通

0


打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP