Back to MySQL

不知从什么时候开始,Fedora 和 CentOS 里的 MySQL 都给换成了 MariaDB。我一直搞不懂好端端的 MySQL 为什么还要分出一个 MariaDB,更搞不懂 MariaDB 的优越性在哪里,反正 MySQL 对我来说够用了,倒是 MariaDB 安装和启动时使用了不同于 MySQL 的名称,让我很不习惯。比如 换成了 换成了 幸好,除此之外,一切照旧,用到 MySQL 的 PHP 程序都能继续在 MariaDB 使用,所以我就一直用着 MariaDB。直到今天使用 Magento2,要求 MySQL 5.6 以上版本,而 CentOS 下把 MariaDB 用 yum update 到最新版本,仍是 5.5.40。 于是我被逼着去下载 MySQL 5.6。不用不知道,一用发现 CentOS 下安装 MySQL 超级方便,只要安装好 RPM 包——http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm,就可以恢复使用 执行安装。 早知如此,我真不该碰 MariaDB——这个并没有给我带来实际利益的程序也花了我一天去熟悉。

Hands on GeoIP for Nginx on Fedora and CentOS

最近研究了一下如何根据用户的 IP 获得他的地理位置(我只关心 country 级,不关心 city 级),区别性地在 Ngnix 层面做一些限制性访问。这里用到 GeoIP 软件包和 MaxMind 的数据库。 在 Fedora 20 下,Nginx (目前 1.4.7) 依赖于 GeoIP。等于说,装好 Nginx,ngx_http_geoip_module 自然就启用了,只要在两个配置文件略作修改。 1. 在/etc/nginx/nginx.conf 里添加 2. 在 /etc/nginx/fastcgi_params 里添加 还有其他参数可用,请自行查手册。重启 Nginx 就可以使用 GeoIP 的信息了。 在 CentOS 6.5 下,事情要复杂一些。网上说 CentOS 下的 Nginx 同样依赖于 GeoIP,可在我这里事实并非如此。同样是最新的 1.4.7 版,Nginx for CentOS 是不带 ngx_http_geoip_module 编译的。即使我用 yum install GeoIP 安装了 GeoIP 软件包,但… Continue reading Hands on GeoIP for Nginx on Fedora and CentOS

Job for mariadb.service failed bug fixed

Last month I set up a development server using Fedora 20. On that server I wanted to change MySQL socket file from /var/lib/mysql/mysql.sock to /dev/shm/mysql.sock. Basically I wanted to move MySQL socket file to shared memory for performance gain. I made the change in /etc/my.cnf, but when I tried to start mysqld, I got the… Continue reading Job for mariadb.service failed bug fixed

Play Blu-ray ISO images on Fedora 20

买了新电视 SAMSUNG UE46F6100,总想试一下它的 3D 效果。我没有 Blu-ray player,也没有 Blu-ray disk,于是下载了一个 Blu-ray ISO 镜像格式的文件。怎么放呢? 我一开始想在 Sony NSZ-GS7 机顶盒上播放,可是没有可用的 App。Windows 下倒有很多解决方案,可惜它不是我的首选。 我想的是怎么在 Fedora 20 下播放 Blu-ray disk?如果可行,就可以用 Fedora 20 配一台 HTPC 去客厅播放 Blu-ray disk。 做之前,我以为这有点难,不太会有现成的 yum package。事实上,很简单。 首先得有 libbluray,用 yum install 一下就可以。但我的机子也装有 libbluray,不知是 Fedora 20 默认安装的库,还是我装别的软件时带进来的。 然后加载 rpmfusion repo,装一下 vlc 就可以用 VLC 来播放 Blu-ray disk。 HTPC 又多一个新功能。但是 SAMSUNG… Continue reading Play Blu-ray ISO images on Fedora 20

Aptana Studio 3.4.2 crashes on JDK in Fedora 20

最近重拾 Aptana Studio,下载了最新版 3.4.2,可一编辑代码就无故崩溃。Fedora 20 提示 JDK crashed。 我一开始没注意到我用的是 OpenJDK,Aptana 说不支持 OpenJDK,赶紧去下 Oracle/Sun JDK,还换了两次版本,1.7.0_51、1.6.0_45 都试过,都不成。 搜了一下此类问题,给我感觉 2010 年以来在各版本的 Aptana Studio 和 JDK 时有发生,坏也不知道什么原因,好也不知道什么原因。大概我之前人品好,没碰到此类问题。 换用 Netbeans,当前环境没有问题,但实在不熟悉 Netbeans,仍纠结着想用 Aptana Studio。想了个办法,切换回 Oracle/Sun JDK 1.7.0_51,安装 Eclipse 4.3.1,再装 Aptana Studio plugin for Eclipse,嘿,不再无故崩溃了。

Change Grub timeout seconds

Changing Grub timeout seconds is not as many people said, by edit /etc/default/grub. At least with Fedora 20, I can proove it is not the right place to make the change. The corresponding file is /boot/grub2/grub.cfg. In the file look for 5 seconds is the default timeout. Change it to any seconds you want it… Continue reading Change Grub timeout seconds

Yum clean all cleaned warnings

今天在 Fedora 20 上更新应用,碰到一大堆 warnings: Warning: group core does not exist. Warning: group gnome-desktop does not exist. Warning: group multimedia does not exist. Warning: group firefox does not exist. Warning: group guest-desktop-agents does not exist. Warning: group base-x does not exist. Warning: group anaconda-tools does not exist. Warning: group fonts does not exist. Warning: group… Continue reading Yum clean all cleaned warnings

Failed to install Fedora 20 beta 5

我常用的一台 Fedora 18 无法做 yum update 好久了。所以想到重装。Fedora 20 beta 5 已经出来了,也正好趁此尝尝鲜。 我按我的常规做好了 liveusb,可是非常奇怪,启动不了,在启动刚开始就卡住了。提示信息为 Secure boot not enabled error: failure reading sector 0xfc from “hd1” error: failure reading sector 0xe0 from “hd1” … 我一开始以为 liveusb 没做好,可拿到另一台机子却能毫无故障地启动了。我就排除了 liveusb 自身的原因。 有人说这是 BIOS 里 Secure boot disabled 的缘故,可我的 BIOS 根本没这个选项。 有人说这是 EFI (UEFI) boot 造成的,我选择了不从 EFI 设备启动,但仍从同一个 liveusb 启动,结果错误提示… Continue reading Failed to install Fedora 20 beta 5