Linux ubuntu lamp安装配置
LAMP(Linux+Apache+Mysql+Perl/PHP/Python)是基于Linux,Apache,MySQL和PHP的开放资源网络开发平台,被喻为PHP开发的黄金组合。
1.Ubuntu
环境中安装LAMP组件
系统->系统管理->新立得软件包管理器, 打开新立得,编辑 –> 使用任务分组标记软件包 –> 勾选 LAMP Server。
(把ubuntu重新安装为最新版本ubuntu10.10后,在新立得软件包管理器里并没有立得软件包管理器-编辑--使用任务标记分组软件包--
实际上只需2条命令即可
sudo apt-get install tasksel
任务标记分组
sudo tasksel install lamp-server
) |
2.安装phpmyadmin
系统->系统管理->新立得软件包管理器,打开新立得搜索phpmyadmin,标记安装。
或sudo
apt-get install phpmyadmin
,将phpmyadmin与apache2建立硬连接,比如我的www目录在/home/dreamcatcher/www,用命令:sudo ln
-s /usr/share/phpmyadmin
/home/dreamcatcher/www即可在浏览器地址栏中打开http://localhost/phpmyadmin.
3.启用 mod_rewrite 模块
sudo a2enmod rewrite
4.让apache支持.htm .html .php
sudo gedit /etc/apache2/apache2.conf
在文件后面加上
AddType application/x-httpd-php .php .htm .html
解决firefox显示乱码,还是这个文件,在后面加上
AddDefaultCharset UTF-8
这里的 UTF-8 也可根据实际情况用 gb2312代替.
5.重启apache
sudo /etc/init.d/apache2 restart
6.mysql的启动:mysql -u root -p,然后根据提示,输入password即可。
如果出现:
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
继续sudo gedit /etc/apache2/apache2.conf
在文件后面加上:ServerName 127.0.0.1
说明:记住以下几个命令和位置
sudo /etc/init.d/apache2 restart (重启 apache)
sudo gedit /etc/php5/apache2/php.ini (配置 php.ini)
sudo gedit /etc/apache2/apache2.conf (配置 apache2.conf)
/var/www/cgi-bin/ (CGI 程序)
上一篇: UC和DZ的邮件发送问题
推荐阅读
-
Linux下从零开始安装配置Nginx服务器+PHP开发环境,_PHP教程
-
linux下jdk的安装及环境变量配置
-
PHP7+Nginx的配置与安装教程详解 php7 mysql php7安装教程 ubuntu php
-
Linux操作系统安装LAMP环境,linux操作系统lamp
-
RedHat Linux 5.6 下安装Oracle 11g 时netca报错不能配置监听解决方法
-
Ubuntu系统:管理节点(MGM)的安装及配置
-
Linux Nginx下SSL证书安装方法及WordPress CDN配置
-
Linux下配置MySQL免安装版
-
Linux配置部署_新手向(二)——Nginx安装与配置
-
wps for linux 安装后系统缺失字体安装配置