Installing LAMP (Linux, Apache, MySQL and PHP) On Linux Mint。

Installing LAMP (Linux, Apache, MySQL and PHP) On Linux Mint

Through this tutorial, you’ll learn how to Install Apache, MySQL and PHP.

If you’re a webpage designer or developer and use PHP, mySQL and Apache, you’ll be needing these applications to be installed. When I istalled Mint, I was looking for a way to install LAMP and found a tutorial on a website by somebody named “Cargoship”. That tutorial was for ubuntu. But I installed it on my Linux mint, and it is working.

In this guide I will show you how to install a LAMP system. LAMP stands for Linux, Apache, MySQL, PHP. The guide is intended to help those who have very little knowlegde of using Linux.

We will not cover how to install Linux the L of LAMP, because Linux Mint is already installed in your computer.

Install Apache

To start off we will install Apache.

1. Open up the Terminal (Applications > Accessories > Terminal).

2. Copy/Paste or type the following line of code into Terminal and then press enter:

sudo apt-get install apache2

3. The Terminal will then ask you for you’re password, type it and then press enter.

Testing Apache

To make sure everything installed correctly we will now test Apache to ensure it is working properly.

1. Open up any web browser and then enter the following into the web address:

http://localhost/

You should see a folder entitled apache2-default/. Open it and you will see a message saying “It works!” , congrats to you! or something like that!

Install PHP

In this part we will install PHP 5.

Step 1. Again open up the Terminal (Applications > Accessories > Terminal).

Step 2. Copy/Paste or type the following line into Terminal and press enter:

sudo apt-get install php5 libapache2-mod-php5

Step 3. In order for PHP to work and be compatible with Apache we must restart Apache. Type the following code in Terminal to do this:

sudo /etc/init.d/apache2 restart

Test PHP

To ensure there are no issues with PHP let’s give it a quick test run.

Step 1. In the terminal copy/paste or type the following line:

sudo gedit /var/www/testphp.php

This will open up a file called testphp.php.

Step 2. Copy/Paste this line into the phptest file:

Step 3. Save and close the file.

Step 4. Now open you’re web browser and type the following into the web address:

http://localhost/testphp.php

(It will show you the page that has all information about your php. If you have prior experience of installing php in some other OS, you must have seen this page.)

Congrats you have now installed both Apache and PHP!

Install MySQL

To finish this guide up we will install MySQL.

Step 1. Once again open up the amazing Terminal and then copy/paste or type this line:

sudo apt-get install mysql-server

Step 2 (optional). In order for other computers on your network to view the server you have created, you must first edit the “Bind Address”. Begin by opening up Terminal to edit the my.cnf file.

gksudo gedit /etc/mysql/my.cnf

Change the line

bind-address = 127.0.0.1

And change the 127.0.0.1 to your IP address.

(In Linux Mint 11, terminal itself asked to the set password, But if it doesn’t follow the step 3.)

Step 3. This is where things may start to get tricky. Begin by typing the following into Terminal:

mysql -u root

Following that copy/paste or type this line:

mysql> SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘yourpassword’);

(Make sure to change yourpassword to a password of your choice.)

Step 4. We are now going to install a program called phpMyAdmin which is an easy tool to edit your databases. Copy/paste or type the following line into Terminal:

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

After that is installed our next task is to get PHP to work with MySQL. To do this we will need to open a file entitled php.ini. To open it type the following:

gksudo gedit /etc/php5/apache2/php.ini

Now we are going to have to uncomment the following line by taking out the semicolon (;).

Change this line:

;extension=mysql.so

To look like this:

extension=mysql.so

Now just restart Apache and you are all set!

sudo /etc/init.d/apache2 restart

If you get a 404 error upon visiting http://localhost/phpmyadmin: You will need to configure apache2.conf to work with Phpmyadmin.

sudo gedit /etc/apache2/apache2.conf

Include the following line at the bottom of the file, save and quit.

Include /etc/phpmyadmin/apache.conf

Then just restart Apache

sudo /etc/init.d/apache2 restart

Now make wonderful website and have fun!

Terminal scares the newbies, but here, you’ll see how magical terminal or comand promt (whatever you call it) is.

And as Linux is very secure OS, it’ll ask you the password again and again, on every administrative command. You’ll have to type in your password many times, whenever terminal asks for it.

