Build a LAMP (python) process under RedHatEnterpriseLinux5 (forDjango)

Source: Internet
Author: User
OS: RedHatEnterpriseLinux5 encountered many difficulties during installation, so that the people behind me can waste less time on the above 1] First list the version of my system --- I am using the redhat-enterprise-5.5 on their own online download 2] first install apache server, you can solve the problems encountered during the installation process by yourself or find a lot of experience on the Internet. I installed apache2 and downloaded it from the official website.

OS: RedHat Enterprise Linux 5

I encountered a lot of difficulties in the installation process, so I can write it down so that the people behind me can spend less time on it.

1) first list the version of my system --- I use redhat-enterprise-5.5 own download on the Internet

2] install the apache server first. You can solve the problems encountered during the installation process by yourself or find a lot of experience on the Internet. I installed apache2 and downloaded it from the official website.

3] MySQL will be installed next. I chose MySQL5.6 and downloaded on the official website.

A) Pay attention to the installation of MySQL. Several components should be installed at the same time, otherwise, various errors may occur during later installation (I do not want to describe the error here, because I do not know how to describe it, and I will not reproduce the error ), I was so confused that I was overwhelmed by this.

B) install

MySQL-server-5.6.10-1.linux_glibc2.5.x86_32.rpm

MySQL-client-5.6.10-1.linux_glibc2.5.x86_32.rpm

MySQL-devel-5.6.10-1.linux_glibc2.5.x86_64.rpm (this is more important, in the installation may prompt the lack of zlib module at this time you must install the corresponding system of zlib module, go to the Internet to search)

Mysql-connector-python-1.0.9-1.el6.noarch.rpm

C. You can find other problems on the Internet.

4] install python. The python version that comes with your own system is too low and not very good, so I want to change to a new version of python2.7 which is also downloaded on the official website.

Be sure to pay attention when compiling python ,. /configure -- with-zlib: add this library to the end. Otherwise, you will die badly. But I don't know why this problem happened to me. It may be because of the system version.

If you don't talk about anything else, you can do it yourself.

5] What should I install now? Directly install django? No! You need to install MySQL-python and go to the next one. It's hard to find it online.

Installing MySQL-python is not that easy. Although it is very small, it is indeed the least effort.

If you are reading this record because of the installation problem, congratulations, you may solve the problem immediately. If not .... Brother, you RP is too bad. Wash and sleep. You will struggle tomorrow.

Possible Errors

1. The system prompts that setuptools is missing. You need to download this item (not easy to find) and install it again. There will also be many problems when installing setuptools, if I install the tool in the previous steps, it will save a lot of trouble. If this error occurs, you can check the error message to see what installation is missing.

2. If mysql_config cannot be found, you must modify the site. in the cfg file, remove the comment "# mysql_config =/usr/local/bin/mysql_config" from the comment and make it the actual address of your own mysql_condig.

3. It has gone through so many steps. You may not succeed yet. You may encounter such a problem.

"/Usr/bin/ld: cannot find-lmysqlclient_r

Collect2: ld returned 1 exit status

Error: command 'gcc 'failed with exit status 1"

Don't sigh at this time. You just need to make a small change and you will be done!

Modify the site. cfg file. Change threadsafe = True to threadsafe = False.

After installation, it should be OK. Good luck!

For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.