I am a beginner in programming languages. Therefore, I think there are some misreading and lack of understanding. In that case, I would appreciate it if you could let me know in the comments.
The "goal" wants to go as far as deploying a pre-created Python web application. I will write for beginners as much as possible.
Creation procedure
update pip3
$ sudo -H pip3 install --upgrade pip
Install virtualenv with pip3
$ sudo -H pip3 install virtualenv
apt-install git with get
$ sudo apt-get install git
$ git --version
The'virtual environment name'that creates the virtual environment can be anything, and if you haven't decided, you should use python3.
$virtualenv ‘Virtual environment name’
Activate the virtual environment
$source ‘Virtual environment name’/bin/activate
#When the virtual environment is activated, the name of the virtual environment prompts($Or#Mark)It is displayed on the left side of.
(‘Virtual environment name’) $
Example.When the virtual environment name is python3
python3$
As a premise, we will proceed assuming that the impression environment name is (python3).
Install various things
(python3) $ pip install django gunicorn psycopg2 psycopg2-binary Pillow
Move to the folder to put the key
$cd ~/.ssh
Generate key(Please enter without worrying about everything and proceed)
Then id_rsa and id_rsa.Two keys for the pub are generated.
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/(username)/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
id with ls command_rsa id_rsa.Confirm that pub is created
$ ls
id with cat command_rsa.Copy everything in the pub
$ cat id_rsa.pub
Then jump to this URL. https://github.com/settings/ssh The display differs depending on the version, but as of August 28, 2020, there is a button called New SSH key, so click it Enter something that does not cover the Title (anything is fine) Paste the one you just copied into the key. Then return to the terminal again.
Check the connection.
$ ssh -T [email protected]
Hi ‘git hub user name’! You've successfully authenticated, but GitHub does not provide shell access.
If this return comes, the connection is successful
Navigate to the repository you want to clone the site on git hub. There is a button like ↓ code ▼, so click this (maybe) Click use ssh and copy the url Go to the terminal.
$git clone “copied url”
You should now have cloned your application.
Next time, we will link the application and PostgreSQL.
Recommended Posts