cd /opt sudo mkdir -p Climato/Pydap Climato/Data sudo adduser pydap --no-create-home --ingroup http-web --home /opt/Climato/Pydap/ --disabled-login sudo chown -R pydap.http-web /opt/Climato/
cd /opt/Climato/Pydap/
sudo su pydap virtualenv --python=python3.5 PyDAPenv
source PyDAPenv/bin/activate pip install pydap netcdf4 h5py pupynere git clone https://github.com/pacificclimate/pydap.responses.netcdf.git git clone https://github.com/pacificclimate/pydap.responses.netcdf.git git clone https://github.com/pacificclimate/pydap.handlers.netcdf4.git git clone https://github.com/pacificclimate/pydap.responses.netcdf.git git clone https://github.com/pacificclimate/pydap.handlers.hdf5.git git clone https://github.com/pacificclimate/pydap.responses.html.git git clone https://github.com/pacificclimate/pydap.responses.xls.git git clone https://github.com/pacificclimate/pupynere-pdp.git git clone https://github.com/pacificclimate/pydap-pdp.git
easy_install pydap-pdp pupynere-pdp pydap.handlers.hdf5 pydap.handlers.netcdf4 pydap.responses.html pydap.responses.netcdf pydap.responses.xls
sudo mkdir /run/pydap sudo chown pydap.http-web /run/pydap
add in /etc/nginx/sites-available/enabled-config server { listen 80; listen [::]:80;
server_name climato.climatetmeteo.fr;
access_log /var/log/nginx/pydap.access.log;
error_log /var/log/nginx/pydap.error.log;
location / {
uwsgi_pass unix:///var/run/pydap/pydap.sock;
include uwsgi_params;
}
}
edit pydapServer.wsgi
from pydap.wsgi.app import DapServer application = DapServer('/opt/Climato/Data/Lyon')
chmod a+x pydapServer.wsgi
cat pydapServerUwsgi.ini [uwsgi] virtualenv = /opt/Climato/Pydap/PyDAPenv master = true vacuum = true uid = pydap gid = http-web processes = 2 logto = /var/log/pydap/pydap.log socket = /var/run/pydap/pydap.sock http-socket = 0.0.0.0:9080 chmod-socket = 660 wsgi-file = /opt/www/Pydap-pdp/pydapServer.wsgi
sudo mkdir /var/log/pydap vidal[~] blog.€ : sudo chown pydap.http-web !$ sudo chown pydap.http-web /var/log/pydap
cat pydap.service [Unit] Description=uWSGI server for Pydap After=syslog.target network.target
[Service] Type=simple User=pydap Group=http-web ExecStart=/opt/Climato/Pydap/PyDAPenv/bin/bin/uwsgi --ini /opt/www/Pydap-pdp/pydapServerUwsgi.ini ExecReload=/opt/Climato/Pydap/PyDAPenv/bin/uwsgi --ini /opt/www/Pydap-pdp/pydapServerUwsgi.ini --reload ExecStop=/opt/Climato/Pydap/PyDAPenv/bin/uwsgi --ini /opt/www/Pydap-pdp/pydapServerUwsgi.ini --stop KillSignal=SIGQUIT NotifyAccess=all
[Install] WantedBy=multi-user.target vidal[.../systemd/system] blog.€ :
2215 easy_install pydap-pdp 2216 easy_install pydap.handlers.hdf5 2217 easy_install pupynere-pdp pydap.handlers.hdf5 2218 easy_install pydap.handlers.netcdf4 2219 easy_install pydap.responses.html 2220 pip list 2221 ls 2222 easy_install pydap.responses.netcdf 2223 easy_install pydap.responses.xls 2224 pip list 2225 cd ../NewPyDap/ 2226 ls 2227 easy_install pydap 2228 pip uninstall pydap-pdp 2229 easy_install pydap
Commentaires