Nginx+uwsgi+django deployed in Ubuntu

Source: Internet
Author: User

1. Installing Nginx
sudo apt-get install Nginx

View process after installation is complete

PS Aux|grep Nginx

Below to visit Nginx, first with the ifconfig command to obtain the IP address of the server, and then enter the IP address in the browser, as shown, Nginx boot success

2. Install MySQL

Read more about MySQL installation reference prior to the article written: http://www.cnblogs.com/0bug/p/8655363.html

Here to explain the installation of Ubuntu Mysql-server

sudo apt-get install Mysql-server

Enter Y to continue, and the following prompt will appear, set a password for the root user, follow the prompts to set the password to complete the installation, and start.

After the MySQL installation is complete, check to see if it starts:

PS Aux|grep MySQL

As you can see, the MySQL service mysqld has been started and can be used by mysql-uroot-p to use MySQL

If you want to use other machines to link your msyql with an IP address, then configure it as follows (this step is not required and is not recommended for native deployment)

1. Bind-address in configuration mysqld.cnf changed from 127.0.0.1 to 0.0.0.0

sudo vim/etc/mysql/mysql.conf.d/mysqld.cnf

2. The MySQL service needs to be restarted after the configuration is complete

sudo service MySQL restart

3. If you need any machine to access the MySQL, then you need to make permission changes (you can also use the way to change the table)

Mode 1

GRANT all privileges on * * to ' root ' @ '% ' identified by ' passwd123 ' with GRANT OPTION; FLUSH privileges;

Mode 2

Update user set host= '% ' where user= ' root ' and host= ' localhost ';

By completing these configurations, you can access MySQL on any machine via the MySQL host's IP address and MySQL root account

3.virtualenv and Virtualenvwrapper configuring Python virtual Environments

Python default version configuration reference here: http://www.cnblogs.com/0bug/p/8598273.html

Configuration reference for Virtualenv and virtualenvwrapper here: http://www.cnblogs.com/0bug/p/8598458.html

Nginx+uwsgi+django deployed in Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.