mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-16 22:42:21 +08:00
commit
a3ff80c885
@ -0,0 +1,88 @@
|
||||
六种在 Linux 上为你带来 iTunes 般体验的方法
|
||||
================================================================================
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/itunes-linux-840x420.jpg?35dc20)
|
||||
|
||||
随着你对 Linux 的熟悉(也许会成为你首要使用的操作系统),你终将会寻找能在 Linux 上有效管理音乐的工具。你首先想到 iTunes,因为它是近几年最流行的音乐管理工具,但你马上会发现 iTunes 并没有 Linux 版本。而且,现在,你会发现还有比 iTunes 更好的音乐管理工具。
|
||||
|
||||
尽管如此,这并不意味着你就不能使用你喜欢的方式管理音乐。Linux 上有很多方式可以让你整理你的曲库。以下六种,仅供参考:
|
||||
|
||||
### 通过WINE运行iTunes ###
|
||||
|
||||
尽管 iTunes 没有Linux版,你还是可以试试 [使用 WINE 运行 iTunes ][1] 或 PlayOnLinux 的。这些软件给本来只能运行于Windows下的应用程序添加一个兼容层,这样就能让他们运行在Linux上了,但这样的方法效果十有分限。因此,[并非所有 Windows 应用程序都能使用WINE运行][2] - 但这还是一个值得尝试的方法。
|
||||
|
||||
各个版本的iTunes结果可能给你不同的结果,但一般都遵循以下方法:
|
||||
|
||||
1. 安装WINE
|
||||
2. 在WINE里运行iTunes安装程序
|
||||
3. 在网上搜索并解决你遇到的问题。
|
||||
|
||||
如果你在安装时遇到无法解决的问题,比如安装程序错误,或者安装好的程序运行不了,那是没办法的,WINE 就是这样。
|
||||
|
||||
如果你想在 WINE 上运行 iTunes 而且运气很好的跑起来了,那真是很棒。但如果你还想考虑运行一个原生的Linux应用,或者 WINE 不工作的话,还有很多其他选择的。有几个曲库管理软件能让你很方便的管理你的音乐并直接进行播放,还可以制作播放列表。
|
||||
|
||||
### [Amarok][3] ###
|
||||
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/amarok_main.jpg?35dc20)
|
||||
|
||||
如果你使用KDE环境,我推荐 Amarok。它具有 [很多管理音乐的特性][4] 而且它还能与KDE桌面环境无缝兼容。它有很多实用的特性如集成了 Last.FM、文件跟踪、动态播放列表及脚本支持。它甚至会自动在你播放曲目时,自动下载艺术家封面。
|
||||
|
||||
### [Banshee][5] ###
|
||||
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/banshee_main.jpg?35dc20)
|
||||
|
||||
如果你使用 GNOME 或其他任何基于 GTK 的桌面环境(它们十分常见)的话,我推荐使用使用Bansee作为 [全功能曲库管理工具][6] 。它的功能与Amarok类似,也集成了Last.FM,支持互联网广播,支持podcast等等。选择 Amarok 还是 Bansee 要看你使用的桌面环境(这样才能无缝整合)。
|
||||
|
||||
### [Rhythmbox][7] ###
|
||||
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/rhythmbox_main.jpg?35dc20)
|
||||
|
||||
Rhythmbox是一个更好基于GTK的桌面环境的[轻量级的曲库替代品][8]。尽管如此,它也还是有一些自己的特性的。它也支持Last.FM,同时还能无缝播放并与其它如 Nautilus、XChat及Pidgin 等进行整合。
|
||||
|
||||
### [Clementine][9] ###
|
||||
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/clementine_main.jpg?35dc20)
|
||||
|
||||
另一款叫 Clementine 的软件也值得我推荐,因为它的界面简洁、易用。它支持非常多的第三方服务例如Spotify,Digtal Imported 及Dropbox。Android系统上还有一款用作 Clementine 遥控的app。[Clementine是跨平台的][10] , 还支持Mac OS X 及 Windows。
|
||||
|
||||
这些程序都能很好的管理并播放你的音乐。唯一的问题是这些程序都不支持与 iOS 设备的整合, 而且目前Linux 上还没有程序能做到这一点。但 iOS 经过很多改进后,已经并不需要再连接到电脑了。
|
||||
|
||||
### [Google Play Music][11] ###
|
||||
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/google_music.jpg?35dc20)
|
||||
|
||||
最后,如果上面的那些程序还不能满足你的需求的话,你可以试试 Google Play Music。这个在线服务也可以用作播放音乐的曲库管理工具,但它还有几个额外的好处。你可以上传所有的音乐,并且在所有能上网的设备上获取这些音乐。这也意味着你不需要在电脑或者移动设备之间同步你的音乐(无论是 Android 还是 iOS 设备),因为你可以这些设备中使用Google Play Music。 如果你想要扩展你的曲库,你可以订阅 All Access 服务,但这并不是必须的。你不需要支付任何费用也可在你的曲库中储存20,000首
|
||||
|
||||
#### 靠,居然没有 Spotify ?! ####
|
||||
|
||||
尽管 Spotify 也是一款管理和听音乐的方法,我不推荐它的唯一原因是它事实上并不让你管理你的音乐。你不能将曲目上传到 Spotify - 只能它们给你提供的曲目。尽管它们提供了很多,但口味未必一样。
|
||||
|
||||
|
||||
### 你还有其他选择 ###
|
||||
|
||||
以上六个软件应该可以在给你带来类似 iTunes 的功能了。这些软件主要是能让你管理和播放你的曲库,但如果你还需要 iTunes 里的其他特性,其他Linux原生软件或许能满足这类需求。
|
||||
|
||||
**你通常在Linux上使用哪些音乐?**在下方评论与我们分享吧!
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.makeuseof.com/tag/top-6-ways-get-itunes-experience-linux/
|
||||
|
||||
作者:[Danny Stieben][a]
|
||||
译者:[KevinSJ](https://github.com/KevinSJ)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.makeuseof.com/tag/author/danny/
|
||||
[1]:http://www.makeuseof.com/tag/how-about-some-wine-with-your-linux/
|
||||
[2]:http://www.makeuseof.com/answers/does-wine-runs-all-windows-apps/
|
||||
[3]:https://amarok.kde.org/
|
||||
[4]:http://www.makeuseof.com/tag/control-music-amarok-linux/
|
||||
[5]:http://banshee.fm/
|
||||
[6]:http://www.makeuseof.com/tag/banshee-20-comprehensive-media-player-streamer-podcast-tool-linux/
|
||||
[7]:https://wiki.gnome.org/Apps/Rhythmbox
|
||||
[8]:http://www.makeuseof.com/tag/play-manage-music-collection-rhythmbox-linux/
|
||||
[9]:https://www.clementine-player.org/
|
||||
[10]:http://www.makeuseof.com/tag/need-a-lightweight-music-player-without-sacrificing-features-clementine-cross-platform/
|
||||
[11]:http://music.google.com/
|
@ -0,0 +1,176 @@
|
||||
如何使用图形化工具远程管理 Linux上的MySQL
|
||||
================================================================================
|
||||
如果你在一个远程的VPS上运行了MySQL服务器,你会如何管理你的远程数据库主机呢?基于web的数据库管理工具例如[phpMyAdmin][2]或者[Adminer][3]可能会是你第一个想起的。这些基于web的管理工具需要一个正常运行的后端的web服务和PHP引擎。但是,如果你的VPS仅仅用来做数据库服务(例如,数据库与其它服务独立存放的分布式结构),为偶尔的数据库管理提供一整套的LAMP是浪费VPS资源的。更糟的是,LAMP所打开的HTTP端口可能会成为你VPS资源的安全漏洞。
|
||||
|
||||
作为一种选择,你可以使用在一台客户机上运行本地的MySQL客户端,当然,如果没有别的选择,一个纯净的MySQL命令行客户端将是你的默认选择。但是命令行客户端的功能是有限的,因为它没有生产级数据库管理功能,例如:可视化SQL开发、性能调优、模式验证等等。你是否在寻找一个成熟的MySQL管理工具,那么一个MySQL的图形化管理工具将会更好的满足你的需求。
|
||||
|
||||
###什么是MySQL Workbench?
|
||||
|
||||
作为一个由Oracle开发的集成的数据库管理工具,[MySQL Workbench][4]不仅仅是一个简单的MySQL客户端。简而言之,Workbench是一个跨平台的(如:Linux,MacOX,Windows)数据库设计、开发和管理的图形化工具。MySQL Workbench 社区版是遵循GPL协议的。作为一个数据库管理者,你可以使用Workbench去配置MySQL服务、管理MySQL用户、进行数据库的备份与还原、监视数据库的健康状况,所有的都在对用户友好的图形化环境下处理。
|
||||
|
||||
在这个手册里,让我们演示下如何在Linux下安装和使用MySQL Workbench。
|
||||
|
||||
###在Linux上安装MySQL Workbench
|
||||
|
||||
你可以在任何一个桌面linux机器上运行MySQL Workbench来设置你的数据库管理环境。虽然一些Linux发行版(例如:Debian/Ubuntu)在他们的软件源中已经有了MySQL Workbench,但是从官方源中安装是一个好的方法,因为他们提供了最新的版本。这里介绍了如何设置一个官方的Workbench软件源和从中安装它。
|
||||
|
||||
#### 基于 Debian 的桌面 (Debia, Ubuntu, Mint): ####
|
||||
|
||||
到其[官方站点][5],选择一个和你环境匹配的DEB文件,并下载安装:
|
||||
|
||||
例如,对于 Ubuntu 14.10:
|
||||
|
||||
$ wget http://dev.mysql.com/get/mysql-apt-config_0.3.4-2ubuntu14.10_all.deb
|
||||
$ sudo dpkg -i mysql-apt-config_0.3.4-2ubuntu14.10_all.deb
|
||||
|
||||
对于 Debian 7:
|
||||
|
||||
$ wget http://dev.mysql.com/get/mysql-apt-config_0.3.3-1debian7_all.deb
|
||||
$ sudo dpkg -i mysql-apt-config_0.3.3-1debian7_all.deb
|
||||
|
||||
当你安装DEB文件时,你会看到下面的配置菜单,并且选择配置那个MySQL产品
|
||||
|
||||
![](https://farm8.staticflickr.com/7702/16928715218_b1fcbcdbf3_c.jpg)
|
||||
|
||||
选择“Utilities”。完成配置后,选择“Apply”去保存配置。然后,更新包索引,并且安装Workbench。
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install mysql-workbench
|
||||
|
||||
#### 基于 Red Hat 的桌面 (CentOS, Fedora, RHEL): ####
|
||||
|
||||
去官网下载并安装适合你Linux环境的RPM源包。
|
||||
|
||||
例如,对于 CentOS 7:
|
||||
|
||||
$ wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
|
||||
$ sudo yum localinstall mysql-community-release-el7-5.noarch.rpm
|
||||
|
||||
对于 Fedora 21:
|
||||
|
||||
$ wget http://dev.mysql.com/get/mysql-community-release-fc21-6.noarch.rpm
|
||||
$ sudo yum localinstall mysql-community-release-fc21-6.noarch.rpm
|
||||
|
||||
验证"MySQL Tools Community"源是否被安装:
|
||||
|
||||
$ yum repolis enabled
|
||||
|
||||
![](https://farm9.staticflickr.com/8826/16494069254_15458ace52_c.jpg)
|
||||
|
||||
安装Workbench
|
||||
|
||||
$ sudo yum install mysql-workbench-community
|
||||
|
||||
###设置远程数据库的安全连接
|
||||
|
||||
接下来是为你运行MySQL服务的VPS设置一个远程连接。当然,你可以直接通过图形化的Workbench连接你的远程MySQL服务器(在数据库开放了远程连接后)。然而,这样做有很大的安全风险,因为有些人很容易窃听你的数据库传输信息,并且一个公开的MySQL端口(默认为3306)会是另外一个攻击入口。
|
||||
|
||||
一个比较好的方法是关掉远程访问数据库服务功能,(仅允许在VPS 上的127.0.0.1访问)。然后在本地客户机和远程VPS之间设置一个SSH隧道,这样的话,和MySQL之间的数据能安全地通过它的本地回环接口上中继。相比较设置一个SSL加密的连接来说,配置SSH隧道需要很少的操作,因为它仅仅需要SSH服务,并且在大多数的VPS上已经部署了。
|
||||
|
||||
让我们来看看如何来为一个MySQL Workbench设置一个SSH隧道。
|
||||
|
||||
在这个设置里,不需要你开放远程访问MySQL服务。
|
||||
|
||||
在一个运行了Workbench的本地客户机上,键入下面的命令,替换'user'(远程 VPS 的用户名)和'remote_vps'(远程 VPS 的地址)为你自己的信息:
|
||||
|
||||
$ ssh user@remote_vps -L 3306:127.0.0.1:3306 -N
|
||||
|
||||
你会被要求输入你VPS的SSH密码,当你成功登陆VPS后,在本地的3306端口和远程VPS的3306端口之间将会建立一个SSH隧道。这里你不会在前台看到任何信息显示。
|
||||
|
||||
或者你可以选择在后台运行SSH隧道,按CTRL+Z停止当前的命令,然后输入bg并且ENTER
|
||||
|
||||
![](https://farm8.staticflickr.com/7714/16928715438_bf0db49b3b_c.jpg)
|
||||
|
||||
这样SSH隧道就会在后台运行了。
|
||||
|
||||
###使用MySQL Workbench远程管理MySQL服务
|
||||
|
||||
在建立好SSH隧道后,你可以通过MySQL Workbench去远程连接MySQL服务了。
|
||||
|
||||
输入下面命令启动Workbench:
|
||||
|
||||
$ mysql-workbench
|
||||
|
||||
![](https://farm9.staticflickr.com/8768/16494069294_0fce571ddb_c.jpg)
|
||||
|
||||
点击Workbench页面上面的“加号”图标去创建一个新的数据库连接,接着会出现下面的连接信息。
|
||||
|
||||
- **Connection Name**: 任意描述 (例如: My remote VPS database)
|
||||
- **Hostname**: 127.0.0.1
|
||||
- **Port**: 3306
|
||||
- **Username**: MySQL 用户名 (例如 root)
|
||||
|
||||
![](https://farm8.staticflickr.com/7727/16928715288_d9ac3bfc7a_c.jpg)
|
||||
|
||||
注意:因为隧道设置的是127.0.0.1:3306,所以主机名字段必须是127.0.0.1,而不能是远程VPS的IP地址或者主机名。
|
||||
|
||||
当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。
|
||||
|
||||
![](https://farm8.staticflickr.com/7650/17114969532_0252ffcd31_c.jpg)
|
||||
|
||||
当你登录到MySQL 服务器后,你可以再左侧面板看到各种管理任务。让我们来看一些常见的管理任务。
|
||||
|
||||
#### MySQL Server Status ####
|
||||
|
||||
该菜单显示了展示数据库服务器的资源使用情况的实时监控面板。(例如:流量、链接、读写)
|
||||
|
||||
![](https://farm8.staticflickr.com/7627/16494069414_9d838d4138_c.jpg)
|
||||
|
||||
#### Client Connections ####
|
||||
|
||||
客户端连接数是一个极其重要的监控的资源,这个菜单显示了每个连接的详细信息。
|
||||
|
||||
![](https://farm9.staticflickr.com/8747/16909119337_a8d89772dd_c.jpg)
|
||||
|
||||
#### 用户和权限 ####
|
||||
|
||||
这个菜单允许你管理MySQL用户,包括他们的资源限制和权限。
|
||||
|
||||
![](https://farm9.staticflickr.com/8765/16494069384_760fc17c8f_c.jpg)
|
||||
|
||||
#### MySQL Server Administration ####
|
||||
|
||||
你可以启动或关闭MySQL服务,并且检查它的服务日志。
|
||||
|
||||
![](https://farm8.staticflickr.com/7588/17114969592_54526dfb32_c.jpg)
|
||||
|
||||
#### Database Schema Management ####
|
||||
|
||||
可以可视化的查看、更改、检查数据库结构,在“Schemas”标题下选择任何一个数据库或表,然后右击
|
||||
|
||||
![](https://farm8.staticflickr.com/7665/16496363973_fd03a96198_c.jpg)
|
||||
|
||||
![](https://farm9.staticflickr.com/8744/16909119497_7c884617b8_c.jpg)
|
||||
|
||||
#### Database Query ####
|
||||
|
||||
你可以执行任何的语句(只要你的权限允许),并且检查其结果。
|
||||
|
||||
![](https://farm8.staticflickr.com/7716/17114969692_c0f02bb277_c.jpg)
|
||||
|
||||
此外,性能统计数据和报表仅用于MySQL5.6以上的版本。对于5.5及其以下的版本,性能部分会以灰色显示。
|
||||
|
||||
### 结论 ###
|
||||
|
||||
简介且直观的选项卡界面,丰富的特性,开源,使MySQL Workbench成为一个非常好的可视化数据库设计和管理工具。为其减分的是它的性能。我注意到在一台运行繁忙的服务器上,Workbench有时会变得异常缓慢,尽管它的性能差强人意,我依然认为MySQL Workbench是MySQL数据库管理员和设计人员必备的工具之一。
|
||||
|
||||
你曾在你的生产环境中用过Workbench吗?或者你还有别的GUI工具可以推荐?请分享你的经验吧。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/remote-mysql-databases-gui-tool.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[tyzy313481929](https://github.com/tyzy313481929)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://xmodulo.com/author/nanni
|
||||
[1]:http://xmodulo.com/go/digitalocean
|
||||
[2]:http://ask.xmodulo.com/install-phpmyadmin-centos.html
|
||||
[3]:http://xmodulo.com/set-web-based-database-management-system-adminer.html
|
||||
[4]:http://mysqlworkbench.org/
|
||||
[5]:http://dev.mysql.com/downloads/repo/apt/
|
||||
[6]:http://dev.mysql.com/downloads/repo/yum/
|
||||
[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html
|
@ -0,0 +1,61 @@
|
||||
Here's How to Install the Beautiful Arc GTK+ Flat Theme on Linux
|
||||
================================================================================
|
||||
> Step-by-step tutorial with easy-to-follow instructions
|
||||
|
||||
**Today we're introducing you to a newly released GTK+ theme that features transparent and flat elements and is compatible with multiple desktop environments and Linux distributions. [The theme is called Arc][1].**
|
||||
|
||||
Before going into detail, we suggest that you take a quick look at the gallery attached below, so you have a basic idea of what the theme looks like. Also, you should be aware that it currently works with GTK+ 2.x, GTK+ 3.x, GNOME-Shell, Budgie, Unity, and Pantheon user interfaces, all of them using the GNOME Stack.
|
||||
|
||||
Also, the developer of the Arc theme informs us that it has been successfully tested on the Ubuntu 15.04 (Vivid Vervet), Arch Linux, elementary OS 0.3 Freya, Fedora 21, Fedora 22, Debian GNU/Linux 8.0 (Jessie), Debian Testing, Debian Unstable, openSUSE 13.2, openSUSE Tumbleweed, and Gentoo Linux operating systems.
|
||||
|
||||
### Requirements and installation instructions ###
|
||||
|
||||
To build the Arc theme, you will need to first install some packages, such as autoconf, automake, pkg-config (pkgconfig for Fedora), libgtk-3-dev for Debian/Ubuntu-based distros or gtk3-devel for RPM-based ones, git, gtk2-engines-pixbuf, and gtk-engine-murrine (gtk-murrine-engine for Fedora).
|
||||
|
||||
The Arc theme does not yet have binary packages, so you will need to grab the latest source code from the project's Git repository and compile it. Therefore, open a Terminal app and run the following commands, one by one, hitting the Enter key after each one and waiting for the previous command to finish before adding the next.
|
||||
|
||||
git clone https://github.com/horst3180/arc-theme --depth 1 && cd arc-theme
|
||||
git fetch --tags
|
||||
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
./autogen.sh --prefix=/usr
|
||||
sudo make install
|
||||
|
||||
That's it! At this moment, the Arc theme is currently installed on your GNU/Linux distribution and you can activate it using either the GNOME Tweak Tool utility if you're using GNOME or the Unity Tweak Tool software if you are running Ubuntu's Unity desktop. Have fun and don't forget to drop a screenshot with your setup in the comments section below.
|
||||
|
||||
![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-2.jpg)
|
||||
|
||||
![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-3.jpg)
|
||||
|
||||
![](http://i1-news.softpedia-static.com/images/news2/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143-4.jpg)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://news.softpedia.com/news/Here-s-How-to-Install-the-Beautiful-Arc-GTK-plus-Flat-Theme-on-Linux-483143.shtml
|
||||
|
||||
作者:[Marius Nestor][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://news.softpedia.com/editors/browse/marius-nestor
|
||||
[1]:https://github.com/horst3180/Arc-theme
|
||||
[2]:
|
||||
[3]:
|
||||
[4]:
|
||||
[5]:
|
||||
[6]:
|
||||
[7]:
|
||||
[8]:
|
||||
[9]:
|
||||
[10]:
|
||||
[11]:
|
||||
[12]:
|
||||
[13]:
|
||||
[14]:
|
||||
[15]:
|
||||
[16]:
|
||||
[17]:
|
||||
[18]:
|
||||
[19]:
|
||||
[20]:
|
@ -0,0 +1,152 @@
|
||||
Installing Ruby on Rails using rbenv on Ubuntu 15.04
|
||||
================================================================================
|
||||
This article we will learn about how to Install Ruby on Rails with rbenv on Ubuntu 15.04. We choose Ubuntu as operating system because Ubuntu is one of Linux distribution that easy to use with a lots of package support and complete documentations , so I think this is the right choice. If you don't install the latest version Ubuntu yet, you can [download the ISO file][1] to start off.
|
||||
|
||||
### Installing Ruby ###
|
||||
|
||||
First thing we need to update ubuntu packages and install some dependencies for Ruby.
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
|
||||
|
||||
There are three methods to install Ruby such rbenv, rvm and from the source. Each have their own benefits, but these days many developers prefer to use rbenv installation method than rvm or from source. We will install the latest version of Ruby, version 2.2.2.
|
||||
|
||||
Installing with rbenv is a simple two step process. First you install rbenv, and then ruby-build :
|
||||
|
||||
cd
|
||||
git clone git://github.com/sstephenson/rbenv.git .rbenv
|
||||
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
|
||||
exec $SHELL
|
||||
|
||||
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
|
||||
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
|
||||
exec $SHELL
|
||||
|
||||
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
|
||||
|
||||
rbenv install 2.2.2
|
||||
rbenv global 2.2.2
|
||||
ruby -v
|
||||
|
||||
We need to install Bundler but before that we tell Rubygems not to install the documentation for each package locally.
|
||||
|
||||
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
|
||||
gem install bundler
|
||||
|
||||
### Configuring GIT ###
|
||||
|
||||
Before configuring GIT you have to create github account first, you can register [Git][2]. We need Git for our version control system so we are going to set it up to match our Github account.
|
||||
|
||||
Replace **Name** and **Email address** in the following steps with the ones you used for your Github account.
|
||||
|
||||
git config --global color.ui true
|
||||
git config --global user.name "YOUR NAME"
|
||||
git config --global user.email "YOUR@EMAIL.com"
|
||||
ssh-keygen -t rsa -C "YOUR@EMAIL.com"
|
||||
|
||||
After that take the newly generated SSH key and add it to your Github account. And then you need to copy and paste the output of the following command and [paste it here][3].
|
||||
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
|
||||
If you done of this, check and see if it worked
|
||||
|
||||
ssh -T git@github.com
|
||||
|
||||
You should get a message like this
|
||||
|
||||
Hi excid3! You've successfully authenticated, but GitHub does not provide shell access.
|
||||
|
||||
### Installing Rails ###
|
||||
|
||||
We need to install javascript runtime like NodeJS because these days Rails ships with so many dependencies. With this way we can combines and minify your javascript to provide a faster production environment.
|
||||
|
||||
We need to add PPA repository for installing nodeJS
|
||||
|
||||
sudo add-apt-repository ppa:chris-lea/node.js
|
||||
sudo apt-get update
|
||||
sudo apt-get install nodejs
|
||||
|
||||
If you find a problem while updating repository packages, you should try to do this command :
|
||||
|
||||
# Note the new setup script name for Node.js v0.12
|
||||
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
|
||||
|
||||
# Then install with:
|
||||
sudo apt-get install -y nodejs
|
||||
|
||||
Next step, follow this command :
|
||||
|
||||
gem install rails -v 4.2.1
|
||||
|
||||
Because we are using rbenv, make the rails executable available with the following command below
|
||||
|
||||
rbenv rehash
|
||||
|
||||
To make sure the Rails have installed correcly, you can run the rails -v and this will show like this
|
||||
|
||||
rails -v
|
||||
# Rails 4.2.1
|
||||
|
||||
For some reason your environment may not be setup properly if you get different result.
|
||||
|
||||
### Setting Up MySQL ###
|
||||
|
||||
You may already be familiar with MySQL, you can install MySQL server and client from Ubuntu repository. You will set the password for the root user on installation process. This information will go into your Rails app's database.yml file in the future. Follow the command line below :
|
||||
|
||||
sudo apt-get install mysql-server mysql-client libmysqlclient-dev
|
||||
|
||||
Installing the libmysqlclient-dev gives you the necessary files to compile the mysql2 gem which is what Rails will use to connect to MySQL when you setup your Rails app.
|
||||
|
||||
### Last Step ###
|
||||
|
||||
Let's try to create your first Rails Application :
|
||||
|
||||
# Use MySQL
|
||||
|
||||
rails new myapp -d mysql
|
||||
|
||||
# Move into the application directory
|
||||
|
||||
cd myapp
|
||||
|
||||
# Create Database
|
||||
|
||||
rake db:create
|
||||
|
||||
rails server
|
||||
|
||||
Visit http://localhost:3000 to view your new website. Now you have got machine setup and ready to build some Rails application.
|
||||
|
||||
![](http://blog.linoxide.com/wp-content/uploads/2015/05/localhost_3000.png)
|
||||
|
||||
If you received an error message when you create database that said Access denied for user 'root'@'localhost' (Using password: NO) then you need to update your config/database.yml file to match the database **username** and **password**.
|
||||
|
||||
# Edit your database.yml in config folder
|
||||
|
||||
nano config/database.yml
|
||||
|
||||
and then fill the password field with your MySQL root password.
|
||||
|
||||
![](http://blog.linoxide.com/wp-content/uploads/2015/05/root_passw.png)
|
||||
|
||||
Exit (Ctrl+X) and save.
|
||||
|
||||
### Conclusion ###
|
||||
|
||||
Rails is written in Ruby, the programming language which is also used alongside Rails. Ruby on Rails can be installed in three methods such rbenv, rvm and from the source on Ubuntu 15.04. Here in this tutorial we've used rbenv method and MySQL as database. If any question or suggestion, please write them in the comment below.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://linoxide.com/ubuntu-how-to/installing-ruby-rails-using-rbenv-ubuntu-15-04/
|
||||
|
||||
作者:[Obet][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://linoxide.com/author/obetp/
|
||||
[1]:http://release.ubuntu.com/15.04
|
||||
[2]:http://github.com
|
||||
[3]:https://github.com/settings/ssh
|
@ -1,115 +0,0 @@
|
||||
六种在 Linux 上带来 iTunes 体验的方法
|
||||
Top 6 Ways To Get Your iTunes Experience On Linux
|
||||
================================================================================
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/04/itunes-linux-840x420.jpg?35dc20)
|
||||
|
||||
随着你对 Linux 的熟悉(也许会成为你首要使用的操作系统),你最终会寻找能在Linux上有效管理音乐的工具。你首先想到了 iTunes,因为它是近几年最流行的音乐管理工具,但你马上会发现iTunes并没有Linux版本。而且,你会发现还有比 iTunes 更好的音乐管理工具。
|
||||
As you’re getting used to Linux (potentially as your new main operating system), you’ll eventually try to find a way to efficiently manage your music. iTunes comes to mind because it’s been the most popular way to manage music over the years, but you’ll quickly find out that iTunes isn’t available natively on Linux. Plus, better ways exist to manage your music now that it’s 2015.
|
||||
|
||||
尽管如此,这并不意味着你就不能使用你喜欢的方式管理音乐。Linux 上有很多方式可以让你整理你的音乐库。以下六种,仅供参考:
|
||||
However, that doesn’t automatically mean that you won’t be able to manage your music the way you want to. There’s plenty of other ways to keep tabs on your music library. Here’s six great ways to get it done.
|
||||
|
||||
### 在WINE上运行iTunes ###
|
||||
### iTunes via WINE ###
|
||||
|
||||
尽管 iTunes 没有Linux版,你还是可以试试 [使用 WINE 运行 iTunes ][1] 或 PlayOnLinux 的。这些软件给本来只能运行于Windows下的应用程序添加了一个兼容层,这样就能让他们运行在Linux上了,但这样的方法效果十有分限。因此 [并非所有 Windows 应用程序都能使用WINE运行][2] - 但这还是一个值得尝试的方法。
|
||||
Even if iTunes isn’t available in Linux as a native application, you can still try to [get it to work under WINE][1] or PlayOnLinux. These pieces of software try to add a compatibility layer so that Windows applications work on Linux, but the results are far from perfect. Therefore, [not all Windows applications will run with WINE][2] — but it’s still worth a try.
|
||||
|
||||
各个版本的iTunes结果可能给你不同的结果,但一般都遵循以下方法:
|
||||
1. 安装WINE
|
||||
1. 在WINE里运行iTunes安装程序
|
||||
1. 在网上搜索并解决你遇到的问题。
|
||||
|
||||
如果你在安装时遇到无法解决的问题,比如安装程序错误,或者安装好的程序运行不了,那是没办法的,WINE 就是这样
|
||||
|
||||
如果你想在 WINE 上运行 iTunes 但恰好运行不了的话,没问题。但如果你还想考虑运行一个原生的Linux的话,还有很多其他选择的。这些音乐管理软件狗能让你很方便的管理你的音乐并直接进行播放,还可以制作播放列表。
|
||||
|
||||
Each version of iTunes can give you different results, but the general process is as follows:
|
||||
|
||||
1. Install WINE
|
||||
1. Run the iTunes installer via WINE
|
||||
1. Google and try to solve any problems you come across.
|
||||
|
||||
Again, you might come across issues somewhere along the way which cannot be solved, such as the installer failing or the installed application refusing to run. That’s just how it is with WINE.
|
||||
|
||||
If you really want to use iTunes and you happen to luck out with WINE, then that’s great. However, if you’d rather use a native Linux application or WINE didn’t work for you, then there are options here as well. Several “music library manager” programs are available to give you a quick oversight of your music and play it directly in the application, as well as make playlists.
|
||||
|
||||
### [Amarok][3] ###
|
||||
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/amarok_main.jpg?35dc20)
|
||||
|
||||
如果你使用KDE环境,我推荐 Amarok。它具有 [很多管理音乐的特性][4] 而且他还能与KDE桌面环境无缝兼容。它很有很多实用的特性如无缝兼容 Last.FM,文件跟踪,动态播放列表及个吃支持。它甚至会自动在你播放曲目时,自动下载艺术家封面。
|
||||
|
||||
If you use KDE, then I’d recommend Amarok. It has [plenty of features to manage your music][4] and tight desktop integration with KDE. It also has useful features such as Last.FM integration, file tracking, dynamic playlists, and script support. It can even pull up biographies of artists as you play their songs.
|
||||
|
||||
### [Banshee][5] ###
|
||||
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/banshee_main.jpg?35dc20)
|
||||
|
||||
如果你使用 GNOME 或其他任何基于 GTK 的桌面环境(他们十分常见)的话,我推荐使用使用Bansee作为 [全功能音乐库管理工具][6] 。它的功能与Amarok类似,也与Last.FM无缝兼容,支持网络广播,支持podcast,还有很多其他功能。选择 Amarok 还是 Bansee 要看你使用的桌面环境(这样才能无缝整合)。
|
||||
|
||||
If you use GNOME or any GTK-based desktop environment (they’re quite common), then I’d recommend Banshee as a [full-featured music library][6] manager. It has a very similar feature set as Amarok, including Last.FM integration, Internet radio support, podcast support, and much more. Amarok and Banshee are really among the top two choices, so which one you choose should depend on which desktop environment you’re using (for integration’s sake).
|
||||
|
||||
### [Rhythmbox][7] ###
|
||||
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/rhythmbox_main.jpg?35dc20)
|
||||
|
||||
Rhythmbox是一个 基于GTK的桌环境下更 [轻量级的音乐库替代品][8]。尽管如此,它也还是有一些特性的。它也支持Last.FM,同时还能无缝播放并与其他如 Nautilus, XChat,及Pidgin 等进行整合。
|
||||
Rhythmbox as a more [lightweight music library alternative][8] that is best used on GTK-based desktop environments. However, it still has quite a few features. You also get Last.FM support here, plus gapless playback and integration with various other applications such as Nautilus, XChat, and Pidgin.
|
||||
|
||||
### [Clementine][9] ###
|
||||
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/clementine_main.jpg?35dc20)
|
||||
|
||||
另一款叫 Clementine 的软件也值得我推荐,因为它的见面简洁、易用。它支持非常多的第三方服务例如Spotify,Digtal Imported 及Dropbox。Android系统上还有一款用作 Clementine 遥控的app。[Clementine是一个跨平台的][10] , 还支持Mac OS X 及 Windows。
|
||||
Another application called Clementine also gets my recommendation with its clean and intuitive interface. It has tons of support for third-party services such as Spotify, Digitally Imported, and Dropbox. There’s also an Android app you can use as a remote control for Clementine. [Clementine is cross-platform][10] and available for Windows and Mac OS X.
|
||||
|
||||
这些程序都能很好的管理并播放你的音乐。唯一的问题是这些程序都不支持与 iOS 设备的整合, 而且目前还没有程序能做到这一点。但 iOS 经过很多改进后,已经足以不需要再连接到电脑了。
|
||||
They all are excellent at managing and playing your music. The only downside to all of these is that there is no iOS device integration, and there’s currently no modern application that can do that. However, iOS has received enough improvements that it’s virtually unnecessary to connect it to a computer anymore.
|
||||
|
||||
### [Google Play Music][11] ###
|
||||
|
||||
![](http://cdn.makeuseof.com/wp-content/uploads/2015/03/google_music.jpg?35dc20)
|
||||
|
||||
最后,如果上面的那些程序还不能满足你的需求的花,你可以试试 Google Play Music。这个在线服务也可以用作能播放音乐的音乐库管理工具,但他还有几个额外的好处。你可以上传所有的音乐,并且在所有能上网的设备上获取这些音乐。这也意味着你不需要在电脑或者移动设备之间同步你的音乐(无论是 Android 还是 iOS 设备),因为你可以这些设备中使用Google Play Music。 如果你想要扩展你的去库,你可以订阅 All Access,但这并不是必须的。你不需要支付任何费用也可在你的曲库中储存20,000首
|
||||
Lastly, if none of those applications satisfy your needs, you can take a look at Google Play Music. This online service acts as a music library manager that can play your music, but it also has some extra benefits. You can upload all your music to it and have access on any device connected to the Internet. That also means that you won’t have to sync your music between your computer and your mobile device (no matter if Android or iOS) because you have access to Google Play Music from both. If you want to expand your library you can get the All Access subscription, but it’s not a requirement. You can use it simply as a music library completely free for up to 20,000 songs.
|
||||
|
||||
#### 靠,居然没有 Spotify ?! ####
|
||||
#### Wot, no Spotify?! ####
|
||||
|
||||
尽管 Spotify 也是一款管理和听音乐的方法,我不推荐它的唯一原因是它事实上并不让你管理你的音乐。你不能将曲目上传到 Spotify - 只能它们给你提供的曲目。尽管它们提供了很多,但原理都不尽相同。
|
||||
The only reason why I don’t mention Spotify is that, although it’s also a great way to access and listen to music, it doesn’t really let you manage your own music. You can’t upload trakcs to Spotify — you have to listen to what they give you. Albeit they give you a lot, but it’s nonetheless a different mechanism.
|
||||
|
||||
### 你还有其他选择 ###
|
||||
### You Have Options ###
|
||||
|
||||
以上六个软件应该可以在给你带来类似 iTunes 的功能了。这些软件主要是能让你管理和播放你的音乐库,但如果你还需要 iTunes 里的其他特性,其他Linux原生软件或许能满足这类需求。
|
||||
|
||||
With these six options, you should be able to get iTunes-like functionality on your desktop. These options focused mainly on managing and playing your music library, but if there are any other features that you need from iTunes, other Linux-native applications can take care of those needs.
|
||||
|
||||
**你通常在Linux上使用哪些音乐?**在下方评论与我们分享吧!
|
||||
**What music applications do you regularly use on Linux?** Let us know in the comments!
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.makeuseof.com/tag/top-6-ways-get-itunes-experience-linux/
|
||||
|
||||
作者:[Danny Stieben][a]
|
||||
译者:[KevinSJ](https://github.com/KevinSJ)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.makeuseof.com/tag/author/danny/
|
||||
[1]:http://www.makeuseof.com/tag/how-about-some-wine-with-your-linux/
|
||||
[2]:http://www.makeuseof.com/answers/does-wine-runs-all-windows-apps/
|
||||
[3]:https://amarok.kde.org/
|
||||
[4]:http://www.makeuseof.com/tag/control-music-amarok-linux/
|
||||
[5]:http://banshee.fm/
|
||||
[6]:http://www.makeuseof.com/tag/banshee-20-comprehensive-media-player-streamer-podcast-tool-linux/
|
||||
[7]:https://wiki.gnome.org/Apps/Rhythmbox
|
||||
[8]:http://www.makeuseof.com/tag/play-manage-music-collection-rhythmbox-linux/
|
||||
[9]:https://www.clementine-player.org/
|
||||
[10]:http://www.makeuseof.com/tag/need-a-lightweight-music-player-without-sacrificing-features-clementine-cross-platform/
|
||||
[11]:http://music.google.com/
|
@ -0,0 +1,55 @@
|
||||
Arc是一个很棒的Linux桌面的GTK主题
|
||||
================================================================================
|
||||
![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/arc-gtk-theme.jpg)
|
||||
|
||||
距离本站上次推荐的GTK主题已经过了很久了。
|
||||
|
||||
但是看到上面的Arc后,需要纠正这点了。
|
||||
|
||||
我们不能不提到它。
|
||||
|
||||
### Arc GTK主题 ###
|
||||
|
||||
![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/see-through-theme.png)
|
||||
|
||||
Transparency. Not to everyones’ taste.
|
||||
透明并不符合每个人的口味
|
||||
|
||||
Arc是一个扁平化主题并有微妙的配色并部分选中的窗口透明,就像GTK的顶拦和Nautilus的侧边栏。
|
||||
|
||||
|
||||
它的效果不像我们之前的主题那样将程序渲染的像躲猫猫那样混乱。像OSX Yosemite,效果用的不变多但是很好。
|
||||
|
||||
随之的图标集(称为Vertex)同样可用。
|
||||
|
||||
**是的它支持Unity**
|
||||
|
||||
Arc主题支持基于GTK3和GTK2桌面环境,包含Gnome Shell(当然)和标准的Ubuntu Unity。
|
||||
|
||||
它也可以很好地与轻量级的Budgie和elementary的Pantheon桌面以及也可以工作在Cinnamon上。
|
||||
|
||||
![](http://www.omgubuntu.co.uk/wp-content/uploads/2015/06/Screen-Shot-2015-06-02-at-18.07.15.png)
|
||||
|
||||
Arc中的开关、滑块和小挂件。
|
||||
|
||||
它并不容易下载与安装- *understatement klaxon* - 因为它还在密集开发中。
|
||||
|
||||
|
||||
安装包需要GTK 3.14或者更新,这意味着Ubuntu 14.04 LTS和14.10的用户无法使用了。
|
||||
|
||||
那些使用Ubuntu 15.04的用户可以使用这个主题。你还不能添加ppa或者双击.deb包。如果你喜欢你看见的你需要卷起你的袖子并查看github上的编译指导。
|
||||
|
||||
- [Github中Arc安装指导][1]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2015/06/arc-gtk-theme
|
||||
|
||||
作者:[Joey-Elijah Sneddon][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/117485690627814051450/?rel=author
|
||||
[1]:https://github.com/horst3180/Arc-theme
|
@ -1,171 +0,0 @@
|
||||
Translating by demon
|
||||
如何使用图形化工具远程管理Linux Vps上的MySql
|
||||
================================================================================
|
||||
如果你在一个远程的VPS上运行了MYSQL server,你会如何管理你的远程数据库主机呢?基于web的数据库管理工具例如phpMyAdmin或者Adminer可能会是你一个想起的。这些基于web的管理工具需要一个后端的web服务和PHP引擎在正常运行。但是,如果你的VPS仅仅用来做数据库服务(e.g., for a multi-tier app),为临时的数据库管理提供一整套的LAMP是浪费VPS资源的。更糟的是,LAMP带有的HTTP端口可能会成为你VPS资源的安全漏洞。
|
||||
|
||||
作为一种选择,你可以使用在一台客户机上运行本地的Mysql客户端,当然,如果没有别的选择,一个纯净的命令行mysql客户端将是你的默认选择。但是命令行客户端的功能是有限的,因此它不适合在生产环境中使用,例如:sql开发,性能调优,模式验证等等。你是否在寻找一个成熟的MYSQL管理工具,那么一个MYSQL的图形化管理工具将会更好的满足你的需求。
|
||||
|
||||
什么是MySQL Workbench?
|
||||
|
||||
作为一个由Oracle开发的成熟数据库管理工具,mysql workbench不仅仅是一个MySQL客户端。简而言之,Workbench是一个跨平台的(eg:Linux,MacOX,Windows)数据库设计,开发和管理图形工具。社区版本的Msyql Workbench是遵循GPL协议的。作为一个数据库管理者,你可以使用Workbench去配置Mysql服务,管理Mysql用户,完成数据库的备份与还原,监视数据库的健康状况,所有的都在对用户友好的图形化环境下处理。
|
||||
|
||||
在这个手册里,让我们演示下如何在Linux下安装和使用Mysql Workbench.
|
||||
|
||||
在Linux上安装MySQL Workbench
|
||||
|
||||
你可以在任何一个桌面linux机器上运行Mysql Workbench去设置你的数据库管理环境。然而一些Linux发行版(例如:Debian/Ubuntu)在他们的软件源中已经有了Mysql Workbench.从官方源中安装是一个好的方法,因为他们提供了最新的版本。这里介绍了如何设置一个官方的Workbench源和从中安装它。
|
||||
|
||||
#### Debian-based Desktop (Debia, Ubuntu, Mint): ####
|
||||
|
||||
到其官方站点,选择一个和你环境匹配的DEB file源,并下载安装
|
||||
|
||||
For example, on Ubuntu 14.10:
|
||||
|
||||
$ wget http://dev.mysql.com/get/mysql-apt-config_0.3.4-2ubuntu14.10_all.deb
|
||||
$ sudo dpkg -i mysql-apt-config_0.3.4-2ubuntu14.10_all.deb
|
||||
|
||||
on Debian 7:
|
||||
|
||||
$ wget http://dev.mysql.com/get/mysql-apt-config_0.3.3-1debian7_all.deb
|
||||
$ sudo dpkg -i mysql-apt-config_0.3.3-1debian7_all.deb
|
||||
|
||||
当你安装DEB文件时,你会看到下面的配置菜单,并且选择配置那个Mysql产品
|
||||
|
||||
![](https://farm8.staticflickr.com/7702/16928715218_b1fcbcdbf3_c.jpg)
|
||||
|
||||
选择“Utilities”.完成配置后,选择“Apply”去保存配置。然后,更新包索引,并且安装Workbench
|
||||
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install mysql-workbench
|
||||
|
||||
#### Red Hat-based Desktop (CentOS, Fedora, RHEL): ####
|
||||
|
||||
去官网下载并安装适合你Linux环境的RPM源包
|
||||
For example, on CentOS 7:
|
||||
|
||||
$ wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
|
||||
$ sudo yum localinstall mysql-community-release-el7-5.noarch.rpm
|
||||
|
||||
on Fedora 21:
|
||||
|
||||
$ wget http://dev.mysql.com/get/mysql-community-release-fc21-6.noarch.rpm
|
||||
$ sudo yum localinstall mysql-community-release-fc21-6.noarch.rpm
|
||||
|
||||
验证"MySQL Tools Community"源是否被安装
|
||||
$ yum repolis enabled
|
||||
|
||||
![](https://farm9.staticflickr.com/8826/16494069254_15458ace52_c.jpg)
|
||||
|
||||
安装Workbench
|
||||
|
||||
$ sudo yum install mysql-workbench-community
|
||||
|
||||
设置远程数据库的安全连接
|
||||
|
||||
接下来是为你运行Mysql服务的VPS设置一个远程连接,当然你可以直接通过图形化的Workbench连接你的远程Mysql服务器(在数据库开放了远程连接后)。然而,这样做有很大的安全风险,因为有些人很容易窃听你的数据库传输信息,并且一个公开的Mysql端口(默认为3306)被作为攻击入口。
|
||||
|
||||
一个比较好的方法是关掉远程访问数据库服务功能,(仅允许在127.0.0.1访问)。然后在本地客户机和远程Vps直接设置一个SSH隧道,这样的话,和mysql之间的数据能被安全的传输,仅在它的本地回环接口上。相比较设置一个SSL加密的连接来说,配置SSH隧道需要很少的操作,因为他仅仅需要SSH服务,并且在大多数的VPS上已经部署了。
|
||||
|
||||
让我们来看看如何来为一个Mysql Workbench设置一个SSH隧道,这里的设置,不需要你开放远程访问Mysql服务。
|
||||
在一个运行了Workbench的本地客户机上,键入下面的命令,替换'user' and 'remote_vps'为你自己的信息
|
||||
|
||||
$ ssh user@remote_vps -L 3306:127.0.0.1:3306 -N
|
||||
|
||||
你会被要求输入你VPS的SSH密码,当你成功登陆VPS后,一个SSH隧道将会在本地的3306端口和远程VPS的3306端口将会被建立。这里你不会看到任何信息。
|
||||
|
||||
或者你可以选择在后台运行SSH隧道,按CTRL+Z停止当前的命令,然后输入bg并且ENTER
|
||||
|
||||
![](https://farm8.staticflickr.com/7714/16928715438_bf0db49b3b_c.jpg)
|
||||
|
||||
这样SSH隧道就会在后台运行了。
|
||||
|
||||
使用MySQL Workbench远程管理MySQL服务
|
||||
|
||||
在建立好SSH隧道后,你可以通过MySQL Workbench去远程连接Mysql服务了。
|
||||
|
||||
输入下面命令启动Workbench
|
||||
|
||||
$ mysql-workbench
|
||||
|
||||
![](https://farm9.staticflickr.com/8768/16494069294_0fce571ddb_c.jpg)
|
||||
|
||||
点击Workbench页面上面的加号图标去创建一个新的数据库连接,接着会出现下面的连接信息。
|
||||
|
||||
- **Connection Name**: any description (e.g., My remote VPS database)
|
||||
- **Hostname**: 127.0.0.1
|
||||
- **Port**: 3306
|
||||
- **Username**: MySQL username (e.g., root)
|
||||
|
||||
![](https://farm8.staticflickr.com/7727/16928715288_d9ac3bfc7a_c.jpg)
|
||||
|
||||
注意:因为隧道设置的是127.0.0.1:3306,所以主机名哪里必须是127.0.0.1,而不能是远程VPS的IP地址或者主机名
|
||||
|
||||
当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。
|
||||
|
||||
![](https://farm8.staticflickr.com/7650/17114969532_0252ffcd31_c.jpg)
|
||||
|
||||
当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。
|
||||
|
||||
#### MySQL Server Status ####
|
||||
|
||||
当你设置好一个新的数据库连接后,你会在Workbench窗口看到一个新的框,点击那个框就会实际去连接远程的MySQL服务了。
|
||||
|
||||
![](https://farm8.staticflickr.com/7627/16494069414_9d838d4138_c.jpg)
|
||||
|
||||
#### Client Connections ####
|
||||
|
||||
连接数是一个极其重要的监视资源,这个菜单显示了每个连接的详细信息。
|
||||
|
||||
![](https://farm9.staticflickr.com/8747/16909119337_a8d89772dd_c.jpg)
|
||||
|
||||
#### 用户和权限 ####
|
||||
|
||||
这个菜单允许你管理MySQL用户,包括他们的资源限制和权限。
|
||||
|
||||
![](https://farm9.staticflickr.com/8765/16494069384_760fc17c8f_c.jpg)
|
||||
|
||||
#### MySQL Server Administration ####
|
||||
|
||||
你可以启动或关闭MySQL服务,并且检查它的服务日志。
|
||||
|
||||
![](https://farm8.staticflickr.com/7588/17114969592_54526dfb32_c.jpg)
|
||||
|
||||
#### Database Schema Management ####
|
||||
|
||||
可以可视化的查看,更改,检查数据库结构,在“Schemas”标题下选择任何一个数据库或表,然后右击
|
||||
|
||||
![](https://farm8.staticflickr.com/7665/16496363973_fd03a96198_c.jpg)
|
||||
|
||||
![](https://farm9.staticflickr.com/8744/16909119497_7c884617b8_c.jpg)
|
||||
|
||||
#### Database Query ####
|
||||
|
||||
你可以执行任何的语句(只要你的权限允许),并且检查他的结果。
|
||||
|
||||
![](https://farm8.staticflickr.com/7716/17114969692_c0f02bb277_c.jpg)
|
||||
|
||||
此外,性能统计数据和报表仅用于MySQL5.6以上的版本。对于5.5及其以下的版本,性能部分会以灰色显示。
|
||||
### 结论 ###
|
||||
|
||||
简介且直观的选项卡界面,丰富的特性,开源,使MySQL Workbench成为一个非常好的可视化数据库设计和管理工具。为其减分的是它的性能。我注意到在一台运行繁忙的服务器上,Workbench优势会变得异常缓慢,尽管它的性能差强人意,我依然认为MySQL Workbench是MySQL数据库管理员和设计人员必备的工具之一。
|
||||
|
||||
你曾在你的生产环境中用过Workbench吗?或者你还有别的GUI工具可以推荐?请分享你的经验吧。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/remote-mysql-databases-gui-tool.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[译者ID](https://github.com/tyzy313481929译者demon)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://xmodulo.com/author/nanni
|
||||
[1]:http://xmodulo.com/go/digitalocean
|
||||
[2]:http://ask.xmodulo.com/install-phpmyadmin-centos.html
|
||||
[3]:http://xmodulo.com/set-web-based-database-management-system-adminer.html
|
||||
[4]:http://mysqlworkbench.org/
|
||||
[5]:http://dev.mysql.com/downloads/repo/apt/
|
||||
[6]:http://dev.mysql.com/downloads/repo/yum/
|
||||
[7]:http://xmodulo.com/how-to-allow-remote-access-to-mysql.html
|
Loading…
Reference in New Issue
Block a user