install_bind.sh

#!/bin/bash

cd /root

lftp 'soft':'test&soft&good'@ftp_ip<

pget -n 40 bind-9.4.3_leo_intelligence.tar.bz2

pget -n 40 mysql-5.0.67.tar.gz

bye

EOF

 

tar -C /usr/local/src -jxvf bind-9.4.3_leo_intelligence.tar.bz2

tar -C /usr/local/src -zxvf mysql-5.0.67.tar.gz

cd /usr/local/src/mysql-5.0.67

userdel mysql

groupadd mysql

useradd mysql -d /usr/local/mysql -g mysql

mkdir -p /usr/local/mysql/data

mkdir -p /usr/local/mysql/tmp

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

if [ ` getconf  LONG_BIT` == 32 ];then

CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors  -fno-exceptions -fno-rtti"

./configure '--prefix=/usr/local/mysql' '--with-unix-socket-path=/tmp/mysql.sock' '--localstatedir=/usr/local/mysql/data' '--with-mysqld-user=mysql' '--without-debug' '--with-big-tables' '--with-charset=utf8' '--with-extra-charsets=all' '--with-pthread' '--enable-thread-safe-client' '--enable-assembler' '--without-ndb-debug--with-innodb' '--with-archive-storage-engine' '--with-client-ldflags=-all-static' '--with-readline' '--enable-local-infile'

make&&make install

else

CFLAGS="-O6 -funroll-loops -Wall -W -mtune=nocona -mcpu=nocona -march=nocona -mfpmath=sse -pipe -fomit-frame-pointer -msse2 -mmmx -m64 -march=x86-64" 

CXXFLAGS="-O6 -funroll-loops -Wall -W -mtune=nocona -mcpu=nocona -march=nocona -mfpmath=sse -pipe -fomit-frame-pointer -msse2 -mmmx -m64 -march=x86-64" 

 

CXX=gcc 

CFLAGS="-DDBUG_OFF -O6 -funroll-loops -Wall -W -mtune=nocona -mcpu=nocona -march=nocona -mfpmath=sse -pipe -fomit-frame-pointer -msse2 -mmmx -m64 -march=x86-64" 

 

CXXFLAGS="-DDBUG_OFF -O6 -funroll-loops -Wall -W -mtune=nocona -mcpu=nocona -march=nocona -mfpmath=sse -pipe -fomit-frame-pointer -msse2 -mmmx -m64 -march=x86-64 -fno-implicit-templates -fno-exceptions -fno-rtti"

 

./configure '--prefix=/usr/local/mysql' '--with-unix-socket-path=/tmp/mysql.sock' '--localstatedir=/usr/local/mysql/data' '--with-mysqld-user=mysql' '--without-debug' '--with-big-tables' '--with-charset=utf8' '--with-extra-charsets=all' '--with-pthread' '--enable-thread-safe-client' '--enable-assembler' '--without-ndb-debug--with-innodb' '--with-archive-storage-engine' '--with-client-ldflags=-all-static' '--with-readline' '--enable-local-infile'

make&&make install

fi

 

./scripts/mysql_install_db --datadir=/usr/local/mysql/data --user=mysql

 

mv  /etc/my.cnf /etc/my.cnf.bak

mv /usr/bin/mysql /usr/bin/mysql.bak

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

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

cd /usr/local/src/bind-9.4.3_leo_intelligence

 

./configure '--enable-epoll' '--with-dlz-mysql=/usr/local/mysql' '--enable-threads=no' '--prefix=/fgn/services/mydns1212'

make&&make install

/fgn/services/mydns/sbin/rndc-confgen -a

echo "All done!"

exit 0

 

./configure \

        --prefix=/usr/local/mysql \

        --with-unix-socket-path=/tmp/mysql.sock \

        --with-mysqld-user=mysql \

        --without-debug \

        --with-client-ldflags=-all-static \

        --with-mysqld-ldflags=-all-static \

        --disable-shared \

        --localstatedir=/usr/local/mysql/var \

        --with-extra-charsets=all \

        --enable-assembler

你可能感兴趣的:(install_bind.sh)