Skip to content

Instantly share code, notes, and snippets.

@fire9
Created August 8, 2012 08:19
Show Gist options
  • Save fire9/3293371 to your computer and use it in GitHub Desktop.
Save fire9/3293371 to your computer and use it in GitHub Desktop.
Setup MySQL
$ wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.0.1.tar.gz
$ wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz
$ tar zxvf libunwind-1.0.1.tar.gz && cd libunwind-1.0.1
$ CFLAGS=-fPIC ./configure
$ make CFLAGS=-fPIC
$ sudo make CFLAGS=-fPIC install
$ cd ..
$ tar zxvf gperftools-2.0.tar.gz
$ cd gperftools-2.0/
$ ./configure && make
$ sudo make install
$ sudo echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf
$ sudo cp /usr/local/lib/libtcmalloc.so /usr/lib64/libtcmalloc.so
$ sudo /sbin/ldconfig
$ sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
$ sudo gpg -a --export CD2EFD2A | sudo apt-key add -
$ sudo vi /etc/apt/source.list
deb http://repo.percona.com/apt lucid main
deb-src http://repo.percona.com/apt lucid main
$ sudo apt-get update
$ sudo apt-get install percona-server-server-5.5 percona-server-client-5.5
$ sudo vi /usr/bin/mysqld_safe
export LD_PRELOAD=/usr/lib64/libtcmalloc.so
$ sudo /etc/init.d/mysql restart
chekck tcmalloc status
$ sudo /usr/sbin/lsof -n | grep tcmalloc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment