在Ubuntu上安裝LAMP伺服器
1.安裝Ubuntu上安裝LAMP
1
|
apt- get install lamp-server^
|
2.安裝過程中設定MySql密碼
3.測試 建立index.php
var/www/html/index.php
index.php的內容為
1
|
<?php phpinfo(); ?> |
重啟apache,
service apache2 restart
在瀏覽器中輸入
1
|
http: //localhost/index.php
|
或者localhost改為IP地址
5配置MYSql
1
|
cat /etc/hosts | grep localhost |
顯示:127.0.0.1 localhost
1
|
cat /etc/mysql/my.cnf | grep bind-address |
顯示:bind-address = 127.0.0.1
6. 安裝phpMyAdmin
1
|
apt- get install phpmyadmin
|
7. 配置Apache伺服器
1
|
cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf |
然後重啟apache
訪問http://localhost/phpmyadmin頁面
如果出現如下錯誤:
#2002 – The server is not responding (or the local MySQL server`s socket is not correctly configured)
解決方法:
/etc/mysql/my.cnf
1
2
3
|
[client] port = 3306 socket = / var /run/mysqld/mysqld.sock
|
本文轉自Work Hard Work Smart部落格園部落格,原文連結:http://www.cnblogs.com/linlf03/p/5819075.html,如需轉載請自行聯絡原作者
相關文章
- 圖解 Ubuntu Server 16.04 LTS 上安裝 LAMP圖解UbuntuServerLAMP
- ubuntu sever 倆個命令安裝 lampUbuntuLAMP
- 在Ubuntu上安裝MariaDBUbuntu
- 在 Ubuntu 上安裝 Budgie 桌面Ubuntu
- 在Ubuntu上安裝openssh(轉)Ubuntu
- 在virtualbox上安裝ubuntuUbuntu
- 在 Ubuntu 14.04 上安裝 Ubuntu Tweak 0.8.8Ubuntu
- 在Ubuntu上安裝OpenShift並使用Ubuntu
- 在 Ubuntu 上使用原始碼安裝 OpenRestyUbuntu原始碼REST
- 教程:在Ubuntu 18.04.1上安裝ElasticsearchUbuntuElasticsearch
- 在Ubuntu 18.04上安裝TensorflowUbuntu
- 在Ubuntu上單機安裝HadoopUbuntuHadoop
- 怎樣安裝在ubuntu12.04上安裝mysqlUbuntuMySql
- 在 Ubuntu 15.10 上安裝 Intel Graphics 安裝器UbuntuIntel
- 如何在 Ubuntu 上安裝 EMQX MQTT 伺服器UbuntuMQQT伺服器
- lamp安裝LAMP
- 怎樣在 Ubuntu Linux 上安裝 MySQLUbuntuLinuxMySql
- 在Ubuntu上安裝Hadoop單機版UbuntuHadoop
- 教你在Ubuntu上安裝Linux核心6.1UbuntuLinux
- Ubuntu上PHPUnit安裝UbuntuPHP
- Ubuntu 上 安裝 redisUbuntuRedis
- 在 Fedora 上安裝 MongoDB 伺服器MongoDB伺服器
- 在Ubuntu安裝MySqlUbuntuMySql
- Kaldi學習(一)kaldi在ubuntu上的安裝Ubuntu
- 在Ubuntu上安裝Drone持續整合環境Ubuntu
- 在Ubuntu 18.04.1上安裝Hadoop叢集UbuntuHadoop
- 在 Ubuntu 22.04 上安裝 KubeSphere 實戰教程Ubuntu
- 最新版 Harbor 在ubuntu系統上安裝Ubuntu
- 在Ubuntu16.04上安裝LEMP環境Ubuntu
- yum安裝lampLAMP
- 在騰訊雲的ubuntu伺服器上面安裝git伺服器Ubuntu伺服器Git
- ubuntu18搭建LAMP環境+部署圖片上傳網頁+安裝MosquittoUbuntuLAMP網頁UI
- 在Centos5.2下編譯安裝LAMPCentOS編譯LAMP
- 如何在 Ubuntu 伺服器上安裝桌面環境 (GUI)Ubuntu伺服器GUI
- 在Ubuntu上安裝最新版本的HandbrakeUbuntu
- 在 Ubuntu 上安裝 .NET SDK 或 .NET 執行時Ubuntu
- 網路分析利器:在 Ubuntu 16.04 上安裝 BroUbuntu
- 在 Debian 和 Ubuntu 上安裝 Cutefish 可愛魚Ubuntu