Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Wednesday, April 8, 2015

How to Install LiveSplit on 64-bit Fedora 20 Linux

1) Download the latest LiveSplit from here: http://livesplit.org/downloads/

2) install wine:

yum install wine

3) Download winetricks

wget http://winetricks.org/winetricks
chmod a+x winetricks

4) Setup a 32-bit wine prefix:

sudo su
export WINEARCH="win32"
export WINEPREFIX=~/.wine-PROGRAM-NAME/
wineboot -u

5) sudo su
winetricks dotnet40

6) unzip LiveSplit_1.5.5.zip

6) Run LiveSplit

sudo su
wine ./LiveSplit.exe

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

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.

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

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)

Tuesday, February 17, 2015

Getting Networking to Work with VirtualBox and CentOS

Why isn't my network working when I've installed CentOS 6 on VirtualBox?  Try to do this:

1) Edit the /etc/sysconfig/network-scripts/ifcg-eth0 file

2) Change

ONBOOT=no

to

ONBOOT=yes

3) Reboot the VM

Networking should work after that.

Tuesday, October 7, 2014

Compile subversion for Fedora 19

If you've already tried to compile subversion for Fedora 19, and you got the error message when doing a svn update of svn checkout:

Unrecognized URL scheme for ...

then you have to compile subversion with https support.  This is done by default, but you have to have the serf libraries installed.  Here's how to get things working:

sudo yum install libserf libserf-devel apr-util apr-util-devel apr apr-devel

Then, you can compile subversion normally, like this:

tar -zxvf subversion-1.8.10.tar.gz
cd subversion-1.8.10
./configure
make -j16
sudo make install

Install Adobe Acrobat Reader on Fedora 20

Adapted from http://www.if-not-true-then-false.com/2010/install-adobe-acrobat-pdf-reader-on-fedora-centos-red-hat-rhel/

sudo su

wget http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.rpm

yum install nspluginwrapper.i686 libcanberra-gtk2.i686 adwaita-gtk2-theme.i686 PackageKit-gtk3-module.i686

yum localinstall AdbeRdr9.5.5-1_i486linux_enu.rpm

Monday, October 6, 2014

Java Applet plugin on RHEL 6 Linux and Firefox

Here's how to run a Java applet in Fedora on RHEL 6 Linux:

1) Download the Java RPM from http://www.java.com

2) Install the RPM

3) Create a symbolic link to the Java shared library:

ln -s /usr/java/jre1.7.0_67/lib/i386/libnpjp2.so ~/.mozilla/plugins/

4) Restart Firefox

5) Confirm that you see the Java information when you type "about:plugins" in Firefox, on the locaiton bar.

Friday, August 29, 2014

How to avoid yum from automatically running via PackageKit on Fedora


Run this:

sudo /usr/bin/gpk-prefs

Then choose the "Never" option.

Thursday, August 28, 2014

How to change the screensaver lock timeout in Fedora 20 and Gnome

Run this on the command line (in Terminal):

gsettings set org.gnome.desktop.session idle-delay 3600

Change 3600 to anything else you want.  The units are in seconds.

Monday, August 11, 2014

Solving "Error initializing QueryElevationComponent." with Solr

You may be getting the following error message when trying to start up Solr:

ERROR - 2014-08-11 16:49:49.554; org.apache.solr.core.CoreContainer; Unable to create core: collection1
org.apache.solr.common.SolrException: Error initializing QueryElevationComponent.
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:868)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:643)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:556)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:261)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:253)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Error initializing QueryElevationComponent.
        at org.apache.solr.handler.component.QueryElevationComponent.inform(QueryElevationComponent.java:251)
        at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:651)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:851)
        ... 10 more

If you're getting this error, you may have changed your primary index from a string to an int.

To fix this, edit your example/solr/collection1/conf/elevate.xml file, and change it to the following:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- ... -->
<elevate>
 <query text="foo bar">
<!--
  <doc id="1" />
  <doc id="2" />
  <doc id="3" />
-->
 </query>
 <query text="ipod">
