Chinaunix首页 | 论坛 | 博客
  • 博客访问: 846418
  • 博文数量: 366
  • 博客积分: 10267
  • 博客等级: 上将
  • 技术积分: 4290
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-24 14:04
文章分类

全部博文(366)

文章存档

2012年(366)

分类: 系统运维

2012-04-21 22:56:10

Step 1:
Installing apache

Open Terminal. To open terminal click the Dash home from unity launcher. And type terminal in the search field.And click Terminal .

 

And type the below code in terminal and hit enter.

sudo apt-get install apache2

Type your ubuntu password and press enter.

Type y and hit enter to confirm apache installation.

After the successful installation  , open your favorite browser and type

in the address bar and press enter. If you will see ‘It works!’ , then your apache works fine.

Step 2:
Installing PHP

Open Terminal. And type the below code in terminal and hit enter.

sudo apt-get install php5 libapache2-mod-php5

Type your ubuntu password if needed.

Type y and hit enter to confirm PHP installation.
After the successful installation restart Apache using the below code

sudo /etc/init.d/apache2 restart

Test PHP installation

To test PHP is installed, Type

sudo gedit /var/www/phpinfo.php

in the terminal and type your ubuntu password if needed. It will open the phpinfo.php file in gedit.Type below code in the phpinfo.php file, save and exit it .

Now open your favorite browser and type phpinfo.php in the address bar and press enter. If you will see the below page , then your php works fine.

Step 3:
Installing MySql

Open Terminal. And type the below code in terminal and hit enter.

sudo apt-get install mysql-server

Type your ubuntu password if needed.

Type y and hit enter to confirm MySql installation.
During the installation you will be prompted for a password.Choose something secure and type the password and hit enter .

Repeat the password and press enter.

Step 4:
Installing phpMyadmin

phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web.

Open Terminall. And type the below code in terminal and hit enter.

sudo apt-get install phpmyadmin

Type your ubuntu password if needed.

Type y and hit enter to confirm phpMyadmin installation.

During the installation you will be prompted for a webserver configuration.
Select

apache2

(already selected)
press enter.

Now you will be promped for phpmyadmin configuration

Select

No

and press enter.

Type below command in terminal

sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d

restart your apache server using

sudo /etc/init.d/apache2 restart

Open your browser and type

phpmyadmin/

in the address bar and press enter.

Type your mysql root  username and password to login.

You’re now ready to start building your local website. just put all of your files into

/var/www


it is from :
人性最可怜的就是:我们总是梦想着天边的一座奇妙的玫瑰园,而不去欣赏今天就开在我们窗口的玫瑰。
阅读(1492) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~