- 论坛徽章:
- 0
|
LAMP=LINUX+APACHE+MYSQL+PHP,见名知义,前提是linux操作系统,我使用的是ubuntu9.10,所以下面的步骤都是在这上面操作的,linux其他的发行版类似,只要你不是windows就行了,嘿嘿。下面是安装mysql和apache和php的过程。
1.首先安装mysql:安装命令是:sudo apt-get install mysql-server-5.0[color="#000102"]
[color="#000102"]我这里只是简单的介绍LAMP框架的搭建,[color="#000102"]有些雪数据库的可能只是需要安装mysql而已,[color="#000102"]有一些细节问题可以查看mysql安装手册(安装过程会提示输入用户名和密码)[color="#000102"]怎样测试mysql是否安装成功呢,当然能启动就证明安装成功:[color="#000102"]zhou@zhou~$:mysql -u username -p[color="#000102"]Enter password:[color="#000102"]Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 50Server version: 5.1.37-1ubuntu5 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> 只要有上面的信息就证明安装mysql成功
2.然后是安装apache:
sudo apt-get install apache2然后在浏览器中打开:http://localhost/显示下面信息就好It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
3.最后是安装php
sudo apt-get install php5sudo apt-get install libapache2-mod-php5
然后启动sudo /etc/init.d/apache2 restart
测试PHP5是否安装成功sudo gedit /var/www/testphp.php在里面写入phpinfo();?>
然后在浏览器中打开http://localhost/test.php,就会进入php的信息网页,
如果进入,证明安装成功。
好了,这些就是LAMP的基本框架已经差不多搭建起来,
不过还有一些小问题,比如让php和mysql一起工作,这些在后面我就会说到。
[color="#000102"]
[color="#8E8E8E"]
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/104183/showart_2100296.html |
|