Ubuntu Desktop 8.04lamp environment configuration 6.25 update. (PDO, Gd, Zend studio)

Source: Internet
Author: User
Configure the lamp environment (including phpMyAdmin) for Ubuntu 8.04.
1. Installation

First, it will be helpful if you spend a little time getting familiar with Common commands!

Installing lamp is not that mysterious. Step by step. This is much easier than the troublesome configuration in windows!
1. Install Lamp

Select edit in the new software package manager -- mark the software package with the Task Group

In the displayed window, select lamp server and click OK.

Click the green check mark application button in the main window.

Okay. The next step is to wait... until the new version is automatically downloaded and installed.

A prompt will be displayed in the middle to enter the password of the root user of MySQL.

2. Install phpMyAdmin

Run commands in the terminal

Code:

sudo apt-get install phpmyadmin

Ii. Configuration reference:

1> Apache configuration file path/etc/apache2/apache2.conf

2> PHP. ini path/etc/PhP5/apache2/php5.ini

3> MySQL configuration file path/etc/MySQL/My. CNF

4> phpMyAdmin configuration file path/etc/PHPmyAdmin/Apache. conf

5> website root directory/var/WWW

1. Configure Apache



Code:

sudo gedit /etc/apache2/apache2.conf

Add the following lines at the end of the configuration file:



Code:

AddType application/x-httpd-php .php .htm .html

Default Character Set Based on your needs

Code:

AddDefaultCharset UTF-8

Server address

Code:

ServerName 127.0.0.1

The order of adding the three homepage files can be changed to the previous access priority (of course, you can also add other settings such as default. php)

Code:

<IfModule dir_module>
DirectoryIndex index.htm index.html index.php
</IfModule>

2. Configure PhP5

There is nothing to say about it, depending on your own needs.

The following is the default time zone

Code:

;default.timezone=

Remove the semicolon and add a PRC. Indicates the People's Republic of China (GMT + 8 time zone)

Code:

default.timezone= PRC

3. Configure MySQL

The MySQL configuration file is my. CNF, not my. conf.

Code:

sudo gedit /etc/mysql/my.cnf

Note that

By default, only local access to the database is allowed.

Code:

bind-address 127.0.0.1

This statement restricts local access to MySQL only. If you need access from other machines, use # To comment out this sentence.

Code:

#bind-address 127.0.0.1

4. Configure phpMyAdmin

PhpMyAdmin is not installed under/var/WWW by default, but in/usr/share/phpMyAdmin

You can copy phpMyAdmin or someone on the internet says that you can create a link and copy the Link (not tried)

Then run the command in the terminal

Code:

sudo gedit /etc/phpmyadmin/apache.conf

Then, change the path of the following two sentences to/var/www/phpMyAdmin (because I have configured the environment, I forgot how to write the default configuration in phpMyAdmin .. There are two sentences in the third and fourth rows. If I remember correctly, it should be as follows)

Code:

Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>

Changed:

Code:

Alias /phpmyadmin /var/www/phpmyadmin
<Directory /var/www/phpmyadmin>

Operator: Common commands

1. Restart Apache

Code:

sudo /etc/init.d/apache2 restart

2. Restart MySQLCopy content to clipboard
Code:

sudo /etc/init.d/mysql restart

Now that the lamp environment is successfully configured, try echo phpinfo!

Others

1 PDO Installation

Code:

pecl search pdo

sudo pecl install pdo

sudo pecl install pdo_mysql

Finally, edit PHP. ini.

Code:

sudo gedit /etc/php5/apache2/php.ini

Add two rows at the end:

Code:

extension = pdo.so

extension = pdo_mysql.so

2 GD library Installation

Code:

sudo apt-get install php5-gd

Remember to restart Apache after installation

Code:

sudo /etc/init.d/apache2 restart

3. Zend studio installation (I forgot to install it)

Download

Code:

http://www.phpchina.com/download/show.php?id=6553795&sort=ZendStudio

Install

Enter the directory where the file is located, suchCode:cd /home/kishi/DownloadExtract

Code:

tar zxvf ZendStudio-5_5_1.tar.gz

Then

Code:

cd ZendStudio-5_5_1

Install

Code:

sudo ./ZendStudio-5_5_1.bin

The rest is the pure graphical interface... after installation

Solve the garbled Problem

It may be garbled after installation ..

Don't worry.

Delete or rename a font file

Code:

rm /home/YourUsername/Zend/ZendStudio-5.5.1/jre/lib/fonts/LucidaSansRegular.ttf

Then copy the font you want to use to/home/yourusername/Zend/ZendStudio-5.5.1/JRE/lib/fonts (If your installation path is default) and rename it lucidasansregular. TTF
For example, I used the song copied from below win.

Code:

cp /usr/share/fonts/truetype/simsun.ttc /home/YourUsername/Zend/ZendStudio-5.5.1/jre/lib/fonts/LucidaSansRegular.ttf

OK. Restart zendstudio.

For others, look at your personal preferences ..

BTW: if some windows of zendstudio are blank after opening, you can change system-preference-appearance-visual effect to none .. That is, there is no special effect ..

Lamp is not that mysterious! Except for the download time, the entire configuration process will never take you five minutes.

First of all, thank you for taking the time to read this post.

I am also a beginner. I have been using Ubuntu for less than two days. For more information, see.

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.