FC6 is successfully installed by lamp

Source: Internet
Author: User
FC6 is successfully installed using lamp-Linux Enterprise Application-Linux server application information. For more information, see. I. Required Software: fc6 comes with lamp and other software,
Httpd-2.2.4-2.fc6 mysql-5.0.27-1.fc6 php-5.1.6-3.5.fc6 php-mysql
Mysql. network server and World Wide Web server should be selected during the customization of the linux system, so that the above software can be installed.
Run the rpm-q software name. For example, run the rpm-q mysql command to view the mysql software.
You can also install the php-mysql software by adding or deleting the software.
If no installation is available, yum install httpd, yum install php. yum install mysql. yum install php-mysql upgrade and installation (it is best to install the above software properly when installing the system. Using yum is only an upgrade, and many software cannot be installed automatically)
II. Prepare apache
1. Prepare httpd. conf
Gedit/etc/httpd/conf/httpd. conf
Add these two sentences after httpd. conf.
LoadModule php5_module/usr/lib/httpd/modules/libphp5.so
AddType application/x-httpd-php. php
This is to add a module information to apache. apache supports php and enables apache to support files ending with. php, that is, php.
2. Test apache
In the menu, choose system> service> httpd. Click start to start the apache server.
Create a file under/var/www/html/for testing. here we need to explain, because/var/www/html/has no read permission, you must first
Chmod-R 777/var/www/html (otherwise some files do not have read and write permissions)
In this way, the file name is test. php and the content is
Phpinfo ();
?>
Open firefox, enter 127.0.0.1/test. php in the address bar, and press Enter. You will see the php information, proving that apache and php are basically installed.
3. Prepare php. ini
Gedit/etc/php. ini
Add
Extension = mysql. so
Extension = mysqli. so
This enables php to use mysql.
Restart apache server
4. Start mysql
By default, choose menu system> service> mysqld. You have to change it.
View/etc/hosts. The content is as follows:
Command gedit/etc/hosts
# Do not remove the following line, or various programs
# That require network functionality will fail.
: 1 localhost. localdomain localhost
Modify: 1 to 127.0.0.1 and then start successfully.
V. Test mysql
Write an object under/var/www/html. Please try again
Change the chmod-R 777/var/www/html permission.
The file name mysql_test.php is
$ Link = mysql_connect ('localhost', 'root ','');
If ($ link) echo "yes ";
Else echo "no ";
Mysql_close ();
?>
Put it in/var/www/html, and enter 127.0.0.1/mysqltest in firefox. php, you will see yes, indicating that mysql is also installed. At this time, enter 127.0.0.1/test. php,
Remember to test chmod-R 777/var/www/html when you modify/etc/httpd/conf/httpd. conf. May 1 is off and you have to study it. Haha, I will solve this problem first. Anyway, lamp is now on, so I will have a rest.
127.0.0.1/test. php will find that a portion of mysql is added in the information, indicating that apache + php + mysql is successfully installed ~!
OKOKOKOKOKOKOKOKOKOKOK
A few weeks ago, I installed the windows environment with the windows environment. Today I installed the lamp well and made it comfortable. There are still many functions that have not been completed yet, but they are basically well prepared. I still like FC6. I think Ubuntu is good, but ubuntu still does not support FC6 in Chinese. To test Chinese php, FC6 is still used.

Well, the basic lamp has been installed above. In order to better use and manage lamp, you have to use the software. If the above is not safe, you have to be well prepared, otherwise the following steps will be redundant.
I. Software Name:
PhpMyAdmin-2.10.0.2-3.fc6 ZendStudio-5_5_0.tar.gz

2. Manage mysql
Use phpMyAdmin to manage mysql in a graphical manner. This software can be added/deleted.-menu system-> Add/Delete. After you search for php, there will be a lot of software available.
PhpMyAmin, "application" can be installed with phpMyAmin. It is found that the linux installation program is simpler than XP, either add/delete or yum install
Check whether you have installed phpMyAdmin. Use rpm-q phpMyAdmin to view the version.
Enter localhost/phpMyAdmin/in firefox. the user name and password are required because the default mysql user is root. The password is empty.
To manage mysql.
3. zend support and Chinese garbled Solutions
Tar zxvf ZendStudio-5_5_0.tar.gz
Get a ZendStudio-5_5_0.bin
Directly./ZendStudio-5_5_0.bin on the security, the installation process is simple, not much said. next. next
Start zend find ZDE in/usr/local/Zend/ZendStudio-5.5.0/bin, double click to start
Of course, you can create a shortcut to start ZDE
Ln-s/usr/local/Zend/ZendStudio-5.5.0/bin/ZDE/usr/bin/ZDE
Or, if you want to be lazy, you can write one in the menu.
Because the zend Chinese support on linux is not good enough, after opening it, it is still square and a simsin should be installed. ttf font. this font can be found in windows Drive C \ windows \ fonts simsum. of course, you have to mount things in windows (1. mkdir/mnt/c 2. mount/dev/hdc1/mnt/c 3. find simsun in/mnt/c/windows/Fonts. ttc) copy the font to linux.
1. Create a file flat folder fallback
Mkdir zend installation directory/ZendStudio-5.5.0/jre/lib/fonts/fallback
Here I am
Mkdir/usr/local/Zend/ZendStudio-5.5.0/jre/lib/fonts/fallback
2. Copy the simsun. ttc font to fallback and name it simsun. ttf.
Cp simsun. ttc zend installation directory/ZendStudio-5.5.0/jre/lib/fonts/fallback/simsun. ttf
Here I am
Cp simsun. ttc/usr/local/Zend/ZendStudio-5.5.0/jre/lib/fonts/fallback/simsun. ttf
OK. Start ZDE again, perfect. Chinese.
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.