lamp ubuntu
来源:互联网 发布:linux如何安装jmeter 编辑:程序博客网 时间:2024/05/22 10:44
apt-get install openssh-server ,then modify the root password.
apt-get install apache2
apt-get install mysql-server mysql-client, input passwd in the insatlling process.
apt-get install php5 libapache2-mod-php5
a error phpmyadmin
how to install mod_security :http://www.howtoforge.com/installing-mod-security-on-sles10
虽然ubuntu安装lamp很简单,但还是很多朋友安装不成功,借此把一下安装步骤写一下看看
安装步骤
1.Install SSH Client and Server (for my remote access)
sudo apt-get install ssh
2. Install Database Server(传言现在只能装5.0的版本,别的我没实践过)
sudo apt-get install mysql-server-5.0
3. Install Apache HTTP Server
sudo apt-get install apache2
4.Install PHP5 and Apache PHP5 module
sudo apt-get install php5 libapache2-mod-php5
5.Install php5-mysql
sudo apt-get install php5-mysql
6. Restart Apache
sudo /etc/init.d/apache2 restart
7. Optionally, install phpMyAdminsudo apt-get install phpmyadmin
注意:如果你想运行php脚本,还得安装php5-cli
sudo apt-get install php5-cli(这个是网上查到的,但是有些人没有提到这条。)
配置
1.配置php5
sudo gedit /etc/php5/apache2/php.ini
允许 mysql 和 gd 模块,检查文件最后是否包含下面的代码,如果没有添加上。(默认是在配置文件最后有添加的,检查一下以防万一)
extension=mysql.so
extension=gd.so
2.配置apache2
sudo gedit /etc/apache2/conf.d/charset
这个是网站编码配置,里面内容很少,打开看就知道了,我这里将最后行的 #AddDefaultCharset UTF-8 前面的#去掉,使用UTF-8编码,当然也可以把 UTF-8改成别的编码.
sudo gedit /etc/apache2/sites-available/default
更改apache2运行路径,更改DocumentRoot 指向的路径(绝对路径),更改< Directory > 里的路径,和DocumentRoot保持一致
3.配置 mysql,让它支持其它客户端访问,如果你不需要就不用修改。sudo gedit /etc/mysql/my.cnf
查找文件skip-networking
修改为#skip-networking
保存并关闭文件。
重新启动 mysqlsudo /etc/init.d/mysql restart
测试
为了检查你的
使用如下命令运行 Apache:
sudo /usr/sbin/apache2ctl start
要停止 Apache,使用:sudo /usr/sbin/apache2ctl stop
最后,重启 Apache,执行如下命令:sudo /usr/sbin/apache2ctl restart
- ubuntu lamp
- Ubuntu LAMP
- lamp ubuntu
- ubuntu lamp
- ubuntu (LAMP)
- ubuntu LAMP install
- ubuntu lamp配置
- ubuntu下LAMP安装
- ubuntu 手动编译lamp
- ubuntu 手动编译lamp
- Ubuntu下LAMP安装
- Ubuntu LAMP环境搭建
- ubuntu lamp xdebug
- ubuntu快速搭建LAMP
- LAMP Install basing ubuntu
- Ubuntu 10.10 LAMP
- UBUNTU 下LAMP 搭建
- ubuntu下配置LAMP
- const
- 在windows下开发的常见错误——持续更新,不断完善
- poj 1251(Kruskal)
- PPT排版技巧
- MongoDb在C#中查询
- lamp ubuntu
- 彩信平台软件模块清单
- 数据在磁盘上的分布
- c++静态那些事
- 以实践的方式学习C++ &(引用)
- Android-stagefright与opencore对比
- HDU-2028(最小公倍数)
- C++ primer plus(一)预备知识
- cocos2d-x 中文乱码