在本文中,我们将为您详细介绍我在我的ubuntu上安装了phpmyadmin,但它没有用的相关知识,并且为您解答关于ubuntu安装php的疑问,此外,我们还会提供一些关于centos上安装好了PHP
在本文中,我们将为您详细介绍我在我的ubuntu上安装了phpmyadmin,但它没有用的相关知识,并且为您解答关于ubuntu 安装php的疑问,此外,我们还会提供一些关于centos上安装好了PHP MYSQL 以及PHPMYADMIN、linux ubuntu lamp 安装配置环境 +phpmyadmin (-)、Linux ubuntu lamp 安装配置环境 phpmyadmin、mysql - Ubuntu16.04安装phpmyadmin出现错误?的有用信息。
本文目录一览:- 我在我的ubuntu上安装了phpmyadmin,但它没有用(ubuntu 安装php)
- centos上安装好了PHP MYSQL 以及PHPMYADMIN
- linux ubuntu lamp 安装配置环境 +phpmyadmin (-)
- Linux ubuntu lamp 安装配置环境 phpmyadmin
- mysql - Ubuntu16.04安装phpmyadmin出现错误?
我在我的ubuntu上安装了phpmyadmin,但它没有用(ubuntu 安装php)
这是/etc/PHPmyadmin/config.inc.PHP文件的内容
如果输入密码#2002则无法登录MySQL服务器
如果我们不输入密码配置禁止没有密码的登录(请参阅Allownopassword)
你能帮助我吗
/** * Debian local configuration file * * This file overrides the settings made by PHPMyAdmin interactive setup * utility. * * For example configuration see /usr/share/doc/PHPmyadmin/examples/config.default.PHP.gz * * NOTE: do not add security sensitive data to this file (like passwords) * unless you really kNow what you're doing. If you do,any user that can * run PHP or CGI on your webserver will be able to read them. If you still * want to do this,make sure to properly secure the access to this file * (also on the filesystem level). */
/** * Server(s) configuration */ $i = 0; // The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0]. // You can disable a server config entry by setting host to ''. $i++;
/** * Read configuration from dbconfig-common * You can regenerate it using: dpkg-reconfigure -plow PHPmyadmin */ if (is_readable('/etc/PHPmyadmin/config-db.PHP')) { require('/etc/PHPmyadmin/config-db.PHP'); }
/* Configure according to dbconfig-common if enabled / if (!empty($dbname)) { / Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'cookie'; /* Server parameters */ if (empty($dbserver)) $dbserver = 'localhost'; $cfg['Servers'][$i]['host'] = $dbserver;
if (!empty($dbport)) { $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['port'] = $dbport; } //$cfg['Servers'][$i]['compress'] = false; /* Select MysqLi if your server has it */ $cfg['Servers'][$i]['extension'] = 'MysqLi'; /* Optional: User for advanced features */ $cfg['Servers'][$i]['controluser'] = $dbuser;
$cfg ['Servers'] [$i] ['controlpass'] = $dbpass;
/ *可选:高级PHPMyAdmin功能* /
$cfg ['Servers'] [$i] ['pmadb'] = $dbname;
$cfg ['Servers'] [$i] ['bookmarktable'] ='pma_bookmark';
$cfg ['Servers'] [$i] ['relation'] ='pma_relation';
$cfg ['Servers'] [$i] ['table_info'] ='pma_table_info';
$cfg ['Servers'] [$i] ['table_coords'] ='pma_table_coords';
$cfg ['Servers'] [$i] ['pdf_pages'] ='pma_pdf_pages';
$cfg ['Servers'] [$i] ['column_info'] ='pma_column_info';
$cfg ['Servers'] [$i] ['history'] ='pma_history';
$cfg ['Servers'] [$i] ['designer_coords'] ='pma_designer_coords';/* Uncomment the following to enable logging in to passwordless accounts,* after taking note of the associated security risks. */
// $cfg ['Servers'] [$i] ['Allownopassword'] = TRUE;
/* Advance to next server for rest of config */ $i++;
}
/ *身份验证类型* /
// $cfg ['Servers'] [$i] ['auth_type'] ='cookie';
/ *服务器参数* /
// $cfg ['Servers'] [$i] ['host'] ='localhost';
// $cfg ['Servers'] [$i] ['connect_type'] ='tcp';
// $cfg ['Servers'] [$i] ['compress'] = false;
/ *如果您的服务器有/它选择MysqLi /
// $cfg ['Servers'] [$i] ['extension'] ='MysqL';
/可选:高级功能用户/
// $cfg ['Servers'] [$i] ['controluser'] ='pma';
// $cfg ['Servers'] [$i] ['controlpass'] ='pmapass';
/可选:高级PHPMyAdmin功能* /
// $cfg ['Servers'] [$i] ['pmadb'] ='PHPmyadmin';
// $cfg ['Servers'] [$i] ['bookmarktable'] ='pma_bookmark';
// $cfg ['Servers'] [$i] ['relation'] ='pma_relation';
// $cfg ['Servers'] [$i] ['table_info'] ='pma_table_info';
// $cfg ['Servers'] [$i] ['table_coords'] ='pma_table_coords';
// $cfg ['Servers'] [$i] ['pdf_pages'] ='pma_pdf_pages';
// $cfg ['Servers'] [$i] ['column_info'] ='pma_column_info';
// $cfg ['Servers'] [$i] ['history'] ='pma_history';
// $cfg ['Servers'] [$i] ['designer_coords'] ='pma_designer_coords';
/ *取消注释以下内容以启用登录无密码帐户,
*注意到相关的安全风险后. * /
// $cfg ['Servers'] [$i] ['Allownopassword'] = TRUE;/ *
*服务器配置结束
* // *
if (!empty($dbport)) { $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['port'] = $dbport; } //$cfg['Servers'][$i]['compress'] = false; /* Select MysqLi if your server has it */ $cfg['Servers'][$i]['extension'] = 'MysqLi'; /* Optional: User for advanced features */ $cfg['Servers'][$i]['controluser'] = $dbuser;/* Uncomment the following to enable logging in to passwordless accounts,* after taking note of the associated security risks. *//* Advance to next server for rest of config */ $i++;
*从服务器保存/加载文件的目录
* /
$cfg ['UploadDir'] ='';
$cfg ['SaveDir'] ='';
解决方法@H_301_98@
如果您使用空白密码取消注释:
// $cfg['Servers'][$i]['Allownopassword'] = TRUE;
如果您在隔离的开发VM中,则是安全的,否则设置密码.
// $cfg['Servers'][$i]['Allownopassword'] = TRUE;
如果您在隔离的开发VM中,则是安全的,否则设置密码.
centos上安装好了PHP MYSQL 以及PHPMYADMIN
如题,我该怎么样访问在/var/www/html/里面的 WEB系统呢?
我是说在浏览器中访问,不是直接在文件里面。。
linux ubuntu lamp 安装配置环境 +phpmyadmin (-)
Linux ubuntu lamp安装配置环境phpmyadminPHP开发和服务器运行环境首选LAMP组合,即Linux+Apache+Mysql+Php/Perl/Python,能最优化服务器性能。如何在本地电脑Ubuntu 中安装和配置LAMP环境搭建?Ubuntu9.10本身就是基于Linux内核,所以Linux是现成的了。使用Ubuntu LAMP Server软件包可以很简单地实现Linux下Apache,Mysql和Php的统一安装和配置,也不再需要一个一个来安装配置了。
Ubuntu环境下如何安装LAMP组件?
使用Ubuntu界面管理器:
系统->系统管理->新立得软件包管理器->编辑->使用任务标记分组软件包->LAMP Server(勾选)->确定->返回到上一个窗口点击应用(或System->Administration->Synaptic Package Manager->Edit->Mark packages by Task->LAMP Server->OK)。然后系统会自动下载安装lamp环境软件包,几分钟就下载搞定。安装过程中会要求设置Mysql root帐号的密码,设置好了记住。另外当Ubuntu系统升级时lamp环境组件也会同时更新到最新版本。
安装完毕测试:打开Firefox浏览器在地址栏输入127.0.0.1,显示It works!表明Apache服务器已经开始工作了,LAMP安装也就这样完成了。

