centos 6.5 lnmp

來源:互聯網
上載者:User

標籤:centos 6.5 lnmp


#!/bin/bash

echo "install nginx   please waiting"

useradd -M -s /sbin/nologin nginx

yum -y install gcc-c++ zlib-devel pcre-devel ncurses-devel libxml2-devel openssl-devel bzip2-devel

cd /tmp &&tar xf nginx-1.9.3.tar.gz &&cd nginx-1.9.3/ &&./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module

make && make install

if [ $? -eq 0 ];then

echo "/usr/local/nginx/sbin/nginx" >> /etc/rc.d/rc.local &&/usr/local/nginx/sbin/nginx

else

echo "install nginx shibai"

exit

fi

echo "install mysql please waiting"

useradd -M -s /sbin/nologin mysql

cd /tmp/ &&tar xf mysql-5.1.55.tar.gz &&cd mysql-5.1.55 &&./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=gbk,gb2312

if [ $? -eq 0 ];then

make &&make install

echo "ok"

else

echo "install mysql shibai"

exit

fi

yes|cp -f support-files/my-medium.cnf /etc/my.cnf

yes|cp -f support-files/mysql.server /etc/init.d/mysqld

if [ $? -eq 0 ];then

chkconfig --add mysqld

chmod 755 /etc/init.d/mysqld

ln -s /usr/local/mysql/bin/* /bin

else

echo "tianjia --add shibai"

exit

fi

if [ -e /usr/local/mysql/bin/mysql_install_db ];then

/usr/local/mysql/bin/mysql_install_db --user=mysql

else

echo "chushihua shibai"

exit

fi

chown -R root:mysql /usr/local/mysql/

chown -R mysql /usr/local/mysql/var/

/etc/init.d/mysqld start

echo "/etc/init.d/mysqld restart" >> /etc/rc.d/rc.local

echo "install php please waiting"

cd /tmp &&tar xf php-5.3.6.tar.gz &&cd php-5.3.6/ &&./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-libxml-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-config-file-path=/usr/local/php --enable-soap --enable-mbstring --enable-sockets --enable-exif --disable-ipv6 --enable-fpm

if [ $? -eq 0 ];then

make &&make install

else

echo "install php shibai"

exit

fi

if [ -e /usr/local/php/php.ini ];then

echo "file cunzai ok"

else

yes|cp /tmp/php-5.3.6/php.ini-development  /usr/local/php/php.ini

fi

yes|cp -f /tmp/php-fpm.conf /usr/local/php/etc/php-fpm.conf

echo "/usr/local/php/sbin/php-fpm" >> /etc/rc.d/rc.local

/usr/local/php/sbin/php-fpm


centos 6.5 lnmp

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.