- create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf
- edit /etc/redis-xxx.conf, illustrated as below
...
#!/bin/bash | |
## | |
# Adopted and edited from the solution by Evgeny at askbot.org | |
# http://askbot.org/en/question/2492/how-to-install-python-easy_install-python-distutils-in-root-or-non-root-account/ | |
# and instruction provided by authors of setuptools. | |
# https://pypi.python.org/pypi/setuptools | |
# | |
# Please be noticed that the virtual environment directory was set to ~/.pyvenv | |
# you might want to change it. |
#!/bin/bash | |
echo "PYTHONPATH=~.pyvenv/lib/python3.3/site-packages" >> ~/.bashrc | |
echo "export PYTHONPATH" >> ~/.bashrc | |
echo "PATH=~/.local/bin/:$PATH" >> ~/.bashrc | |
echo "export PATH" >> ~/.bashrc | |
echo "alias pipu='~/.local/bin/pip3 install --user'" >> ~/.bashrc |
# mongod.conf | |
# for documentation of all options, see: | |
# http://docs.mongodb.org/manual/reference/configuration-options/ | |
# Where and how to store data. | |
storage: | |
dbPath: /mongodb | |
journal: | |
enabled: true |
sudo mkdir /D | |
sudo chown $USER:$USER /D | |
mkdir /D/git | |
# packages and dependencies | |
sudo apt-get update | |
sudo apt-get install -y build-essential gfortran cmake | |
sudo apt-get install -y libtool libblas-dev liblapack-dev libhdf5-dev libzmq-dev libxml2-dev | |
sudo apt-get install -y autoconf automake uuid-dev pkg-config alien | |
sudo apt-get install -y python3-dev python3-pip |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list | |
sudo apt-get update | |
sudo apt-get install -y python3-pip | |
sudo apt-get install -y mongodb-org | |
sudo apt-get install -y nodejs nodejs-legacy | |
sudo pip3 install mysqlclient dataset | |
sudo pip3 install pymongo | |
sudo pip3 install twitter birdy |
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |
$ cp /etc/redis.conf /etc/redis-xxx.conf
...
# prepare celery worker | |
sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime | |
# for msgpack 0.4+ in python3, see http://neuro.debian.net/pkgs/python3-msgpack.html | |
### Ubuntu 14.04 | |
# wget -O- http://neuro.debian.net/lists/trusty.us-ca.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list | |
# sudo apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 0xA5D32F012649A5A9 | |
### Ubuntu 16.04 | |
wget -O- http://neuro.debian.net/lists/xenial.us-ca.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list | |
sudo apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 0xA5D32F012649A5A9 |
# install current version | |
echo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list | |
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install rabbitmq-server | |
# enable web interface | |
rabbitmq-plugins enable rabbitmq_management | |
# create admin account, guest/guest doesn't seem to work |
# http://tqdev.com/2016-installing-adminer-ubuntu | |
# http://askubuntu.com/questions/760787/php-rendered-as-text-after-ubuntu-16-04-upgrade | |
sudo apt install apache2 libapache2-mod-php | |
sudo a2enmod php7.0 | |
sudo a2dismod mpm_event | |
sudo a2enmod mpm_prefork | |
sudo mkdir /usr/share/adminer | |
sudo wget "http://www.adminer.org/latest.php" -O /usr/share/adminer/latest.php | |
sudo ln -s /usr/share/adminer/latest.php /usr/share/adminer/adminer.php |