Installing a new version of Python with LiteSpeed ​​under Linux

Installing a new version of Python with LiteSpeed ​​under Linux

1. The installed version is Python 2.7.9.
2. LiteSpeed ​​has been installed.

Under SSH:
1. Install and download
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
Unzip
tar –xzf Python-2.7.9.tgz
Go to directory
cd Python-2.7.9
Compile & Install
./configure
make
make install

2. Use the new version
cd /usr/bin
ll |grep python //View python in this directory
rm -rf python
ln -s PREFIX/Python-2.7.9/python ./python //PREFIX is the directory where you unzip Python
Python

3. Installation and use under LiteSpeed
cd /usr/local/lsws/
wget http://www.litespeedtech.com/packages/lsapi/wsgi-lsapi-1.0.tgz
tar -xzf wsgi-lsapi-1.0.tgz
cd wsgi-lsapi-1.0
python ./configure.py
make
cp lswsgi /usr/local/lsws/fcgi-bin/

4. LiteSpeed ​​settings go to http://ip:7080/config/confMgr.php?m=serv&p=ext

Click Add and select LSAPI App.

Settings.Name: wsgiApp,Address: uds://tmp/lshttpd/lswsgi.sock,Command: /usr/local/lsws/fcgi-bin/lswsgi

Just save it.

5. Create a LSWSGI script and enter http://ip:7080/config/confMgr.php?m=serv&p=scriptHandler

The settings are as follows:

Suffixes: wsgi
Handler Type: LiteSpeed ​​SAPI
Handler Name: wsgiApp

Restart LiteSpeed.

<<:  VPSSIM: Nginx – PHP-FPM – MariaDB one-click installation package

>>:  DirectSpace VPS buy one year get one year free, SSD hard drive, 512MB memory, $15/2 years

Recommend

Scorpioud: 40 yuan/month/768MB memory/15GB SSD space/5TB traffic/KVM/San Jose

Scorpioud, a Chinese businessman, has newly purch...

VPS77: 79 yuan/year/128MB memory/5GB SSD space/256GB traffic/KVM/Los Angeles

VPS77, a Chinese hosting provider, was newly esta...

HiFormance: $5/month/2G memory/30GB SSD space/2TB traffic/KVM/Orlando

HiFormance, a US hosting provider, is located in ...

V&Web: $20/month/12G memory/300GB SSD space/unlimited traffic/KVM/Germany

V&Web, founded in 2005, seems to be operated ...

HostHatch: $5/month/1GB memory/1.5TB space/2TB traffic/KVM/Los Angeles/Sweden

HostHatch, a long-established hosting provider, h...