Installazione server backend¶
Installare python3.7¶
sudo su
dnf install gcc openssl-devel bzip2-devel libffi-devel
cd /opt wget https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz tar xzf Python-3.7.9.tgz cd Python-3.7.9 ./configure –enable-optimizations yum install make make altinstall rm Python-3.7.9.tgz
CTRL+D python3.7 -V
ln -s -f /usr/local/bin/python3.7 /usr/local/bin/python
yum install -y xz-devel dnf install sqlite-devel
cd /opt/Python-3.7.9/ ./configure –enable-loadable-sqlite-extensions && make && sudo make install
pip3.7 install uwsgi
Installare wkhtmltopdf¶
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos8.x86_64.rpm dnf localinstall wkhtmltox-0.12.6-1.centos8.x86_64.rpm
CTRL+D
wkhtmltopdf
Installare git¶
dnf install git -y CTRL+D ssh-keygen -t rsa -b 4096 -C “it@prodigys.it”
cat /home/local/CED/e_moretto_c/.ssh/id_rsa.pub e metterla come deploy key di gitlab sui progetti necessari
Installare nginx¶
dnf install nginx systemctl enable nginx systemctl start nginx
setup repo¶
cd /usr/local/ mkdir prodigys
git clone https://gitlab.com/coding-lab/prodigys/kpax/kpax-backend.git git clone https://gitlab.com/coding-lab/prodigys/kpax/kpax-deploy.git git clone https://gitlab.com/coding-lab/prodigys/kpax/kpax-frontend.git
Oracle client¶
wget https://download.oracle.com/otn_software/linux/instantclient/199000/oracle-instantclient19.9-basic-19.9.0.0.0-1.x86_64.rpm yum -y localinstall oracle-instantclient19.9-basic-19.9.0.0.0-1.x86_64.rpm rm oracle-instantclient19.9-basic-19.9.0.0.0-1.x86_64.rpm
crontab¶
Impostare quelli del file readme come cron! 0 1 * * * /usr/local/prodigys/kpax-backend/run-make.sh google_analitycs >> /usr/local/prodigys/crontabs/google_analitycs.log 2>&1 0 2 * * * /usr/local/prodigys/kpax-backend/run-make.sh fetch_services >> /usr/local/prodigys/crontabs/fetch_services.log 2>&1 0 3 * * * /usr/local/prodigys/kpax-backend/run-make.sh search_index_update >> /usr/local/prodigys/crontabs/search_index_update.log 2>&1
verificare elastich¶
curl -X GET ‘http://10.128.136.122:9200’
Installazione elastich search¶
Server .122
dnf install java-11-openjdk-devel java -version
rpm –import https://artifacts.elastic.co/GPG-KEY-elasticsearch
cat << EOF > /etc/yum.repos.d/elasticsearch.repo [elasticsearch-7.x] name=Elasticsearch repository for 7.x packages baseurl=https://artifacts.elastic.co/packages/oss-7.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md EOF
yum install -y elasticsearch-oss systemctl daemon-reload systemctl enable elasticsearch systemctl start elasticsearch
curl -X GET ‘http://localhost:9200’
nano /etc/elasticsearch/elasticsearch.yml transport.host: localhost transport.tcp.port: 9300 http.port: 9200 network.host: 0.0.0.0
systemctl restart elasticsearch