[PYTHON] A memorandum when Django is installed on Sakura's rental server (standard plan)

This is a memorandum when Django is installed on Sakura's rental server (standard plan).

The default shell of Sakura's rental server is csh, but it is set to bash.

_Caution (additional note): _ It is possible to install Django itself, but since it is a rental server in the first place, I ranserver with the nohup command etc. and tried to see if it continued to work even after logging out, but the process was dropped because it was immediately regarded as deamon. .. I don't think it's a problem for trial use, but if you want it to stay running after you log out, it's better to use VPS obediently.

install pip

Insert pip by referring to here.

On Sakura's rental server, there is a .local directory in $ HOME, and it seems that you can put python related modules in it. (Because it is a rental server, you do not have root privileges.) easy_install is already in .local / bin, so you can install it without DL.

easy_install --prefix=~/.local pip

Add the path to $ HOME / .local / bin to your .bashrc.

export $HOME/.local/bin:/usr/sbin:/sbin:$PATH

Check if the path passes normally.

pip --version

However, note that you must add the --user option when doing [pip install]. ](Http://temprura.jp/memo/Sakura Server /) I didn't notice this and was addicted to it.

Install virtualenv and virtualenvwrapper

It is not essential, but it is better to be able to switch the environment easily, so Install virtualenv, virtualenvwrapper.

** You need to add the --user option to pip install if you are not in a virtual environment, but not in a virtual environment. ** **

Install Django

pip install Django

With that, I was able to install Django fairly easily.

Recommended Posts

A memorandum when Django is installed on Sakura's rental server (standard plan)
What I did when I stumbled on a Django tutorial
Run CGI written in python on Sakura's rental server
Stray build of Python 3 on Sakura's rental server (Note)
A memo when Django was released on VPS (preparation)
How to run Django on IIS on a Windows server
[Django] A memorandum when you want to communicate asynchronously [Python3]
[GCP] A memorandum when running a Python program on Cloud Functions
[Introduction to AWS] A memorandum of building a web server on AWS
Determine if standard output is piped when running a Python script
Memorandum of understanding when Python is run on EC2 with Apache
A memo for when pip3 is installed with python2.7 for some reason
What I stumbled upon when using CodeIgniter on a Linux server