Ubuntu下图形化LAMP环境配置教程(linux)
<p>按照《ubuntu下lamp环境配置教程(linux)》(点击打开链接)搞好lamp的环境之后,就可以利用gredit文本编辑器去写php,然后利用终端去查询mysql里面的内容,但是,这种环境还挺粗糙的,没有开发的ide,查询数据库还要输入一大堆命令,不适合php的开发。</p>
<p>
此时你可以安装aptana作为php开发的ide,这款工具在《【html】一款不错的前端开发ide——aptana studio》(点击打开链接)已经介绍过了。使用mysql workbeach作为ubuntu中,mysql的图形化,因为在ubuntu中的mysql gui tools因为版本太旧,ubuntu 12.04下面已经无法启动mysql administrator与mysql query browser了。况且,mysql workbeach其实比mysql gui tools更加好用。</p>
<p>
<strong>一、phpide——aptana的下载、安装、使用</strong></p>
<p>
1、先打开aptana studio的官网http://www.aptana.com/products/studio3/download(点击打开链接),选择适合你的linux操作版本的aptana点击下载。这个网站没有被墙,只是如果你的网速不好,是很难打开的。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/4f3d9abe4da08d16f694272cdbdd77e7.jpg"></p>
<p>
2、以32位的linux为例,下载之后得到aptana_studio_3_setup_linux_x86_3.6.1.zip,放到pc/home也就是你的主文件中,直接提取即可。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/3c154a4e9075c96e20e741699b3afc29.jpg"></p>
<p>
3、提出之后得到一个aptana studio 3其实到这里就可以使用了。这东西与eclipse一样也是绿色版的。同时把原来下载的压缩文件,右键,扔到垃圾箱并且清空。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/0e3d71865b2f56391e667100a5f7f51c.jpg"></p>
<p>
4、之后,与《【android】利用adt-bundle在linux下轻松搭建android开发环境与hello world》(点击打开链接)一样,为里面的aptanastudio先创建一个链接,不要直接复制到桌面,正如windows一样也是要先为.exe创建快捷方式,不能直接拖到桌面一样。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/314a68fc846087f88d9eb90cc7ef92a0.jpg"></p>
<p>
5、要被拖动的是快捷方式</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" id="theimg" src="https://zhuji.jb51.net/uploads/img/20230519/50db7dcbb64f523499a367b04b11f705.jpg"></p>
<p>
6、之后,要为在桌面的快捷方式,重命名,并且更改其图标。更改图标的选择属性。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/88ae9281bdad12b8eab1b91835eedcca.jpg"></p>
<p>
7、在打开的属性窗口,点击图标</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/da570b29642113225ea36bfc78efd40f.jpg"></p>
<p>
8、找到刚刚aptana被解压的目标,选择其里面的图标文件icon.xpm</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/863e968f6c99cd8e0d6631b058f3e770.jpg"></p>
<p>
9、打开apatan不用配置什么,直接右击var/www中如下图新建文件,选择new from template->php->php template来写</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/634560bc0f41a09556ac81ab186d7ba5.jpg"></p>
<p>
10、调试的话,直接打开ubuntu自带的野狐禅浏览器,输入http://127.0.0.1/xx.php就可以访问</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/dfdece6db5fb7eb026bf68925f579a00.jpg"></p>
<p>
<strong>二、利用mysql workbeach使mysql的图形化</strong></p>
<p>
1、这东西用sudo apt-get install命令安装是很麻烦的,而且安装出来的mysql workbeach也不是最新版,最好还是自己的mysql workbeach的官网http://dev.mysql.com/downloads/workbench/(点击打开链接)下载,这也是mysql官方自己的作品。先选择looking for previous ga versions,因为最新版已经不支持ubuntu12.04,找到6.0.9版本,选择ubuntu linux 12.04的32位或者64位下载。</p>
<p>
这网站如果网速不好,这个下拉菜单是出不了来的,毕竟这个网站有些js加载不出来,导致网页看起来完整,但实际不完整。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/7c55a677e34acee4938bc98c77382155.jpg"></p>
<p>
2、下载之后,得到mysql-workbench-community-6.1.7-1ubu1204-i386.deb,直接双击安装,让你输入系统的密码就直接输入。出现ubuntu软件中心,点击安装则自动安装了。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/139502aa80ab5033ec22cbd17b04e763.jpg"></p>
<p>
3、安装成功之后,打开usr/share/applications这个文件夹,找到mysql workbench这个快捷方式,直接复制到桌面。usr/share/applications这个文件夹直接存放一堆现有程序的快捷方式的。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" id="theimg" src="https://zhuji.jb51.net/uploads/img/20230519/72cc81f4fc4c4463e20a82bafba5d0b7.jpg"></p>
<p>
4、双击桌面的快捷方式打开,选择现在已有的链接,在弹出窗口直接选择connect</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" id="theimg" src="https://zhuji.jb51.net/uploads/img/20230519/ab97c3853327e68701a045f9759b919d.jpg"></p>
<p>
5、之后输入数据库密码root,最好保存密码到linux的密码链。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/03cabd8b23fb8c4703b2471fa34e5979.jpg"></p>
<p>
6、对于系统的密码链进行读写必须输入ubuntu系统的密码admin,与上面数据库密码是不同的,注意区别不要混淆。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/190a6560d443a021ce0a4214d663f40e.jpg"></p>
<p>
7、打开mysql之后先如下图,关闭一些没有的东西。真正有用的,是下面的schemas,也就是我们的一堆数据库,也叫策略。如果按键不灵,点来点去这个按钮都没反应,重启一下ubuntu就正常,虽然非常滑稽,但就是这么奇怪。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/1d588bd57af8c31241f7c0c64864f9f6.jpg"></p>
<p>
8、在策略区或者叫数据库的空白地方右键,可以新建一个数据库</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/b1a7a4dea83c9dcb21c42d283ab9d107.jpg"></p>
<p>
9、输入数据库的名称,关键是选好数据库的编码,直接选择utf-8,免得以后你搞什么都要改编码,烦!</p>
<p>
</p>
<p>
10、点击确定以后,会显示相应的sql语句,直接选择apply,则完成创建。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" id="theimg" src="https://zhuji.jb51.net/uploads/img/20230519/185d6a80fcd64baec84d40e76b951c11.jpg"></p>
<p>
11、右键相应数据库下的tables可以创建表</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/3171148a295ee8643ba001052d1ef8e0.jpg"></p>
<p>
12、之后跟在windows旧有的mysql gui tools一样的,pk代表主键,nn代表非空,ai代表自动递增。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" id="theimg" src="https://zhuji.jb51.net/uploads/img/20230519/13cb8c5fc7b71a90dea62fa9099e6fc9.jpg"></p>
<p>
13、选择确定之后,则显示相应的sql语句。选择apply则完成创建。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/d803f4d86d6bb57dc75ab701e7f05b36.jpg"></p>
<p>
14、之后,你可以在右上方的空白区域输入sql语句,完成查询。</p>
<p>
<img style="max-width:100%!important;height:auto!important;"title="Ubuntu下图形化LAMP环境配置教程(linux)" alt="Ubuntu下图形化LAMP环境配置教程(linux)" src="https://zhuji.jb51.net/uploads/img/20230519/23ea2ba7dbc1accfc136e56ab8179c2d.jpg"></p>
<p>
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。</p>
頁:
[1]