• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Noam Harel

Regular Pleskian
Hi

i would like to install python and run .py scripts in httpdocs, also i have read here, that this is possible through plesk onyx.

so what would be the best practice to install python on centos 7 and make it competable with plesk onyx. detailed instruction if possible.

thank's in advance
Noam
 
Mak sure that Python scripting engine is enabled here - Tools & Settings > Apache Web Server > check python.
 
thanks again for the quick answer!

the python scripting engine doesn't appear at all at: Tools & Settings > Apache Web Server > python:
python.png


for further information, after donig what you have wrote in your first message (plesk installer --select-release-current --install-component mod_python) the result was:
You already have the latest version of product(s) and all the selected components
installed. Installation will not continue.

server information:
Plesk Onyx v17.0.17_build1700161028.14 os_CentOS 7

Noam
 
What is output of commands:

# rpm -q mod_python
# httpd -M | grep python
 
i see the problem now:
[root@webnext ~]# rpm -q mod_python
package mod_python is not installed

[root@webnext ~]# httpd -M | grep python
[Wed Nov 23 11:03:54.495789 2016] [so:warn] [pid 8797] AH01574: module actions_module is already loaded, skipping
[Wed Nov 23 11:03:54.498570 2016] [so:warn] [pid 8797] AH01574: module headers_module is already loaded, skipping
[Wed Nov 23 11:03:54.498890 2016] [so:warn] [pid 8797] AH01574: module logio_module is already loaded, skipping
[Wed Nov 23 11:03:54.500298 2016] [so:warn] [pid 8797] AH01574: module suexec_module is already loaded, skipping
 
Strange why mod_python is not installed? Try to install it again through Tools&Settings->Update and Upgrade->etc...
 
Well, as I was informed, mod_python is not included to Plesk installer on modern OSes like Debian8, Centos7, Ubuntu16. My test Plesk Onyx server is based on Centos6.8 therefore I see mod_python in Plesk installer.
By default, Python is handled by FastCGI (mod_fcgid module). For Python, it is also possible to use Application server (this option is described in this article)
 
Hi igor this sounds weird, as this manual is for plesk 12 and i am using plesk 17.
what i have done is:
1) # yum install python-pip
2) # pip install virtualenv
3) i have installed Phusion Passenger from the web installer

i am stuck here... where to go from here

Noam
 
Hi Noam Harel,

to compile and install "mod_python" on a CentOS 7 operating system, you could use:
  1. Install the "Python - Developper - package" with for example:
    Code:
    yum -y install python-devel
  2. Go to the "LOCAL - SOURCE" folder
    Code:
    cd /usr/local/src/
  3. Download the Python - SOURCE - package with for example:
    Code:
    wget http://dist.modpython.org/dist/mod_python-3.5.0.tgz
  4. Uncompress the downloaded file with for example:
    Code:
    tar xfz mod_python-3.5.0.tgz
  5. Move the new folder
    Code:
    cd mod_python-3.5.0
  6. Before you can compile a package, you have to "CONFIGURE" it:
    Code:
    ./configure
  7. After a ( successfull ) configuration, you can now use:
    Code:
    make
  8. To finish your compilation, you would use:
    Code:
    make install
  9. Enable the module for your apache - webserver with for example:
    Code:
    echo 'LoadModule python_module modules/mod_python.so' > /etc/httpd/conf.modules.d/000-python.conf
  10. Restart your apache - webserver with for example:
    Code:
    systemctl restart httpd.service
 
Hi UFHH01

i did all your advices and when i got to configure i had this error:
[root@webnext mod_python-3.5.0]# ./configure
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/src/mod_python-3.5.0':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

Noam
 
Hi Noam Harel,

if the above suggested command doesn't work for you, you are as well able to use:

yum --setopt=group_package_types=mandatory,default,optional groupinstall "Development Tools"

or​

yum --setopt=group_package_types=mandatory,default,optional group install "Development Tools"

Another option to solve possible issue with "groupinstall" ( os - related ), is to use:

Code:
yum groups mark install "Development Tools"
yum groups mark convert "Development Tools"
yum groupinstall "Development Tools"
 
Hi!
I have a similar issue.
I have centos7 plesk and I like python.
I do not want to start compiling the mod python because I tried that once and it did nothing.
What I want is to enable python via cgi.
I put in my htaccess
Options +exec
AddHandler cgi-script .py
And its not working, getting 500 error.
The permissions of my helloworld.Py are execute on everything
Is it something to do with selinux?
The same thing works on a pleskless environment.
 
Back
Top