7/23/2019 Install Mod_python Centos 7
I have asked our hosting provider to add mod_python to our httpd server. The server appears to be in an hsphere cluster and they appear to use yum to administer it. He is reporting some dependencies missing and I do't quite understand how that could have come about.
versions (this is as much as I have been given):CentOS 5apache - 2 (but he's not sure about the exact version)mod_python - 3.3.1numpy - 1.1.1scipy - 0.6.0yum - 3.2.8hsphere - 3.1 patch 1
The error he is reporting is as follows:
Not being a UNIX admin I only have a naive guess about this, but the message would seem to suggest that there is a version mismatch between httpd and mod_python rather than the dependencies being missing completely.
So my question is, what should I ask/tell the Administrator to do?
Is there something obviously wrong with the combination of components above?
Mihai Limbășan
47.7k44 gold badges4444 silver badges5858 bronze badges
SimonSimon
33.6k2323 gold badges7878 silver badges115115 bronze badges
3 Answers
We have mod_python 3.3 running on Apache 2.2 on a CentOS (forgot the version). All we did is download the tar.gz (from http://httpd.apache.org/modules/python-download.cgi) , extract it..
Everything works fine. We couldn't use yum so everything is built from source.My suggestion would be to try to build from source.
GuiSimGuiSim
4,17955 gold badges3333 silver badges4040 bronze badges
My first reaction would be to
yum update apache (or just a yum update ).
Then try the warrenwarren
yum install mod_python .
18.9k1616 gold badges7474 silver badges107107 bronze badges
also getting same issue
--> Running transaction check---> Package mod_python.i386 0:3.2.8-3.1 set to be updated--> Processing Dependency: httpd >= 2.0.40 for package: mod_python--> Processing Dependency: httpd-mmn = 20051115 for package: mod_python--> Finished Dependency ResolutionError: Missing Dependency: httpd >= 2.0.40 is needed by package mod_pythonError: Missing Dependency: httpd-mmn = 20051115 is needed by package mod_python
Kwasi
Not the answer you're looking for? Browse other questions tagged apachemod-pythoncentos5 or ask your own question.
As title says 'How to install mod_wgsi for python3.5 on CentOS 7'?
$pip3.5 install mod_wgsi did not work
sudo yum install libapache2-mod-wsgi-py3 failed too:
Any suggestions on how to run apache2.4+ mod_wsgi with python3.5 on CentOS 7 are very welcome!
uzla
uzlauzla
4 Answers
I see you already have the IUS repo enabled. Rather than jumping through SCL hoops, you can just install a normal package.
This will use standard filesystem locations to work with stock Apache HTTPD 2.4.
carlwgeorgecarlwgeorge
I tried following Carl's answer, but it didn't solve the problem. It turns out that the version I installed required some extra configuration steps after installation.
Background
I looked at Apache's
modules folder before I installed the mod_wsgi upgrade:
Then I installed the SCL repository, and looked to see which versions of
mod_wsgi are available.
I'm using Python 3.6, so I installed the matching version and restarted Apache.
Sadly, that didn't solve the problem. When I looked in Apache's
modules folder, nothing had changed. Weird!
So what did get installed?
Extra Configuration Steps
It installed the files I need, but it didn't put them anywhere useful. With some hints from the
README.rst file, I copied them into the right place.
Now I have the right version of Don KirkbyDon Kirkby
mod_wsgi , and my Django app will run under Apache.
29.4k1313 gold badges136136 silver badges212212 bronze badges
Have you check the rh-python35 Software Collection which provides a rh-python35-mod_wsgi package ?
More information about SCL, see:
Remi ColletRemi Collet
I would use the SCL packages for python 3.6 (though feel free to substitute 3.5 below).
To start:
Note that will bring in the SCL package
httpd24-httpd and put the mod_wsgi file in that installation. I would recommend you use that installation and not install the base CentOS httpd package. At time of writing, for CentOS 7, the httpd package is 2.4.6 and the httpd24-httpd package is 2.4.37.
Then you create a virtualenv with:
Now you can put the config for your site in
/opt/rh/httpd24/root/etc/httpd/conf.d/mysite.conf , which could contain something like:
Now you start the SCL apache with:
And your site should be working.
Hamish DownerHamish Downer
10.5k1010 gold badges7575 silver badges7777 bronze badges
Not the answer you're looking for? Browse other questions tagged apachepython-3.xcentosmod-wsgi or ask your own question.
Posted by9 months ago
Archived
I have a Centos7 Linux production server with Apache2; all https.
Please register for Total War Access to use the forums. If you're an existing user, your forum details will be merged with Total War Access if you register with the same email or username. Total war warhammer 2 keeps crashing 2017. Oct 20, 2018 All files will go onto my SSD the mx500, my old hard drive is just done with and even the back fan is making unhealthy noises. I don't get why Warhammer is fine and runs well but Warhammer 2 is just lagging and crashing constantly in battles all of a sudden after a few weeks off from it.
I have to set up a simple form (ASAP) but I haven't had to deal with this particular set up before (or for quite some time - and times have changed), and this is an unmanaged server, so I could use a little help!
And there are differences between Centos7 servers and Ubuntu, Debian, etc.
No---- /etc/apache2/sites-enabled/000-default for example. Quite a few more.
Let's say I have an html page that has a plain old a href link on it that goes to; let's call it 'form.py'
Has a simple radio button, 9 buttons - choose one. click submit; action=POST
I have mod_python and mod_wsgi loaded, but enabled??
and this link takes the user to (let's call it) 'form.py' located in another directory (let's call that Form).
and let's say then the user can visit the URL 'http://localhost:5000/python_rabbit.html] and the html file above will be rendered:
OK, I have to open up another port, for one.
Random Crash Fix in Hearts of Iron IV:. How to mod hearts of iron 4. Update the drivers. To check whether the drivers are up to date or not, follow the steps below:.
But I'm not clear on the https advice, because there is none in the many 'Hello World' examples.
OK, let's say I use some method like this:
run WSGI with an Apache server
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName wsgi.sxxxx.com
DocumentRoot '/home/dxxxx/www'
<Directory '/home/dxxx/www'>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Install Mod_python Centos 7 64
Allow from all
</Directory>
ScriptAlias /py/ '/home/dxxxx/www/py/'
WSGIScriptAlias /wsgiprog /home/dxxxx/www/wsgiprog/Form/Start.wsgi
</VirtualHost>
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
Centos 7 Install Python Dev
ServerName [sxxxx.com]
ServerAlias [www.sxxxx.com]
ProxyPass / [r/http://localhost:6800]
![]()
ProxyPassReverse / [r/http://localhost:6800]
![]()
</VirtualHost>
Above looks like a real rpossibility, but does not deal with https (or does it?)
The above uses a golang server, and there is something from github, that does deal with https and TLS, but... don't know if I could install it, set it up, etc.
Having trouble finding a method that will not break the existing https setup, Tried 3 things already that crashed Apache.
And the other thing I was looking at was Pylons/Pyramid. Anyone familiar with that? That too does not seem tp address the https problem, unless I missed part of it.
It looks simpler than the 1st one. Seems somethng like django. I've used flask before too. This little project is just temporary too, a week or two, an experiment; but have to have the little radio button form up and working, have 'some' security, not break the https, etc.
So.. Any suggestions, ideas, links to good examples (not just documentation)?
1 comment
I have a shell that runs CentOS.
For a project I'm doing, I need python 2.5+, but centOS is pretty dependent on 2.4.
From what I've read, a number of things will break if you upgrade to 2.5.
I want to install 2.5 separately from 2.4, but I'm not sure how to do it. So far I've downloaded the source tarball, untarred it, and did a Michael Dillon
./configure --prefix=/opt which is where I want it to end up. Can I now just make, make install ? Or is there more?
28.4k55 gold badges5858 silver badges9696 bronze badges
tehryantehryan
8,9061111 gold badges2424 silver badges1616 bronze badges
15 Answers
You could also use the EPEL-repository, and then do Xavi
sudo yum install python26 to install python 2.6
16.2k1111 gold badges6464 silver badges6060 bronze badges
boerreboerre
Try epel
The python executable will be available at
/usr/bin/python26
Now, Iker Jimenez
python command will execute python 2.6
4,91266 gold badges3838 silver badges4444 bronze badges
Joyce BabuJoyce Babu
8,66877 gold badges4646 silver badges7979 bronze badges
When I've run into similar situations, I generally avoid the package manager, especially if it would be embarrassing to break something, i.e. a production server. Instead, I would go to Activestate and download their binary package:
This is installed by running a script which places everything into a folder and does not touch any system files. In fact, you don't even need root permissions to set it up. Then I change the name of the binary to something like apy26, add that folder to the end of the PATH and start coding. If you install packages with
apy26 setup.py install or if you use virtualenv and easyinstall, then you have just as flexible a python environment as you need without touching the system standard python.
Edits..Recently I've done some work to build a portable Python binary for Linux that should run on any distro with no external dependencies. This means that any binary shared libraries needed by the portable Python module are part of the build, included in the tarball and installed in Python's private directory structure. This way you can install Python for your application without interfering with the system installed Python.
My github site has a build script which has been thoroughly tested on Ubuntu Lucid 10.04 LTS both 32 and 64 bit installs. I've also built it on Debian Etch but that was a while ago and I can't guarantee that I haven't changed something. The easiest way to do this is you just put your choice of Ubuntu Lucid in a virtual machine, checkout the script with
git clone git://github.com/wavetossed/pybuild.git and then run the script.
Once you have it built, use the tarball on any recent Linux distro. There is one little wrinkle with moving it to a directory other than
/data1/packages/python272 which is that you have to run the included patchelf to set the interpreter path BEFORE you move the directory. This affects any binaries in /data1/packages/python272/bin
All of this is based on building with RUNPATH and copying the dependent shared libraries. Even though the script is in several files, it is effectively one long shell script arranged in the style of /etc/rc.d directories.
Michael DillonMichael Dillon
28.4k55 gold badges5858 silver badges9696 bronze badges
No need to do yum or make your own RPM. Build
python26 from source.
There can be a dependency error use
Add the install path (
/usr/local/bin/python by default) to ~/.bash_profile .
It will not break the swine
yum or any other things which are dependent on python24 .
7,56755 gold badges4141 silver badges8585 bronze badges
Rahul AroraRahul Arora
No, that's it. You might want to make sure you have all optional library headers installed too so you don't have to recompile it later. They are listed in the documentation I think.
Also, you can install it even in the standard path if you do Lennart RegebroLennart Regebro
make altinstall . That way it won't override your current default 'python'.
119k3434 gold badges189189 silver badges232232 bronze badges
Chris Lea provides a YUM repository for python26 RPMs that can co-exist with the 'native' 2.4 that is needed for quite a few admin tools on CentOS.
Quick instructions that worked at least for me:
KimvaisKimvais
26.1k1111 gold badges8888 silver badges127127 bronze badges
If you want to make it easier on yourself, there are CentOS RPMs for new Python versions floating around the net. E.g. see:
oggyoggy
2,79711 gold badge1414 silver badges2121 bronze badges
When you install your python version (in this case it is python2.6) then issue this command to create your Artjom B.
virtualenv :
53.9k1818 gold badges8787 silver badges160160 bronze badges
user1427258user1427258
Late to the party, but the OP should have gone with Buildout or Virtualenv, and sidestepped the problem completely.
I am currently working on a Centos server, well, toiling away would be the proper term and I can assure everyone that the only way I am able to blink back the tears whilst using the software equivalents of fire hardened spears, is buildout.
chiggsychiggsy
5,58155 gold badges2626 silver badges4141 bronze badges
you can always make your own RPM:
rytisrytis
Missing Dependency: libffi.so.5 is here :
lykichlykich
bstpierre
20.8k1414 gold badges5555 silver badges9898 bronze badges
Cheap VPNCheap VPN
Download and install Python 3.3.0
Download and install Distribute for Python 3.3
Install and use virtualenv for Python 3.3
Moddasir KhanModdasir Khan
I unistalled the original version of python (2.6.6) and install 2.7(with option
make && make altinstall ) but when I tried install something with yum didn't work.
So I solved this issue as follow:
Done
user2544607user2544607
Type the following commands on the terminal to install Python 3.6 on CentOS 7:
Then do :
You can also install any version instead of 3.6 (if you want to) by just replacing 36 by your version number.
iBug
22.3k66 gold badges4444 silver badges6969 bronze badges
Ayush Kumar SharmaAyush Kumar Sharma
Not the answer you're looking for? Browse other questions tagged pythoncentosrpath or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |