Skip to content

Instantly share code, notes, and snippets.

@ml-edu
Forked from diginfo/jemalloc.sh
Created August 27, 2021 13:00
Show Gist options
  • Save ml-edu/dd5ad4ca9d56efc20ac52c104d61e42c to your computer and use it in GitHub Desktop.
Save ml-edu/dd5ad4ca9d56efc20ac52c104d61e42c to your computer and use it in GitHub Desktop.
Install latest jemalloc & configure mysql - Ubuntu
#!/bin/sh
## Install latest jemalloc & configure mysql - Ubuntu
## bash <(curl -Ls https://gist.github.com/diginfo/be7347e6e6c4f05375c51bca90f220e8/raw/)
##
apt-get -y install autoconf libxslt-dev xsltproc docbook-xsl
git clone https://github.com/jemalloc/jemalloc.git
cd jemalloc
autoconf
./configure
make dist
make install
## /usr/lib/x86_64-linux-gnu/libjemalloc.so.1
echo -e "[mysqld_safe]\nmalloc-lib = /usr/local/lib/libjemalloc.so.2" > /etc/mysql/conf.d/jemalloc.cnf
#systemctl restart mysqld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment