Created
June 9, 2015 02:25
-
-
Save jeremyjbowers/88a3c0e1d8028563af87 to your computer and use it in GitHub Desktop.
Getting ES running is hard. Here are some notes in the form of shell scripts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get -y upgrade | |
apt-get -y install openjdk-7-jre python python-pip python2.7-dev python2.7 git nginx-full varnish | |
cd /tmp | |
sudo mkfs.ext4 /dev/xvdb | |
sudo mount /mnt | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.2.deb | |
dpkg -i elasticsearch-1.4.2.deb | |
mkdir -p /mnt/elasticsearch/data /mnt/elasticsearch/logs | |
chown -R elasticsearch:elasticsearch /mnt/elasticsearch | |
echo 'ES_HEAP_SIZE=6g' >> /etc/default/elasticsearch | |
echo 'cluster.name: YOURCLUSTERNAME | |
bootstrap.mlockall: true | |
discovery.zen.ping.multicast.enabled: false | |
path.data: /mnt/elasticsearch/data | |
path.logs: /mnt/elasticsearch/logs | |
node.data: false | |
node.client: true | |
' >> /etc/elasticsearch/elasticsearch.yml | |
sudo start-stop-daemon --start -b --user elasticsearch -c elasticsearch --pidfile /var/run/elasticsearch.pid --exec /usr/share/elasticsearch/bin/elasticsearch -- -d -p /var/run/elasticsearch.pid -Des.default.config=/etc/elasticsearch/elasticsearch.yml -Des.default.path.home=/usr/share/elasticsearch -Des.default.path.logs=/var/log/elasticsearch -Des.default.path.data=/var/lib/elasticsearch -Des.default.path.work=/tmp/elasticsearch -Des.default.path.conf=/etc/elasticsearch | |
update-rc.d elasticsearch defaults 95 10 | |
sudo /etc/init.d/elasticsearch start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment