评论

收藏

[MySQL] Install LAMP in RHEL4

数据库 数据库 发布于:2021-07-04 13:59 | 阅读数:543 | 评论:0

  #!/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里面写的很清楚

  
关注下面的标签,发现更多相似文章