If you are interested in the Python environment, you can read the following articles to learn more about the Python environment, this article is a detailed introduction to its practical application solutions. The following is a detailed introduction to this article. I hope you will gain some benefits.
Download the Python source code, decompress it, compile and install it without special operations.
Install sh setuptools-0.6c11-py2.6.egg installation related Packages
- easy_install DBUtils
- easy_install flup
- easy_install web.py
The installation of mysql-pythonmysql-python package cannot be installed with easy_install. Specify the path of mysql_config. Note that it is the path of the newly installed mysql package.
- mysql_config=/usr/local/mysql/bin/mysql_config
Compilation and Installation
- python setup.py build
- python setup.py install
Declare libmysqlclient path
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib
3. download and install the fastcgi header file in the Installation server environment, decompress the file by default, compile and install PCRE, and specify-prefix =/usr/local/lighttpd for compiling and installing lighttpdconfigure by default.
4. Configuration
For details about how to run the web. py program in lighttpd fastcgi, refer to the Important Notes: The python script running through fastcgi must have the executable permission,
- chmod u+x web/main.py;
To restart the fastcgi program, you need to delete/tmp/fastcgi. socket *. The above content is a detailed introduction to the Python environment's actual application solution.