Skip to content

Instantly share code, notes, and snippets.

@diginfo
Last active August 14, 2023 17:51
Show Gist options
  • Save diginfo/be7347e6e6c4f05375c51bca90f220e8 to your computer and use it in GitHub Desktop.
Save diginfo/be7347e6e6c4f05375c51bca90f220e8 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
@englianhu
Copy link

sudo apt-get -y install autoconf libxslt-dev xsltproc docbook-xsl
git clone https://github.com/jemalloc/jemalloc.git
cd jemalloc
autoconf
./configure
make dist
sudo make install
sudo echo -e "[mysqld_safe]\nmalloc-lib
 = /usr/local/lib/libjemalloc.so.2" > sudo /etc/mysql/conf.d/jemalloc.cnf

installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment