artistsgerma.blogg.se

Setting up aws email server
Setting up aws email server










  1. Setting up aws email server install#
  2. Setting up aws email server download#

Note: what you name this file will effect how you refer to this application sudo service uwsgi restart so maybe you want to name your process nf or nf…

setting up aws email server

Lastly, create an init script to daemonize this vhost sudo nano /etc/init/nf and add the following: # file: /etc/init/nfĮxec /usr/local/bin/uwsgi -home /home/ubuntu/web//app/ -socket /home/ubuntu/web//uwsgi.sock -chmod-socket -module wsgi -pythonpath /home/ubuntu/web// -H /home/ubuntu/web//venv Note: this is also where you would add the newrelic application wrapper environ = '.settings' application = django. Next, create a wsgi.py file for this vhost nano /home/ubuntu/web//wsgi.py Add the following: import os, sys, site, SITE_DIR = '/home/ubuntu/web//app/' site.

Setting up aws email server install#

Many thanks to this blogpost for the upstart script help.įirst, install uwsgi globally: sudo pip install uwsgi. I was using gunicorn for a my apps until I got a good look at some of the performance /benefits of uWSGI. sudo apt-get build-dep python-imaging & sudo ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/ & sudo ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/ & sudo ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/ UWSGI Note: If you use the Python Image Library(PIL) install it’s dependencies so that when PIL is installed support for jpeg, png etc is already there. This is necessary regardless of where the MySQL server resides. Note: If your app uses mysql as a database backend, run sudo apt-get install libmysqlclient-dev BEFORE you pip install mysql-python.

  • cd /home/ubuntu/web//app & pip install -r requirements.txt.
  • activate the virtualenv source /home/ubuntu/web//venv/bin/activate.
  • run the command git pull origin master to bring your remote project local.
  • add a remote origin for this repo cd /home/ubuntu/web//app & git remote add origin :Y/X.git.
  • On, go to the Settings > Deploy Keys page and paste the ssh public key into the Key field and name it appropriately. cat ~/.ssh/id_rsa.pub and then copy the output to your clipboard. Note: don’t forget to add your public key as a deploy key on github for the repo.
  • initialize your first vhost’s git repo: cd /home/ubuntu/web//app & git init.
  • git config -global user.name "AWS Server".
  • cd /home/ubuntu/web// & virtualenv -no-site-packages venv.
  • sudo aptitude install python-setuptools.
  • setting up aws email server

  • install python headers sudo aptitude install python2.7-dev.
  • Sudo nano /etc/apt/sources.list and uncomment the multiverse lines that look like the following and then save.ĭeb-src precise multiverse deb precise-updates multiverse deb-src precise-updates multiverse
  • sudo cp /etc/apt/sources.list /etc/apt/ backup sources list.
  • Install Packages Enabling ubuntu’s Multiverse
  • mkdir ~/web//media/ location of user uploaded media.
  • mkdir ~/web//static/ location of static assets for collectstatic.
  • mkdir ~/web//app/ location where the project’s git will be initialized.
  • mkdir ~/web// name the vhost appropriately (usually for me OR ).
  • mkdir ~/web/ web is where the applications (vhosts) will live.
  • Set up the directories to run your applications Run sudo passwd ubuntu and follow the steps to change the default user’s password. Now wait for the DNS to propagate Configure your server SSH Go to your DNS management console where the domain is registered and create an A record pointing the domain to the EIP Domain | Type | EIP
  • Select the EC2 instance you created in the step prior and click “Yes, Allocate”.ĭo you have a domain you want to point to this IP?.
  • Select the New EIP by clicking the checkbox next to it and click “Associate Address” at the top of the page.
  • For “EIP used in” select “EC2” and click “Yes, Allocate”.
  • At the top of the page click “Allocate New Address”.
  • setting up aws email server

  • Under “NETWORK & SECURITY” click on “Elastic IPs”.
  • Navigate to the EC2 management console.
  • For “Group Description” enter “Anyone Collaborating”.
  • Setting up aws email server download#

  • Click the “Create and Download Key Pair” link and note where this saves to on your computer (this is your.
  • setting up aws email server

  • Under Create a new Key Pair, enter the same value as you used in your “Name” K/V in the last step.
  • Add a Key “Stack” with a value that describes the application stack “django, MySQL, nginx”.
  • Add a Key “Name” with a value describing the app/apps that will be living on this server.
  • Under “Storage Device Configuration” leave all options defaulted and click Continue.
  • Under “Advanced Instance Options” leave all options defaulted and click Continue.
  • Make sure that the number of Instances is set to “1” and that instance Type is set to “T1 Micro” and click Continue.
  • Choose “Ubuntu Server 12.04.1 LTS” AMI and click continue.
  • Select “Classic Wizard” and then click continue. Log into your AWS panel and navigate into the EC2 management console.Ĭlick “Launch Instance”. Getting an ubuntu server set up on AWS EC2 Setup












    Setting up aws email server