install packages on Ubuntu:
ssh, postgresql, gcc => during ubuntu installation
sudo apt-get updatesudo apt-get upgrade
configure firewall to allow ssh: sudo ufw allow ssh
Make sure you can address server from local network
Get network adapter names: sudo lshw -C network, look for "logical name"
Check if ip other than localhost is configured: sudo vim /etc/network/interfacesi for insert mode, esc for command mode, :x to quit and save changes
#ETHERNET
auto NAME
iface NAME inet static
address 10.0.0.100
netmask 255.255.255.0
gateway 10.0.0.1
dns-nameservers 8.8.8.8 8.8.4.4
#WIFI
iface WLAN inet dhcp
wpa-ssid <your_router>
wpa-psk <your_wpa_key>
dns-nameservers 8.8.8.8 8.8.4.4
Restart network adapters
If changes were made: sudo ifdown --exclude=lo -a, sudo ifup --exclude=lo -a
Get ip address: ifconfig
Connect to inet address of the chosen adapter via ssh
Standard-Netzwerk-Adapter ändern
Nur nötig, falls es mehrere gibt und das falsche genutzt wird
ip route listsudo ip route change to default dev [name] via [gateway ip]
gateway ip z.B. beim start von dhcp oder durch route -n (vorher!)
Create Postgres databasesudo -u postgres createuser <username>sudo -u postgres createdb <dbname>sudo -u postgres psqlpsql=# alter user <username> with encrypted password '<password>';psql=# grant all privileges on database <dbname> to <username> ;
Update Django config
settings: update database info
settings: update allowed hosts
manage.py: comment out runserver.default_port/addr
Run Django
make sure to upload django.log and set write permission
makemigrations CollectionExplorer (!), migrate
Set up project properly
Download nltk data in python console:
import nltknltk.download("all")
Steps:
install packages on Ubuntu: ssh, postgresql, gcc => during ubuntu installation
sudo apt-get update
sudo apt-get upgrade
configure firewall to allow ssh:
sudo ufw allow ssh
Make sure you can address server from local network Get network adapter names:
sudo lshw -C network
, look for "logical name" Check if ip other than localhost is configured:sudo vim /etc/network/interfaces
i
for insert mode,esc
for command mode,:x
to quit and save changesRestart network adapters If changes were made:
sudo ifdown --exclude=lo -a
,sudo ifup --exclude=lo -a
Get ip address:ifconfig
Configure SSH:
sudo vim /etc/ssh/sshd_config
=> passwort erlauben!sudo systemctl restart ssh
Connect to inet address of the chosen adapter via ssh
Standard-Netzwerk-Adapter ändern Nur nötig, falls es mehrere gibt und das falsche genutzt wird
ip route list
sudo ip route change to default dev [name] via [gateway ip]
gateway ip z.B. beim start von dhcp oder durch route -n (vorher!)Pakete installieren screen, erlang, rabbitmq, java:
sudo apt-get install screen build-essential openjdk-8-jdk erlang rabbitmq-server ipmiutil
python 3.6:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
Pip:
wget https://bootstrap.pypa.io/get-pip.py
sudo python3.6 get-pip.py
Install Python packages:
sudo python3.6 -m pip install NumPy SciPy NLTK==3.2.4 scikit-learn gensim Whoosh Django SQLAlchemy celery django-celery-results eventlet psycopg2 pdfminer.six python-docx datasketch
Create Postgres database
sudo -u postgres createuser <username>
sudo -u postgres createdb <dbname>
sudo -u postgres psql
psql=# alter user <username> with encrypted password '<password>';
psql=# grant all privileges on database <dbname> to <username> ;
Update Django config
Run Django
Set up project properly
import nltk
nltk.download("all")