ubuntu10.04安装lamp的脚本
来源:互联网 发布:网络聊天各种骗局 编辑:程序博客网 时间:2024/05/16 10:00
#!/bin/bash
#first install
#attention to input root passwd
sudo apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql
#then change the authority of the directory
sudo chmod 777 /var/www/
sudo apt-get install phpmyadmin
sudo ln -s /usr/share/phpmyadmin /var/www
#cannot load mcrypt
sudo apt-get install libmcrypt4 php5-mcrypt
#start rewrite service
sudo a2enmod rewrite
#restart the service
sudo /etc/init.d/apache2 restart
#modify the config file
sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak
#support php
sudo echo 'AddType application/x-httpd-php .php .htm .html' >>/etc/apache2/apache2.conf
#encode
sudo echo 'AddDefaultCharset UTF-8' >>/etc/apache2/apache2.conf
#Restarting web server apache2 apache2:
#Could not reliably determine the server's fully qualified domain name,
# using 127.0.1.1 for ServerName
sudo echo 'ServerName 127.0.0.1' >>/etc/apache2/apache2.conf
sudo /etc/init.d/apache2 restart
#test
cat <<END >/var/www/test.php
<?php
$result = @mysql_connect("localhost","root","passwd");
if (!$result)
{
die('无法连接! ' . mysql_error());
}
else echo "Mysql已经正确配置";
mysql_close($result);
?>
END
firefox http://localhost/test.php
- ubuntu10.04安装lamp的脚本
- ubuntu10.04 下LAMP的搭建安装
- ubuntu10.04下安装LAMP
- UBUNTU10.04 下安装 lamp
- ubuntu10.04下安装LAMP
- ubuntu10.04 安装lamp环境
- Ubuntu10.10安装LAMP
- Ubuntu10.04配置LAMP
- ubuntu10.04 LAMP
- ubuntu10.04构建LAMP
- ubuntu10.04 使用apt-get 安装LAMP环境
- ubuntu10.04的安装
- LAMP服务器安装脚本
- 简单LAMP安装脚本
- LAMP自动化安装脚本
- ubuntu10.10一键安装LAMP
- Ubuntu10.10下安装lamp环境
- Ubuntu10.10上配置安装LAMP
- SSE Level 2 Vendor Interface Specification(FAST)-15章-FAST Decoder(FAST解析-第二部分)
- Android开发中程序退出的三种方法
- 命令 “net time //远程机名” 访问拒绝的解决办法
- 全局函数要加:: 来区分于局部函数
- powerdesigner中OOM添加JAVA注释
- ubuntu10.04安装lamp的脚本
- PUDN
- pthread_cond_wait()
- 模拟电子技术22 40-----——多级放大电路 计算 动态分析
- ubuntu 10.04 安装CVS服务器
- oracle连接数问题相关,session状态说明
- 3.14 文件I/O_fcntl函数
- ASP.NET页面生命周期概述(转载)
- 【WindowsCE】如何实现HIVE registry