Linux ubuntu LAMP 安装配置环境-It Works
当然不使用Gnome,使用终端命令也很简单:
直接一条命令:apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql
LAMP组建安装好之后,PHP网络服务器根目录默认设置是在:/var/www。由于Linux系统的安全性原则,改 目录下的文件读写权限是只允许root用户操作的,所以我们不能在www文件夹中新建php文件,也不能修改和删除,必须要先修改/var/www目录的读写权限。在界面管理器中通过右键属性不能修改文件权限,得执行root终端命令:sudo chmod 777 /var/www。然后就可以写入html或php文件了。如果对777表示的文件权限不是很清楚,可以到这篇文章中看看:文件权限666是什么意思。
如何安装phpmyadmin-Mysql 数据库管理
使用界面管理器:
系统->系统管理->新立得软件包管理器->搜索 phpmyadmin->右键标记安装。
或直接使用一条命令:sudo apt-get install phpmyadmin 安装开始。
phpmyadmin设置:
在安装过程中会要求选择Web server:apache2或lighttpd,选择apache2,按tab键然后确定。然后会要求输入设置的Mysql数据库密码连接密码 Password of the database’s administrative user。
然后将phpmyadmin与apache2建立连接,以我的为例:www目录在/var/www,phpmyadmin在/usr/share/phpmyadmin目录,所以就用命令:sudo ln -s /usr/share/phpmyadmin /var/www 建立连接。
phpmyadmin测试:在浏览器地址栏中打开http://localhost/phpmyadmin。
Ubuntu LAMP 如何配置Apache1. 启用 mod_rewrite 模块
终端命令:sudo a2enmod rewrite
重启Apache服务器:sudo /etc/init.d/apache2 restart
Apache重启后我们可以测试一下,在/var/www目录下新建文件test.php,写入代码: <?php phpinfo(); ?> 保存,在地址栏输入http://127.0.0.1/test.php 或 http://localhost/test.php ,如果正确出现了php 配置信息则表明LAMP Apache已经正常工作了(记得重启Apache服务器后再测试)。
2.设置Apache支持.htm .html .php
sudo gedit /etc/apache2/apache2.conf
或sudo gedit /etc/apache2/mods-enabled/php5.conf
在打开的文件中加上
AddType application/x-httpd-php .php .htm .html 即可。
上面php,Apache 都已经测试过了,下面我们再测试一下Mysql 数据库是否已经正确启用。
在/var/www目录下新建 mysql_test.php:
<?php $link = mysql_connect("localhost","root","020511"); if (!$link) { die(''Could not connect: '' . mysql_error()); } else echo "Mysql已经正确配置"; mysql_close($link); ?>保存退出,在地址栏输入http://127.0.0.1/mysql_test.php,显示”Mysql 已经正确配置”则表示OK了,如果不行,重启Apache服务器后再试一下。
解决Firefox浏览器显示中文乱码等问题上面在FireFox浏览器中打开mysql_test.php或phpmyadmin测试时,如果出现了中文乱码,则是默认语言设置问题,解决方法如下:
打开apache配置文件: udo gedit /etc/apache2/apache2.conf,在最后面加上:AddDefaultCharset UTF-8,如果还是乱码的,再将UTF-8改用gb2312。
重启Apache:sudo /etc/init.d/apache2 restart 再刷新mysql_test.php 中文乱码没有了。
如果要人工启动mysql:mysql -u root -p,根据提示输入密码。
如果重启Apache时出现:
* Restarting web server apache2
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
则还是修改apache配置文件:sudo gedit /etc/apache2/apache2.conf,在文件最后设置:ServerName 127.0.0.1
LAMP组件经常使用的几个终端命令重启 apache:sudo /etc/init.d/apache2 restart
重启mysql:sudo /etc/init.d/mysql restart
配置 php.ini:sudo gedit /etc/php5/apache2/php.ini
配置 apache2.conf:sudo gedit /etc/apache2/apache2.conf
配置 my.cnf:sudo gedit /etc/mysql/my.cnf
PHP CGI :sudo /var/www/cgi-bin/
Ubuntu PHP 编辑器最后LAMP配置就完成了,在Ubuntu下进行简单的php代码编辑,用Gedit就可以了。Gedit支持HTML,PHP,Javascsript等近几十种语言的代码高亮功能。如果是PHP项目开发,建议使用PHP IDE编辑器,比如Zend Studio,Eclipse。据说文本编辑VIM也很不错。
PS:如果是Windows XP 下要搭建LAMP 环境,建议大家试试xampp快速安装配置法,使用也很方便快捷,点击前面的超级链接或Google一下就知道怎么用了。
Linux ubuntu lamp 安装配置环境 phpmyadmin
PHP 开发和服务器运行环境首选 LAMP 组合,即 Linux+Apache+Mysql+Php/Perl/Python,能最优化服务器性能。如何在本地电脑 Ubuntu 中安装和配置 LAMP 环境搭建?Ubuntu9.10 本身就是基于 Linux 内核,所以 Linux 是现成的了。使用 Ubuntu LAMP Server 软件包可以很简单地实现 Linux 下 Apache,Mysql 和 Php 的统一安装和配置,也不再需要一个一个来安装配置了。
Ubuntu 环境下如何安装 LAMP 组件?
使用 Ubuntu 界面管理器:
系统 -> 系统管理 -> 新立得软件包管理器 -> 编辑 -> 使用任务标记分组软件包 ->LAMP Server (勾选)-> 确定 -> 返回到上一个窗口点击应用 (或 System->Administration->Synaptic Package Manager->Edit->Mark packages by Task->LAMP Server->OK)。然后系统会自动下载安装 lamp 环境软件包,几分钟就下载搞定。安装过程中会要求设置 Mysql root 帐号的密码,设置好了记住。另外当 Ubuntu 系统升级时 lamp 环境组件也会同时更新到最新版本。
安装完毕测试:打开 Firefox 浏览器在地址栏输入 127.0.0.1,显示 It works! 表明 Apache 服务器已经开始工作了,LAMP 安装也就这样完成了。
Linux ubuntu LAMP 安装配置环境 - It Works
当然不使用 Gnome,使用终端命令也很简单:
直接一条命令:apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql
设置 Ubuntu 文件执行读写权限
LAMP 组建安装好之后,PHP 网络服务器根目录默认设置是在:/var/www。由于 Linux 系统的安全性原则,改 目录下的文件读写权限是只允许 root 用户操作的,所以我们不能在 www 文件夹中新建 php 文件,也不能修改和删除,必须要先修改 /var/www 目录的读写权限。在界面管理器中通过右键属性不能修改文件权限,得执行 root 终端命令:sudo chmod 777 /var/www
。然后就可以写入 html 或 php 文件了。如果对 777 表示的文件权限不是很清楚,可以到这篇文章中看看:文件权限 666 是什么意思。
如何安装 phpmyadmin-Mysql 数据库管理
使用界面管理器:
系统 -> 系统管理 -> 新立得软件包管理器 -> 搜索 phpmyadmin-> 右键标记安装。
或直接使用一条命令:sudo apt-get install phpmyadmin 安装开始。
phpmyadmin 设置:
在安装过程中会要求选择 Web server:apache2 或 lighttpd,选择 apache2,按 tab 键然后确定。然后会要求输入设置的 Mysql 数据库密码连接密码 Password of the database’s administrative user。
然后将 phpmyadmin 与 apache2 建立连接,以我的为例:www 目录在 /var/www,phpmyadmin 在 /usr/share/phpmyadmin 目录,所以就用命令:sudo ln -s /usr/share/phpmyadmin/var/www 建立连接。
phpmyadmin 测试:在浏览器地址栏中打开 http://localhost/phpmyadmin。
Ubuntu LAMP 如何配置 Apache
1. 启用 mod_rewrite 模块
终端命令:sudo a2enmod rewrite
重启 Apache 服务器:sudo /etc/init.d/apache2 restart
Apache 重启后我们可以测试一下,在 /var/www 目录下新建文件 test.php,写入代码: <?php phpinfo(); ?>
保存,在地址栏输入 http://127.0.0.1/test.php 或 http://localhost/test.php ,如果正确出现了 php 配置信息则表明 LAMP Apache 已经正常工作了 (记得重启 Apache 服务器后再测试)。
2. 设置 Apache 支持.htm .html .php
sudo gedit /etc/apache2/apache2.conf
或 sudo gedit /etc/apache2/mods-enabled/php5.conf
在打开的文件中加上
AddType application/x-httpd-php .php .htm .html 即可。
LAMP 配置之 Mysql 测试
上面 php,Apache 都已经测试过了,下面我们再测试一下 Mysql 数据库是否已经正确启用。
在 /var/www 目录下新建 mysql_test.php:
<?php
$link = mysql_connect("localhost","root","020511");
if (!$link)
{
die(''Could not connect: '' . mysql_error());
}
else echo "Mysql已经正确配置";
mysql_close($link);
?>
保存退出,在地址栏输入 http://127.0.0.1/mysql_test.php,显示”Mysql 已经正确配置” 则表示 OK 了,如果不行,重启 Apache 服务器后再试一下。
解决 Firefox 浏览器显示中文乱码等问题
上面在 FireFox 浏览器中打开 mysql_test.php 或 phpmyadmin 测试时,如果出现了中文乱码,则是默认语言设置问题,解决方法如下:
打开 apache 配置文件: udo gedit /etc/apache2/apache2.conf,在最后面加上:AddDefaultCharset UTF-8
,如果还是乱码的,再将 UTF-8 改用 gb2312。
重启 Apache:sudo /etc/init.d/apache2 restart 再刷新 mysql_test.php 中文乱码没有了。
如果要人工启动 mysql:mysql -u root -p,根据提示输入密码。
如果重启 Apache 时出现:
* Restarting web server apache2
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
则还是修改 apache 配置文件:sudo gedit /etc/apache2/apache2.conf,在文件最后设置:ServerName 127.0.0.1
LAMP 组件经常使用的几个终端命令
重启 apache:sudo /etc/init.d/apache2 restart
重启 mysql:sudo /etc/init.d/mysql restart
配置 php.ini:sudo gedit /etc/php5/apache2/php.ini
配置 apache2.conf:sudo gedit /etc/apache2/apache2.conf
PHP CGI :sudo /var/www/cgi-bin/
Ubuntu PHP 编辑器
最后 LAMP 配置就完成了,在 Ubuntu 下进行简单的 php 代码编辑,用 Gedit 就可以了。Gedit 支持 HTML,PHP,Javascsript 等近几十种语言的代码高亮功能。如果是 PHP 项目开发,建议使用 PHP IDE 编辑器,比如 Zend Studio,Eclipse。据说文本编辑 VIM 也很不错。
PS:如果是 Windows XP 下要搭建 LAMP 环境,建议大家试试 xampp 快速安装配置法,使用也很方便快捷,点击前面的超级链接或 Google 一下就知道怎么用了。
mysql - Ubuntu16.04安装phpmyadmin出现错误?
打开的php的错误提示功能,显示错误如图,其他配置一切正确
立即学习“PHP免费学习笔记(深入)”;
看起来是require报了致命错误,没有那个文件或没打开或者没权限,求解
后续:
只是那个路径没有对应的文件夹和文件,但是gettext这个工具是有的,使用sudo apt-get install gettext 提示已经安装并
php的gettext扩展也是正常的
回复内容:
打开的php的错误提示功能,显示错误如图,其他配置一切正确
立即学习“PHP免费学习笔记(深入)”;
看起来是require报了致命错误,没有那个文件或没打开或者没权限,求解
后续:
只是那个路径没有对应的文件夹和文件,但是gettext这个工具是有的,使用sudo apt-get install gettext 提示已经安装并
php的gettext扩展也是正常的
权限不足,你给个权限sudo chmod 775 filename,应该就OK了
问题已经解决,问题出现在phpmyadmin上,Ubuntu的sudo apt-get install phpmyadmin 安装的有问题 ,用了之前用过的phpmyadmin拷贝过去 直接就能用
关于我在我的ubuntu上安装了phpmyadmin,但它没有用和ubuntu 安装php的介绍已经告一段落,感谢您的耐心阅读,如果想了解更多关于centos上安装好了PHP MYSQL 以及PHPMYADMIN、linux ubuntu lamp 安装配置环境 +phpmyadmin (-)、Linux ubuntu lamp 安装配置环境 phpmyadmin、mysql - Ubuntu16.04安装phpmyadmin出现错误?的相关信息,请在本站寻找。
本文标签: