Archive for the ‘Linux’ Category
How to prevent swapping on a MySQL server?
Апрель 2nd, 2012PlanetMySQL Voting: Vote UP / Vote DOWN
MySQL 5.5 Available on Oracle Linux 6 and RHEL 6
Март 30th, 2012Following the availability of MySQL 5.5 on Oracle Linux 6 with the Unbreakable Enterprise Kernel, MySQL 5.5 is now also available on Red Hat Enterprise Linux 6 (RHEL 6) and Oracle Linux 6 with the Red Hat compatible kernel.
MySQL users can download MySQL 5.5 Community Edition binaries for Oracle Linux and Red Hat Linux 6 here.
MySQL customers can rely on Oracle Premier Support for MySQL when using the MySQL database on either Oracle Linux or Red Hat Enterprise Linux 6.
In addition to offering direct Linux support to customers running RHEL6, Oracle Linux 6, or a combination of both, Oracle also provides Oracle Linux 6 binaries, update and erratas for free via http://public-yum.oracle.com.
PlanetMySQL Voting: Vote UP / Vote DOWN
Linux gets a bigger shield against patent attacks
Март 9th, 2012The open source community should feel a little safer from software patent attacks today. The Open Invention Network (OIN), a consortium of Linux contributors formed as a self-defense against software patents, has extended the definition of Linux so that a whopping 700 new software packages are covered, including many developer favorites.
Just one hitch: The new definition also includes carve-outs that put all Linux developers on notice that Phillips and Sony reserve the right to sue over virtualization, search, user interfaces, and more.
PlanetMySQL Voting: Vote UP / Vote DOWN
Build A Free, Full-Featured Mail Server On Gentoo Linux With iRedMail
Март 7th, 2012Build A Free, Full-Featured Mail Server On Gentoo Linux With iRedMail
We're going to set up a free, full-featured mail server on Gentoo Linux, all mail service related components are free and open source, and you own all data. The installation process is extremly easy and smooth.
PlanetMySQL Voting: Vote UP / Vote DOWN
Alias shortcuts to MySQL CLI
Март 2nd, 2012Do you get write laziness in the command line everything what you need to connect to a MySQL server every time?
It may take less than minute, but sometimes one minute is vital (especially if we’re near the end of the world):
ivancp@ubuntu$ mysql -u root -p -h mysqlhost database
When we are hurry, these commands often fail several times per minute.
The solution: we can create shortcuts with bash alias commands in file ~/.bashrc :
# File ~ /. Bashrc # Command "my" to connect to a local server alias my='mysql -u root -p' # Command "my2" to connect to a remote server alias my2='mysql -u root -h 192.168.1.56 -p'
Next time if you want to access the local server just type the command my [database name] , there only ask for database password. You can use any command aliases, I prefer “my” and “my2″ they are short and useful.
But if you have several servers comes another problem, how to know in which server I’m?
Open a mysql-cli can be super fast with alias shortcuts, but all terminals have the same default prompt: mysql> To avoid disasters (ex. run DROP in wrong place) you can change mysql-cli prompt with option --prompt , then finally our .bashrc look like this:
#improved ~/.bashrc # Command "my" to connect to a local server alias my='mysql -u root --password=secret --prompt="local> "' # Command "my2" to connect to a remote server alias my2='mysql -u root --password=secret -h 192.168.1.56 --prompt="server 1> "'
Note I added --password parameter, it can be dangerous, use it under your own risk.
Enjoy!
PlanetMySQL Voting: Vote UP / Vote DOWN
Recommendation: Vagrant and Veewee
Февраль 24th, 2012Quoting from Vagrant’s web site:
Vagrant is a tool for building and distributing virtualized development environments. By providing automated creation and provisioning of virtual machines using Oracle’s VirtualBox, Vagrant provides the tools to create and configure lightweight, reproducible, and portable virtual environments.
A complementary technology called Veewee makes building VirtualBox VMs easier by automating away a lot of manual steps. Marius Ducea has a great blog post on how to use it.
My observations:
1. According to Vagrant’s web site, it should work on Windows. I’ve tried that with unsatisficatory results. I think it works better on Linux and Mac;
2. Vagrant 0.9 was released recently, and is the version that I am using. However, 0.9 broke some backward compatibility such that a lot of examples on Vagrant configuration file in its web site no longer works. But it does provide good cenough error message for you to fix and adjust;
3. Just a couple of weeks ago, Veewee was not compatible with Vagrant 0.9, but that has since been fixed. I mention this because things appear to be a bit fluid, and you may need to roll up your sleeves and tweak a few things yourself to get what you want;
4. Using Veewee to build Windows VM is not as smooth as doing the same for Linux VMs. In fact a few of the templates do not have the Cygwin setup file that definition.rb refers to. Another drawback is that the initial VM harddisk size is too small (10 gig I believe). Darn it, I forgot where I changed the setting to make it bigger before building it. Share that with me if you know please ![]()
5. In addition, it seems hard to build a Multi-VM environment with Windows in the mix. It looks possible, though. Once again please share that with me if you know!
Use cases:
1. Hacking, learning, and development. It provides a safe environment to play around, build and compile things, learn new technologies, etc. For example, I’ve used it to test and play with Tengine and Nginx. I’ve also built a Multi-VM environment where I tested MariaDB 5.3 and the new Percona Tools, pt-table-checksum and pt-table-sync in particular. I think Vagrant is a great tool to learn Chef, Puppet, and Hadoop;
2. Testing: testing software on different distros, continuous integration testing for server software (web server such as Tengine, database server such as MariaDB and Percona Server). In fact, using a Centos 6.2 VM, I found Percona’s 5.5 RPM packages still haven’t resolved header file conflicts, an old problem.
Sample Multi-VM Vagrant file
It is really convinient to have a Multi-VM environment for development and testing. Vagrant can do that but there is a shortage of good samples, especially for Vagrant 0.9. Here is a sample that worked for me. Note that:
1. The VMs in the environment can be made from the same image. In the sample below, “debian” and “xiaosaier”‘s daddy is “debian6″. No joke intended;
2. Use “vagrant ssh debian”, “vagrant ssh centos”, and “vagrant ssh xiaosaier” to get to each VM. Each VM can talk to each other via the IP address defined. Therefore it can be used for good, realistic testing. After having good Chef recipe or Puppet files, the VMs can be made in a certain way, which can be used for Continuous Integration Testing.
3. The hostonly network IP address works very well. However, the VM takes the name of the image it is based on by default. It will be nice to be able to customize the VMs’ names. Let me know if you know how;
Vagrant::Config.run do |config|
config.vm.define :debian do |debian_config|
debian_config.vm.box = "debian6"
debian_config.vm.network :hostonly, "33.33.33.10"
end
config.vm.define :centos do |centos_config|
centos_config.vm.box = "centos62"
centos_config.vm.network :hostonly, "33.33.33.11"
end
config.vm.define
iaosaier do |xiaosaier_config|
xiaosaier_config.vm.box = "debian6"
xiaosaier_config.vm.network :hostonly, "33.33.33.12"
end
PS. Note, the combination of colon and letter x turns into an emotion icon in the web page. Watch out!
PlanetMySQL Voting: Vote UP / Vote DOWN
Open APIs are the new open source
Февраль 14th, 2012We’ve seen the rise of open source software in the enterprise and also beyond the IT industry, but the real keys to openness and its advantages in today’s technology world — where efficient use of cloud computing and supporting services are paramount — exist in open application programming interfaces, or APIs.
Open source software continues to be a critical part of software development, systems administration, IT operations and more, but much of the action in leveraging modern cloud computing and services-based infrastructures centers on APIs. Open APIs are the new open source.
Read the full story at LinuxInsider.
PlanetMySQL Voting: Vote UP / Vote DOWN
A great way to test-drive MySQL from MariaDB, Oracle, and Percona
Февраль 13th, 2012I was doing some research on Percona Server, and came across this great tip by Baron: if you are using Oracle’s MySQL and want to test out and learn new/improved features that are present in Percona Server, you can just stop the mysqld instance, extract Percona Server binary from its rpm/deb package or tarball file, swap the binary, and do a successful restart. You can then do a test drive, kick the tires, learn and observe to your heart’s content. Swap the original mysqld back after you are done, as necessary.
I tested it and it worked great for me. Specifically, I did the following:
1. sudo /etc/init.d/mysql(d) stop
2. sudo cp /usr/sbin/mysqld /location/mysqldFromOracleOrWhatever
3. sudo cp /perconaBinaryDirectory/mysqld /usr/sbin/mysqld
4. sudo /etc/init.d/mysql(d) start
5. Test drive
6. Swap the original mysqld back as necessary
You can tell which binary you are using by reading the product and version information upon successful connection from mysql client. You can also do “SHOW VARIABLES” and tell by noticing additional settings that are present in Percona Server.
It turns out you can do the same with MariaDB as well. In fact, I tested that over the weekend successfully. You need one extra step though. If you simply followed the steps above, here is what you will get while mysqld is trying to start:
Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid).
And here is the relavant info in error log:
120213 5:12:33 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 722 error messages, but it should contain at least 930 error messages.
Check that the above file is the right version for this program!
120213 5:12:33 [ERROR] Aborting
You see, Percona Server is more or less Oracle MySQL, plus Percona patches for InnoDB storage engine plugin, known as XtraDB. MariaDB’s change, on the other hand, is more widespread and substantial. It certainly has changes to the InnoDB storage engine plugin. After all, both MariaDB and Percona Server use the same XtraDB default storage engine. On top of that, MariaDB has additional changes to the MySQL server itself, query optimizer and replication come to mind. So it is not surprising that MariaDB’s errmsg.sys is different. I hope that compatibality can be maintained as things move forward, which is probably not too hard to do technically. In a perfect world, I wish to be able to combine both MariaDB and Percona’s strength, but I digress.
So before we can test drive MariaDB, not only do we need to swap mysqld, we also need to swap errmsg.sys. It’s always a good idea to keep a backup before it is overwritten. After starting, if you run “SHOW VARIABLES LIKE ‘optimizer_%’, you will notice that MariaDB has a lot more optimizer knobs than Percona Server or Oracle MySQL.
This actually gives me some ideas for benchmark testing. What will we see if we conduct the same benchmark tests on the same server, with only mysqld swapped for each set of benchmark tests?
PS. This reminds me that years back, my team wrote a VB6 application that controled lamination film production process. I wrote a utility called AppLauncher that checked the version of the .exe binary and did a replace if the production version is different from the one in the deployment folder. That binary swap bypassed all unnecessary installation package creation, testing, and distribution, provided that there was no changes to the supporting DLL files.
PlanetMySQL Voting: Vote UP / Vote DOWN
Linux Documentation Writer Wanted!
Февраль 9th, 2012The Oracle Linux and Virtualization Documentation Team is seeking an experienced Technical Writer
with a focus on writing documentation for the Oracle Linux product. (The MySQL Documentation Team is part of that group as well.)
Applicants should be located in either Ireland, the UK, Sweden, Norway, Denmark, or Finland (click on the links for a detailed job description).
We're a vastly distributed team, with writers in Australia, North America, and Europe. Our infrastructure is based on DocBook XML, and we're not just writing docs, but also maintain the whole processing and publication work chain.
Key competencies you should have include:
- 3 or more years previous experience in writing software documentation (please provide URLs of your writings I can look at!)
- Experience with writing documentation for system level software and operating systems
- Strong knowledge of the Linux operating system
- Strong knowledge of XML, DocBook XML, and XSL style sheets (and motivation to help maintain and expand our tools and infrastructure)
- Ability to administer own workstation and test environment
- Good experience with distributed working environments and versioning systems such as SVN
If this sounds like something for you, follow the links above and send in your application!
PlanetMySQL Voting: Vote UP / Vote DOWN
CAOS Theory Podcast 2012.01.20
Январь 20th, 2012Topics for this podcast:
*Hadoop v1.0 and year ahead
*Oracle-Cloudera deal for more Hadoop
*Oracle’s ‘Sun spot’ with Solaris
*Open Source M&A outlook for 2012
*Our new MySQL/NoSQL/NewSQL survey
iTunes or direct download (28:49, 4.9MB)
PlanetMySQL Voting: Vote UP / Vote DOWN