在Ubuntu Server上配置LAMP
来源:互联网 发布:网络游戏音乐 编辑:程序博客网 时间:2024/06/05 23:57
昨天安了系统,今天继续。
1.首先确认一下相应软件是否已经安装,使用aptitude查看已经安装的包。“h”帮助,“q”退出。
发现MySQL、apache和PHP都未安装。
2.安装gcc: sudo apt-get install gcc。注意联网,而且如果开始没连网线,连上之后需要reboot。
3.升级系统
sudo apt-get update
sudo apt-get dist-upgrade
4.按照这篇文章的步骤,安装三个包:
4.1.MySQL5
sudo apt-get install mysql-server
安装过程中按提示设置了root的密码。
4.2.apache2
sudo apt-get install apache2
这个过程中安装了libapache2-mod-php5。
4.3.PHP5
sudo apt-get install php5
4.4.其它
sudo apt-get install php5-mysql
sudo apt-get install php5-gd
libapache2-mod-auth-mysql
4.5.跳过了文章中的3.配置
4.6.按文章中说的安装phpmyadmin
sudo apt-get install phpmyadmin
但在/etc/phpmyadmin/config.inc.php中没能找到$cfg['Servers'][$i]['password'],故未改。也没有登http://localhost/phpmyadmin/来看。
5.确认已经安装的服务的运行情况
5.1.MySQL
mysql -u root -p
Enter password:
mysql> show databases;
列出了两个数据库,一个是mysql,而另一个不是test,而是一个schema库。
5.2.apache
由于Ubuntu Server没有X窗口,从局域网里另一台机器上用IP访问,出现“It Works!”页面。成功。
5.3.PHP
在根目录下建立新文件test.php:
<?php phpinfo(); ?>
从另一台机器访问IP/test.php,显示一个顶部为“PHP Version ...”的界面,下面列出了一些运行和配置情况。成功。
另外做个笔记,apt-get和aptitude的区别:《Apt不止是apt-get》
apache2的操作命令:
启动:sudo /etc/init.d/apache2 start
重启:sudo /etc/init.d/apache2 restart
关闭:sudo /etc/init.d/apache2 stop
apache2的默认主目录:/var/www/
- 在Ubuntu Server上配置LAMP
- 在Ubuntu server上配置lamp环境
- 在Ubuntu上配置LAMP环境
- 如何在ubuntu server上安装图形界面并配置lamp和phpmyadmin
- 在 Ubuntu Server 16.04 LTS 上安装 LAMP
- Ubuntu上安装 LAMP Server
- 在ubuntu上安装LAMP
- 在ubuntu下配置LAMP
- 在Ubuntu 14.10上配置git server
- Ubuntu server 10.04安装配置lamp服务器
- 虚拟机安装Ubuntu Server,配置LAMP
- Ubuntu Server 14.04 的LAMP配置
- 在Ubuntu Server下搭建LAMP环境
- 在Ubuntu Server下搭建LAMP环境
- 在Ubuntu 12.04(精确的穿山甲)上安装LAMP Server
- 在ubuntu上搭建lamp服务器+wiki
- 在Ubuntu主机上架构LAMP
- 在Ubuntu 16.04 LTS上搭建LAMP
- json劫持
- 12月20号英语学习
- 下周MySQL学习计划安排
- TAPI 函数功能简介
- 动态链接库,创建四则运算
- 在Ubuntu Server上配置LAMP
- 庖丁解牛-----winpcap源码彻底解密(五)
- 最近翻译的ISAPI_Rewrite中文手册
- cocos2d 中的奥妙
- javascript闭包详解
- Web项目压力测试工具集锦
- 接口
- c#中String和string的区别
- 最近翻译的ISAPI_Rewrite中文手册2