Ubuntu搭建LAMP环境
来源:互联网 发布:上海大学网络教育平台 编辑:程序博客网 时间:2024/05/17 13:10
原文地址:http://blog.csdn.net/callmeback/article/details/8130190
LAMP搭建环境
安装过程
第一步 安装Apache2
sudo apt-get install mysql-client
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
sudo apt-get install php5-gd
安装过程中选择apache2,点击确定。下一步选择是要配置数据库,并输入密码。
然后直接运行http://localhost/phpmyadmin,看有没有数据库管理软件出现。
配置过程
第一步 启用mod_rewrite模块
重启Apache服务器:sudo /etc/init.d/apache2 restart或者sudo service apache2 restart
添加以下句子:AddType application/x-httpd-php .php .htm .html
<?php
if(!$link)
访问 http://localhost/mysql_test.php 显示’Mysql 配置正确‘就代表配置正确。
添加如下代码:AddDefaultCharset UTF-8
<VirtualHost *:80>
ServerAdmin webbmaster@localhost
ServerName blog.myfunc.com
DocumentRoot /var/www/webb
<Directory />
Options FollowSymLinks
DirectoryIndex index.php index.html index.htm
AllowOverride None
</Directory>
<Directory /var/www/webb>
# Options Indexes FollowSymLinks MultiViews
Options FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
或者
<VirtualHost *:80>
DocumentRoot "/var/www/wwwroot"
ServerName www.myfunc.com
</Virtualhost>
- Ubuntu LAMP环境搭建
- Ubuntu 搭建LAMP环境
- Ubuntu搭建LAMP环境
- ubuntu搭建LAMP环境
- Ubuntu搭建LAMP环境
- Ubuntu搭建LAMP环境
- ubuntu 环境lamp搭建
- Ubuntu搭建LAMP环境
- Ubuntu搭建LAMP环境
- LAMP环境搭建(Ubuntu
- Ubuntu搭建LAMP环境
- Ubuntu搭建LAMP环境
- Ubuntu搭建LAMP环境
- ubuntu搭建lamp环境
- Ubuntu搭建LAMP环境
- Ubuntu搭建LAMP环境
- Ubuntu搭建LAMP环境
- Ubuntu LAMP 环境搭建
- NSCalendar + NSDateComponents
- CMake如何查找链接库,路径错误
- soundtouch 变声使用和算法
- codevs 1069 关押罪犯 并查集
- 一元云购系统接入手机短信功能说明【V3版】
- Ubuntu搭建LAMP环境
- HTTP协议
- Node.js基础学习之常见API理解
- python2.7:str.find 用法
- 大二前工作计划
- Linux学习笔记_常用命令1_文件处理和权限处理
- 【转】三种经典iPhone上网络抓包方法详解
- iOS 批量下载-效果图
- OpenCV安装:OpenCV 3.1.0 +VS2015 开发环境配置