You are on page 1of 2

Apache2

apt-get install apache2 apache2-dev

Python3.7
apt install libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev
libffi-dev libsm6 libxext6 libxrender-dev build-essential sqlite3 libsqlite3-dev
zlib1g zlib1g-dev -y
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
tar -xzvf Python-3.7.0.tgz
cd Python-3.7.0
./configure --enable-optimizations ou ./configure --enable-shared
make
make altinstall

PHP
apt install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" >
/etc/apt/sources.list.d/php.list'
apt update
apt-get install php7.1 php7.1-gd php7.1-pgsql php7.1-zip php7.1-mbstring php7.1-
mysql

MOD-WSGI
apt-get install libapache2-mod-wsgi-py3
Download do git a versão mais recente
https://github.com/GrahamDumpleton/mod_wsgi/releases
tar xvfz x.x.x-X.Y.tar.gz
cd x.x.x
./configure --with-apxs=/usr/bin/apxs --with-python=/usr/local/bin/python3.7
make
make install

Configurando outra instancia do apache2


sh /usr/share/doc/apache2/examples/setup-instance trocar pelo nome da instancia

mudar a porta que a nova instancia vai trabalhar


/etc/apache2-wsgi/ports.conf

comandos para trabalhar com a nova instancia


systemctl start apache2@wsgi.service
systemctl enable apache2@wsgi.service
Setting up symlinks: a2enmod-wsgi a2dismod-wsgi a2ensite-wsgi a2dissite-wsgi
a2enconf-wsgi a2disconf-wsgi apache2ctl-wsgi
Setting up /etc/logrotate.d/apache2-wsgi and /var/log/apache2-wsgi ...
Setting up /etc/default/apache-htcacheclean-wsgi

executar
systemctl start apache2@wsgi.service

ver se estão as duas instancias do apache em suas respectivas portas

netstat -antp

tcp6 0 0 :::80 :::* OUÇA


8856/apache2
tcp6 0 0 :::8080 :::* OUÇA
25990/apache2
ln -s /etc/apache2-apache2_wsgi/sites-available/face.conf /etc/apache2-
apache2_wsgi/sites-enabled/face.conf
caminho para executar nova instancia apache2

You might also like