<!--   <doc id="MA147LL/A" />  
   <doc id="IW-02" exclude="true" />
-->
 </query>
</elevate>

Specifically, comment out the <doc ... /> tags.

Thursday, May 29, 2014

How to get public_html in users directories working with Fedora 20 and Apache httpd

This is how to get the public_html directory working in users directories.

Edit the file /etc/httpd/conf.d/userdir.conf

Uncomment the UserDir line, and change it to:

UserDir enabled

Save the file and restart apache

sudo /sbin/service httpd restart

mkdir ~/public_html
chmod 755 ~
chmod 755 ~/public_html

Create a file called ~/public_html/index.html and put something in it.

Wednesday, April 30, 2014

How do I turn off the firewall in Fedora?

sudo /sbin/service firewalld stop
sudo /sbin/chkconfig --level 345 firewalld off

What to do if restarting apache httpd fails when trying build an OSM tile server

If you are using Fedora to create an Open Street Map tile server, when you restart apache, you might be getting this error:

Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.

When running systemctl status httpd.service, if the error looks like this:

Apr 29 23:23:22 hostname.com systemd[1]: Starting The Apache HTTP Server...
Apr 29 23:23:22 hostname.com httpd[6326]: AH00526: Syntax error on line 88 of /etc/httpd/conf/httpd.conf:
Apr 29 23:23:22 hostname.com httpd[6326]: Invalid command 'LoadTileConfigFile', perhaps misspelled or defined by a module not included i...guration

Make the following changes:
  1. Rename the /etc/httpd/conf.d/mod_tile file to /etc/httpd/conf.d/mod_tile.conf
  2. Change the contents of that file to the following:
    LoadModule tile_module /usr/lib/httpd/modules/mod_tile.so

Thursday, November 21, 2013

How to get gzip working for Jetty 8 and Solr

If you're getting the following error message in the solr.log file:

java.lang.ClassNotFoundException: org.eclipse.jetty.servlets.GzipFilter

Try doing the following:

Edit /opt/solr/solr-webapp/webapp/WEB-INF/web.xml and put the following in it:


<web-app ... >


<filter>
      <filter-name>GzipFilter</filter-name>
      <filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class>
      <init-param>
        <param-name>mimeTypes</param-name>  
        <param-value>text/html,text/plain,text/xml,application/xhtml+xml,application/xml,text/css,application/javascript,image/svg+xml,application/json,application/xml; charset=UTF-8</param-value>
      </init-param>
    </filter>
    <filter-mapping>
      <filter-name>GzipFilter</filter-name>
      <url-pattern>/*</url-pattern>
    </filter-mapping>

If you don't have a jetty-servlets*.jar file, then download it from http://mvnrepository.com/artifact/org.eclipse.jetty/jetty-servlets and put it in /opt/solr/lib

Restart jetty:

sudo /sbin/service jetty restart

If solr doesn't start up, check the /opt/solr/logs/solr.log file.

Tuesday, November 19, 2013

How do I show PHP errors on a webpage?

In your /etc/php.ini file, add the following:

error_reporting(E_ALL);
ini_set('display_errors', 'on');

Monday, November 4, 2013

Ruby, yaml, and gem in Fedora Linux

If you're trying to use gem to install something, and you're getting the following error message:

It seems your ruby installation is missing psych (for YAML output)....

You could try to install libyaml like this:

yum install libyaml

If that still doesn't work, it might be because the libyaml library is not new enough.  If that's the case, install libyaml from source from here:

http://pyyaml.org/download/libyaml/

Then, uninstall ruby, and then re-install ruby.  Hopefully you'll have success after that.

Thursday, September 12, 2013

How to change the default OS in grub on Fedora 16, Fedora 17, Fedora 18, and Fedora 19

See https://ask.fedoraproject.org/question/8885/how-can-i-change-default-operating-system-in-start-up-boot-menu/

Essentially, you will want to change the /etc/default/grub file and then perform the following:

grub2-mkconfig -o /boot/grub2/grub.cfg