linux mint php mysql_Installing LAMP (Linux, Apache, MySQL and PHP) On Linux Mint相关推荐

  1. linux应用之Lamp(apache+mysql+php)的源码安装(centos)

    Linux+Apache+Mysql+Php源码安装 一.安装环境: 系统:Centos6.5x64 Apache: httpd-2.4.10.tar.gz Mysql: mysql-5.6.20-l ...

  2. Linux(centOS)手动安装Apache+MySQL+PHP+Memcached+Nginx原创无错版

    最后更新时间:2012.3.21 =================== 第一步:Apache安装(已更新到2.2.22) =================== 下载 去 http://www.ap ...

  3. 如何搭建lamp(CentOS7+Apache+MySQL+PHP)环境 [转]

    在网上搜资料,自己在本地虚拟机上尝试搭建,弄了整整一天一夜,终于弄好了. 网上的资料,虽然很多,但大多都是重复的,拿去试了之后,又很多都不能得到正确的结果.最终找到了适合我的linux环境的搭建方式; ...

  4. 如何搭建lamp(CentOS7+Apache+MySQL+PHP)环境

    在网上搜资料,自己在本地虚拟机上尝试搭建,弄了整整一天一夜,终于弄好了. 网上的资料,虽然很多,但大多都是重复的,拿去试了之后,又很多都不能得到正确的结果.最终找到了适合我的linux环境的搭建方式; ...

  5. 部署并安装Discuz论坛(首先搭建LAMP环境Apache+MySQL+PHP)

    一.安装Apache 1.查看是否安装过Apache. rpm -qa | grep httpd 2.有就卸载httpd. yum remove -y "httpd*" 3.重新安 ...

  6. fedora apache php,Fedora 20下安装搭建LAMP环境Apache+MySQL+PHP

    1.安装数据库,有两个数据库可选:MySQL/MariaDB yum install mysql mysql-server 为MySQL创建启动连接 (这样 MySQL 将随系统自动启动)并启动 My ...

  7. ubuntu lamp(apache+mysql+php) 环境搭建及相关扩展更新

    一.环境安装 1.安装apache2 sudo apt-get install apache2 安装后在浏览器中打开:http://localhost/或者http://127.0.0.1 如果出现I ...

  8. Debian配置LAMP(Apache/MySQL/PHP)ecshop环境

    第一.安装和配置Apache Web服务器 运行升级命令来确保我们的系统组件各方面都是最新的. apt-get update apt-get upgrade --show-upgraded 安装Apa ...

  9. centos 6.5 安装 lamp 后mysql不能启动_CentOS 6.5 系统 LAMP(Apache+MySQL+PHP)安装步骤

    先来解释一下,什么是 LAMP.正如标题所言,LAMP 实际上就是 Linux.Apache.MySQL.PHP 四个名称的缩写,当然最后一个 "P" 还有其他说法是 Perl 或 ...

最新文章

  1. 51CTO独家调查:谁是十年最具影响力厂商
  2. Windows:让Windows XP中的IIS支持多站点的工具
  3. 【深度学习】基于Torch的Python开源机器学习库PyTorch回归
  4. fedora虚拟机中的vsftp服务配置
  5. [STL]priority_queue
  6. 数学学习笔记-三角函数
  7. Akka-CQRS(16)- gRPC用JWT进行权限管理
  8. Java中的frontcolor_关于java:Color.red和Color.RED之间的区别
  9. mysql在windows启动_MySQL笔记:mySQL在windows环境启动
  10. 【原创】编程题练习:头插法尾插法建立单链表及找寻单链表中的倒数第K个节点...
  11. linux 移动硬盘 mac,Macbook pro使用原生EFI在移动硬盘安装Windows+Fedora双系统
  12. 个编得好的拼音输入法C51的
  13. Codeforces——C. Yet Another Walking Robot
  14. 利用Python实现自动投票以及自动爬虫IP代理
  15. linux环境查看cpu是否开启睿频
  16. 国际标准书号 (International Standard Book Number, ISBN)是专门为识别图书等文献而设计的国际编号
  17. abap 发票冲销VF11的BAPI:BAPI_BILLINGDOC_CANCEL1
  18. 公比为无理数的等比数列的近似表示
  19. 试题 算法训练 无聊的逗 - 蓝桥杯
  20. mht转换html delphi,delphi – 创建*. Mht文件(网络档案)

热门文章

  1. 工业物联网卡未来发展的优势和特点
  2. 使用CSS实现网格+渐变背景色的Web页面背景
  3. python报表自动化系列 - 获取某个时间段内所有日期
  4. 浮点数表示(记录学习过程中遇到的问题)
  5. 连接好友服务器失败 无法显示,不显示好友的网络状态
  6. iText 中写Word RTF 文档 中文字体设置
  7. Html5的测试总结
  8. 一款超级实用的SuperLayout
  9. 辗转相除法求最大公约数 php
  10. 干货 | 豆子科技首席架构师钟声:Java的纯真年代