Finally, we got the lamp + Zend + application under fedora6.

Source: Internet
Author: User
Tags mysql import
Finally, we have finished lamp + Zend + application under fedora6-Linux Enterprise Application-Linux server application information. The following is a detailed description. I think the last time I installed the linux system on my own was n years ago (n> 5). Since I recently wanted to build my own website, it was really hard to do it again, however, after a week of hard work, I am a retired newbie who can finally see my page.

To put IT bluntly: I want to build a website on IT human resources by myself. Now I have applied for a domain name and want to rent a virtual host. My friend said IT is inconvenient and will soon be used up. There is still a machine idle at home, so I did it myself, and then published it through the dynamic domain name resolution of the peanut shell.

First, I borrowed my colleague's fedora3 (I am not quite sure about what the system is, and I do not know the relationship with readhat, haha). I didn't think I could not recognize the optical drive or read it out. Alas, I had to set up fedora6 myself, set it to a dual system with grub, and then started my career in firefox + google!

Before I started writing, I felt that there were a lot of things to write. I told you about my miserable life over the past few days, but I found that I was writing something, as if I had nothing to write. In a word, I learned that the content on the Internet is too rich and must be fully utilized. In addition, the content must be recorded during the experiment. Some people almost did not win the Nobel Prize because they did not record the experiment process, it also wasted several sleepless nights because there was no recording process!

Let's talk about some technical experience:

Install lamp
I use the rpm package, and use hum-y install ******** to complete the operation, which is very easy. However, the php-mysql package has a problem. download and install the package again. It seems that there was a problem with the package during the upgrade, as if it was php-gd.

After installation, mysql cannot be started. You may need to modify the hosts file under the/etc directory and add the following line:

127.0.0.1 xyz localhost. localdomain localhost -- there are many online connections.

In addition, the permission issue occurs. mysql and httpd cannot access phpinfo after startup, because the File Permission of the example program is read-only and can be changed to 777.

Install ZendOptimize
Because I use php5.16, Zend3.0 must be used. It is also very convenient to install, all the way to next. However, the web page cannot be opened.

Php-v only shows Zend2.0, but Zend3.0 has been found in the php. ini file under the Zend directory, and php-v has 3.0 more information. I thought it didn't take effect, so I restarted httpd. It didn't work. Open php. ini under/etc/and find that there is no Zend3.0 information in it. Copy the relevant content of php. ini under the Zend directory to/etc/php. ini, OK

Application installation:
Easy to install lamp + zend, catch up with the Fast Installation of applications, import the database txt, enter www/html on the webpage, display garbled characters, php. the ini character has been set to gb2312, so it should be the mysql character set. Check whether it is latin, modify my. cof, change it to gb2312, restart mysql, and open the php page to display garbled characters? It's about to crash. It's already seen that some people are angry on the Internet. For the sake of my own ideals and for so many students who cannot find a job, I joined the competition. The man wins the day and finally solves the problem.

I think there are three points to note:

1. Set php. ini to the character set you need.

2. mysql's my. conf must also be set as needed

3. The last one is the sequence problem. In fact, you can set the first two, but the display is still garbled. That's because I first set up a database, imported data, and then set the character set, and my database is imported through txt, so it is garbled in the library. So after setting the first two configuration files, delete the database file, re-introduce the txt file, and start mysql, OK!

There was an episode when installing the application. I was ashamed to talk about it, but let's just talk about it.

I thought I could copy my application to the html directory because I have never developed a project, but I couldn't connect to the database for a few days, at last one night, I dreamed that I should modify the webpage to add the user and password, and the result was connected. Shame!

The most frequently accessed questions:
1. How does mysql import *. txt?
# Mysql-uroot-p ***** enter the database
Mysql-> source/etc/lib /*. txt; Use the source command to specify the txt file address. Do not forget ";" after ten millions of commands. I installed mysql several times because I didn't add it!

2. View mysql Character Types
# Mysql-uroot-p ***** enter the database
Mysql-> show variables like "% character_set _ % ";

3. view the installation directory of a package (limited to rpm installation)
View version: rpm-qa | grep httpd -- view the installation status of httpd
Related Article

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.