Download the .iso files here:
http://vault.centos.org
Friday, March 27, 2015
Thursday, March 26, 2015
How to compile qemu for RHEL 6
1) Download, compile, and install SDL-1.2.15
2) Download qemu-2.2.1. Configure like this:
./configure --enable-cdl
3) /path/to/bin/qemu-system-x86_64 -m 4096 /path/to/HardDriveImage.qcow2
4096 is the amount of memory you want to use, in MB.
If your hard drive image is from VirtualBox, http://cheznick.net/main/content/converting-a-virtual-machine-from-virtualbox-to-kvm explains how to convert the hard drive image to either a raw .img file or a qcow2 file:
1) VboxManage clonehd /path/to/hardDriveImage.vdi hardDriveImage.img --format raw
2) qemu-img convert -f raw hardDriveImage.img -O qcow2 hardDriveImage.qcow2
2) Download qemu-2.2.1. Configure like this:
./configure --enable-cdl
3) /path/to/bin/qemu-system-x86_64 -m 4096 /path/to/HardDriveImage.qcow2
4096 is the amount of memory you want to use, in MB.
If your hard drive image is from VirtualBox, http://cheznick.net/main/content/converting-a-virtual-machine-from-virtualbox-to-kvm explains how to convert the hard drive image to either a raw .img file or a qcow2 file:
1) VboxManage clonehd /path/to/hardDriveImage.vdi hardDriveImage.img --format raw
2) qemu-img convert -f raw hardDriveImage.img -O qcow2 hardDriveImage.qcow2
Sunday, March 22, 2015
How to permanently show the Bookmarks Toolbar in Firefox
Right click on the tab area (right under the window title bar), and check the "Bookmarks Toolbar" option.
Enabling that feature was kind of hard to find for some reason...
Enabling that feature was kind of hard to find for some reason...
Friday, March 20, 2015
How to force a Solr 5.0.0 field/column to be a certain type
Solr 5 uses a managed schema by default, while Solr 4 used the schema.xml file. Solr 5 automatically creates the schema for you by guessing the type of the field. Once the type is assigned to the field, you can't change it. You have to set the type of the field before you add data to Solr 5.
To change the schema in Solr 5, you will want to use the Schema API, which is a REST interface. Go to https://cwiki.apache.org/confluence/display/solr/Schema+API
https://cwiki.apache.org/confluence/display/solr/Schemaless+Mode describes a little bit about the Schemaless Mode (i.e. managed schema). That page states the following:
"You Can Still Be Explicit - Even if you want to use schemaless mode for most fields, you can still use the Schema API to pre-emptively create some fields, with explicit types, before you index documents that use them. ... Once a field has been added to the schema, its field type is fixed."
If you are using the quick start guide for Solr 5, here's what you have to do if you want to explicitly specify the field types:
After you enter the following command:
bin/solr start -e cloud -noprompt
Then enter a command like this:
curl -X POST -H 'Content-type:application/json' --data-binary '{ "add-field" : { "name":"MYFIELDNAMEHERE", "type":"tlong", "stored":true}}' http://localhost:8983/solr/gettingstarted/schema
The previous command will force the MYFIELDNAMEHERE field to be a tlong. Replace MYFIELDNAMEHERE with the field name that you want to be explicitly set, and change tlong to the Solr type that you want to use.
After doing that, then load your data as usual.
To change the schema in Solr 5, you will want to use the Schema API, which is a REST interface. Go to https://cwiki.apache.org/confluence/display/solr/Schema+API
https://cwiki.apache.org/confluence/display/solr/Schemaless+Mode describes a little bit about the Schemaless Mode (i.e. managed schema). That page states the following:
"You Can Still Be Explicit - Even if you want to use schemaless mode for most fields, you can still use the Schema API to pre-emptively create some fields, with explicit types, before you index documents that use them. ... Once a field has been added to the schema, its field type is fixed."
If you are using the quick start guide for Solr 5, here's what you have to do if you want to explicitly specify the field types:
After you enter the following command:
bin/solr start -e cloud -noprompt
Then enter a command like this:
curl -X POST -H 'Content-type:application/json' --data-binary '{ "add-field" : { "name":"MYFIELDNAMEHERE", "type":"tlong", "stored":true}}' http://localhost:8983/solr/gettingstarted/schema
The previous command will force the MYFIELDNAMEHERE field to be a tlong. Replace MYFIELDNAMEHERE with the field name that you want to be explicitly set, and change tlong to the Solr type that you want to use.
After doing that, then load your data as usual.
Tuesday, March 17, 2015
How to install Windows 98 without using a floppy disk drive
If you're reading this... no you didn't go back in time 15+ years.
I had to install Windows 98 to one of my computers, because my video capture card only has drivers for Windows 95 and Windows 98. It had been so long since I've installed Windows 98, I forgot that the Windows 98 installation CD is not bootable. I didn't think I had a floppy disk (even though that computer had a floppy disk drive), so here's how I installed Windows 98 instead:
1) Download Knoppix (http://www.knopper.net/knoppix/index-en.html) and create a Knoppix CD
2) Create a Windows 98 boot CD from here: https://staff.washington.edu/curreri/windows-98-boot-cd-download-this-iso/
3) Boot my computer to the Windows 98 boot CD, repartition and format your hard drive to FAT32. Use the format /s switch to copy the system files to the c drive.
4) If you only have 1 CD drive, boot to Knoppix, and copy the Windows 98 installation CD to the "C drive", which was mounted at /mnt/sda1 or /dev/sda1 for me. You can use scp to copy the Windows 98 installation CD to your "C drive". If you have 2 CD drives, you can skip the Knoppix step, and just change to the R or S drive (which should be the other CD drive) on steps 7 and 7.
5) Boot to the Windows 98 boot CD if you currently have Knoppix up.
6) Change to C drive by typing in "c:" at the DOS prompt (or change to the R or S drive)
7) Run the setup.exe Windows 98 install program
I had to install Windows 98 to one of my computers, because my video capture card only has drivers for Windows 95 and Windows 98. It had been so long since I've installed Windows 98, I forgot that the Windows 98 installation CD is not bootable. I didn't think I had a floppy disk (even though that computer had a floppy disk drive), so here's how I installed Windows 98 instead:
1) Download Knoppix (http://www.knopper.net/knoppix/index-en.html) and create a Knoppix CD
2) Create a Windows 98 boot CD from here: https://staff.washington.edu/curreri/windows-98-boot-cd-download-this-iso/
3) Boot my computer to the Windows 98 boot CD, repartition and format your hard drive to FAT32. Use the format /s switch to copy the system files to the c drive.
4) If you only have 1 CD drive, boot to Knoppix, and copy the Windows 98 installation CD to the "C drive", which was mounted at /mnt/sda1 or /dev/sda1 for me. You can use scp to copy the Windows 98 installation CD to your "C drive". If you have 2 CD drives, you can skip the Knoppix step, and just change to the R or S drive (which should be the other CD drive) on steps 7 and 7.
5) Boot to the Windows 98 boot CD if you currently have Knoppix up.
6) Change to C drive by typing in "c:" at the DOS prompt (or change to the R or S drive)
7) Run the setup.exe Windows 98 install program
Tuesday, March 10, 2015
How to get multiple distributed shards working on Solr 5.0.0
Here's how to get distributed querying working with shards with Solr 5.0.0
- Go through http://lucene.apache.org/solr/quickstart.html (see my blog here for hints http://muddyazian.blogspot.com/2015/03/how-to-get-solr-500-quick-start.html)
- If you follow the quickstart, 2 shards are created on (i) port 8983 and (ii) port 7574. Two replicas are also created, but the important thing to note is that port 8983 has one shard, and 7574 has the other shard.
The data are automatically routed to either the 8983 shard or the 7574 shard when importing.
- A query like
http://localhost:8983/solr/gettingstarted/select?q=*:*
will query on both shards, and merge the results together
- If you only want results from one shard, then form the query like this:
http://localhost:8983/solr/gettingstarted/select?q=*:*&shards=localhost:7574/solr/gettingstarted
(Note: that you need the /gettingstarted at the end of the URL, which is something missing from the instructions at https://cwiki.apache.org/confluence/display/solr/Distributed+Requests)
Information pieced together from:
- http://lucene.apache.org/solr/quickstart.html
- Apache Solr Reference Guide (https://cwiki.apache.org/confluence/display/solr/Apache+Solr+Reference+Guide)
How to expand all trees Emacs and org mode
Usually, you expand a subtree by pressing TAB. To expand the whole document, press:
Ctrl-u Ctrl-u Ctrl-u TAB
Ctrl-u Ctrl-u Ctrl-u TAB
Friday, March 6, 2015
How to get solr 5.0.0 quick start tutorial working on Fedora linux
As of today, the current version of Solr is 5.0.0, and the quick start guide is here:
http://lucene.apache.org/solr/quickstart.html
When running:
$ bin/solr start -e cloud -noprompt
If you are getting the following error message:
WARN - 2015-03-06 16:02:05.519; org.apache.solr.util.SolrCLI; Request to http://134.252.99.99:7574/solr/admin/collections?action=list failed due to: Connection timed out, sleeping for 5 seconds before re-trying the request ...
It's likely because your router or firewall is blocking connections to your own machine to port 7574 when using the IP address.
Here's a workaround:
Edit the /etc/hosts file and put in the following line:
134.252.99.99 localhost
(replace 134.252.99.99 with your IP address)
Your OS will know that 134.252.99.99 is localhost, and will bypass the router.
Now, when you go to http://localhost:8983/solr/#/~cloud you should see this diagram:
Note: 134.252.99.99 is not my IP address. It's supposed to be a "dummy" IP address. Apologies if that is your IP address.
http://lucene.apache.org/solr/quickstart.html
When running:
$ bin/solr start -e cloud -noprompt
If you are getting the following error message:
WARN - 2015-03-06 16:02:05.519; org.apache.solr.util.SolrCLI; Request to http://134.252.99.99:7574/solr/admin/collections?action=list failed due to: Connection timed out, sleeping for 5 seconds before re-trying the request ...
It's likely because your router or firewall is blocking connections to your own machine to port 7574 when using the IP address.
Here's a workaround:
Edit the /etc/hosts file and put in the following line:
134.252.99.99 localhost
(replace 134.252.99.99 with your IP address)
Your OS will know that 134.252.99.99 is localhost, and will bypass the router.
Now, when you go to http://localhost:8983/solr/#/~cloud you should see this diagram:
Note: 134.252.99.99 is not my IP address. It's supposed to be a "dummy" IP address. Apologies if that is your IP address.
How to get VNC server (vncserver) working with Fedora via yum
$ sudo yum install tigervnc-server
$ vncserver
On the client machine, download a vnc client (such as Tight VNC), and put in the following server IP address:
server.ip.address:5901
$ vncserver
On the client machine, download a vnc client (such as Tight VNC), and put in the following server IP address:
server.ip.address:5901
Tuesday, March 3, 2015
How to install VirtualBox .rpm on Fedora 16
No guarantees here, because there's a "rpm -i --force" involved...
wget ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/releases/17/Everything/x86_64/os/Packages/l/libpng-1.5.10-1.fc17.x86_64.rpm
sudo rpm -i --force libpng-1.5.10-1.fc17.x86_64.rpm
wget http://download.virtualbox.org/virtualbox/4.3.24/VirtualBox-4.3-4.3.24_98716_fedora17-1.x86_64.rpm
rpm -i VirtualBox-4.3-4.3.24_98716_fedora17-1.x86_64.rpm
After that, add yourself to the vboxusers group (in /etc/group)
wget ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/releases/17/Everything/x86_64/os/Packages/l/libpng-1.5.10-1.fc17.x86_64.rpm
sudo rpm -i --force libpng-1.5.10-1.fc17.x86_64.rpm
wget http://download.virtualbox.org/virtualbox/4.3.24/VirtualBox-4.3-4.3.24_98716_fedora17-1.x86_64.rpm
rpm -i VirtualBox-4.3-4.3.24_98716_fedora17-1.x86_64.rpm
After that, add yourself to the vboxusers group (in /etc/group)
Subscribe to:
Posts (Atom)