centos 6.7 lamp

來源:互聯網
上載者:User

標籤:centos lamp

#!/bin/bash
yum -y install gcc-c++ library ncurses-devel libxml2-devel libtomcrypt-devel libtool libtool-ltdl-devel bzip2-devel
cd /tmp&&tar -zxf httpd-2.2.11.tar.gz&&cd httpd-2.2.11&&./configure --prefix=/usr/local/apache  -with-included-apr --with-pcre --enable-mods-shared=moost
make &&make install
if [ $? -eq 0 ];then
  echo "/usr/local/apache/bin/apachectl restart" >> /etc/rc.d/rc.local
 /usr/local/apache/bin/apachectl restart
else
 echo "apache compile instal error"
 exit 1
fi
useradd -M -s /sbin/nologin mysql
cd /tmp/&&tar -zxf mysql-5.1.55.tar.gz&&cd mysql-5.1.55&& ./configure --prefix=/usr/local/mysql --with-charset-utf8   --with-extra-charsets=gbk,gb2312
make &&make install
if [ $? -eq 0 ];then
 yes|cp -r support-files/my-medium.cnf /etc/my.cnf
        yes|cp -f support-files/mysql.server /etc/init.d/mysqld
 chkconfig --add mysqld
        chmod 755 /etc/init.d/mysqld
        ln -s /usr/local/mysql/bin/* /bin
else
 echo "mysql compile install error"
 exit 1
fi
if [ -e /usr/local/mysql/bin/mysql_install_db ];then
        /usr/local/mysql/bin/mysql_install_db --user=mysql
else
        echo "chu shi hua shi bai"
        exit
fi
chown -R root:mysql /usr/local/mysql/
chown -R mysql /usr/local/mysql/var/
echo "/etc/init.d/mysqld restart" >> /etc/rc.d/rc.local
/etc/init.d/mysqld restart
echo "install php please waiting"
cd /tmp/&&tar -zxf php-5.3.6.tar.gz&&cd php-5.3.6&&./configure  --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs  --with-mysql=/usr/local/mysql/ --with-libxml-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2  --enable-soap  --enable-mbstring --enable-sockets --enable-exif --disable-ipv6
make&&make install
if [ $? -eq 0 ];then
 echo "php compile ok"
 yes|cp -f /tmp/httpd.conf /usr/local/apache/conf/
 /usr/local/apache/bin/apachectl restart
else
 echo "php compile error"
 exit 1
fi
#yes|cp -f /tmp/httpd.conf /usr/local/apache/conf/
#/usr/local/apache/bin/apachectl restart
##AddType application/x-httpd-php .php .phtml   添加對“.php”類型網頁支援
##DirectoryIndex index.php index.html 識別常見的php首頁檔案
#<?php
#phpinfo (); 
#?>
#curl 192.168.9.122/index.php
#iptables -X -F

centos 6.7 lamp

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.