Search
Tuesday, 17 September 2013
Quick Ubuntu server install
Run Ubuntu updates
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install lamp-server^ phpmyadmin (if required)
Set static IP
ifconfig
sudo nano /etc/network/interfaces
The default entries will be:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
change auto eth0 entry to:
auto eth0
iface eth0 inet static
address 10.0.6.x
netmask 255.255.248.0
gateway 10.0.7.254
network 10.0.0.0
broadcast 10.0.7.255
dns-nameservers 8.8.8.8
then save and run:
sudo /etc/init.d/networking restart
Enable SSH for file transfer
sudo apt-get install openssh-client openssh-server
sudo shutdown -r now - restart
sudo shutdown -h now - shut down
Thursday, 9 May 2013
Ubuntu 12.04 and SOLR 3.6.2 install
Solr installation
Hi, I thought I would revisit my solr install to try and clarify a few points where people were having problems loading the solr-cell class and getting binary files to index, with errors such as these:Error loading class
'org.apache.solr.handler.dataimport.DataImportHandler'
So, hopefully by following this tutorial you should get a working solr install:
Install base OS, 64 bit variant, in this case Ubuntu 12.04 64 bit
create a solr user and log in with that userGo to 'Software centre' and install Synaptic Package Manager
install tomcat6 + tomcat6-common + tomcat6-admin
sudo apt-get install tomcat6
sudo apt-get install tomcat6-admin
Modify the Tomcat admin configuration to allow a new manager login.
sudo gedit /etc/tomcat6/tomcat-users.xml
Add the following to the file, commenting out other similar lines
Restart tomcat
sudo service tomcat6 restart
Check the root of Tomcat works by visiting: http://localhost:8080
Then log into the Tomcat manager page by visiting http://localhost:8080/manager/html and entering your Tomcat username and password that you setup previously
Prepare the solr environment
Create a temp folder for the solr binary
cd /home/solr/
mkdir tmp/solr/
Navigate to that folder
cd tmp/solr/
download the relevant Apache Lucene solr binary using WGET (you will need to get the URL for the version you wish to install)
wget
http://apache.mirrors.timporter.net/lucene/solr/3.6.2/apache-solr-3.6.2.tgzDecompress the binary file, copy files into their relevant locations and give the tomcat user rights to the working folder
tar xzvf apache-solr-3.6.2.tgz
cd apache-solr-3.6.2
sudo cp dist/apache-solr-3.6.2.war /var/lib/tomcat6/webapps/solr.war
sudo cp -fr example/solr /var/lib/tomcat6/
sudo chown -R tomcat6:tomcat6 /var/lib/tomcat6/solr
Restart tomcat6
sudo service tomcat6 restart
Set the solr home directory
sudo gedit /var/lib/tomcat6/webapps/solr/WEB-INF/web.xml
Modify the file accordingly, by uncommenting the solrhome env entry and adding the line below:
/var/lib/tomcat6/solr/
Restart tomcat6sudo service tomcat6 restart
Check you can start solr
http://localhost:8080/solr
Setup solr-cell for binary file (word, pdf etc) indexing
First we need to load the solr-cell module in solrconf.xml
sudo gedit /var/lib/tomcat6/solr/conf/solrconfig.xml
Find and change the solr-cell line to match the following:
lib dir="/var/lib/tomcat6/webapps/solr/WEB-INF/lib/" regex="apache-solr-cell-\d.*\.jar"
Save the file
Now we must copy all the relevant .jar files into the classpath library
cd /home/solr/tmp/solr/apache-solr-3.6.2/
sudo cp contrib/extraction/lib/*.jar /var/lib/tomcat6/webapps/solr/WEB-INF/lib/
sudo cp contrib/dataimporthandler/lib/*.jar /var/lib/tomcat6/webapps/solr/WEB-INF/lib/
sudo cp dist/*.jar /var/lib/tomcat6/webapps/solr/WEB-INF/lib/
Restart tomcat6
sudo service tomcat6 restart
Test our solr installation
First we must install the curl command to send binary files via http to the request handler
sudo apt-get install curl
Create a text (non image) PDF file by creating a text file in Gedit with a keyword, such as 'otter' and printing the result to the file test.pdf (save this in your /home/documents/ folder)
Now we will take the test file and 'curl' it into solr
cd /home//Documents/
curl "http://localhost:8080/solr/update/extract?literal.id=smoketest&commit=true" -F "myfile=@test.pdf"
Now test to see if you can search the index for the id
From a remote PC enter the following URL:
http://
In the query string box enter the following:
id:smoketest
Press search and the results should show a match for the 'numFound' variable. This shows 1 matching hit for 'smoketest' so we can confirm the system is working correctly.
Once the basic system is running it is time to apply the custom solr schema (if you have/need one). The schema resides in the following location:
/var/lib/tomcat6/solr/conf/schema.xml
Labels:
apache,
binary,
curl,
dataimporthandler,
error loading class,
index,
Indexing,
linux,
Lucene,
org.apache.solr,
search,
solr,
solr install,
solr-cell,
tika,
Tomcat,
tutorial,
ubuntu
Tuesday, 30 April 2013
Amazing technology from Microsoft
If this makes it into production form I'll have to do some saving!
If you love COD...
Check out my friends channel - plenty of BOPS action.
http://www.youtube.com/user/druidhwang
http://www.youtube.com/user/druidhwang
Labels:
black ops,
bops,
bops2,
bradley moles,
call of duty,
cod,
hwang,
xbox
Hyper-V 2012 - Best freebie in a while
If you are looking for a free hypervisor platform then I strongly suggest you take a look at Microsoft's Hyper-V 2012. I've been using VmWare Esxi for the last few years and although it has served me fine, the speed improvements and management of Hyper-V are so much better now. I'm no MS fanboy, as previous versions of Hyper-V have been horrible but now they seemed to have cracked it.
The killer features for me are free, out of the box, failover and replication between Hyper-V servers. Basic management is OK but in order to handle the replication and failover functions you need to run the Hyper-V manager from either a Windows 8 PC or Windows Server 2012 desktop.
http://www.microsoft.com/en-us/server-cloud/hyper-v-server/default.aspx
The killer features for me are free, out of the box, failover and replication between Hyper-V servers. Basic management is OK but in order to handle the replication and failover functions you need to run the Hyper-V manager from either a Windows 8 PC or Windows Server 2012 desktop.
http://www.microsoft.com/en-us/server-cloud/hyper-v-server/default.aspx
Ubuntu tweaks and themes from Noobslab
Grab some excellent tweaks, themes and wallpapers (I'm talking about you, Black Wallpapers) from Noobslab - http://www.noobslab.com/
SOLR 4
Think it may soon be time to revisit a SOLR build. Probably will concentrate on SOLR 4 http://lucene.apache.org/solr/features.html with Ubuntu LTS, 12.04 64 bit http://www.ubuntu.com/download/desktop
More on IIS 8 and Windows server 2012
Further to my previous posts, it is also possible to setup app pools and change identities, using the syntax below:
appcmd set config /section:applicationPools /[name='purpleotter'].processModel.identityType:SpecificUser /[name='purpleotter'].processModel.userName: purpleone /[name='purpleotter'].processModel.password: APa55word
Windows Server 2012 and IIS bindings problem
Just starting to deploy some 2012 servers. If you can live with the interface then they can be a lot quicker for some operations. However, when working in IIS we've found some interesting buglets, specifically, when setting up a site with multiple bindings, addition net.pipe or net.tcp will fail.
The solution to this is to set the site bindings from the command line using the appcmd command. Create the site as normal and set an http binding on port 80 or whatever. Then to add additional bindings, open a raised privilege command prompt, navigate to the folder where appcmd is (usually C:\Windows\System32\inetsrv and follow the syntax below:
Restart IIS and all should be fine.
The solution to this is to set the site bindings from the command line using the appcmd command. Create the site as normal and set an http binding on port 80 or whatever. Then to add additional bindings, open a raised privilege command prompt, navigate to the folder where appcmd is (usually C:\Windows\System32\inetsrv and follow the syntax below:
appcmd set site /site.name:MySite /+bindings.[protocol='net.tcp',bindingInformation='40011:*']
appcmd set site /site.name:AService /+bindings [protocol='net.pipe',bindingInformation='AService']
Restart IIS and all should be fine.
Wednesday, 20 February 2013
Monday, 18 February 2013
Speed up Ubuntu 12.xx
Hi thanks to Nixie Pixel for showing some speedup tips on Ubuntu. I've tried these out on both a couple of VM boxes and a physical PC and can say they work well! Here they are:
Show all startup items
Ubuntu hides some startup items by default, by entering this in the terminal you will be able to see all startup items and disable if required, for instance Bluetooth daemon.sudo sed -i "s/NoDisplay=true/NoDisplay=false/g" /etc/xdg/autostart/*.desktop
Preload
In order to speed up applications by loading frequently used libraries, go to the Ubuntu software centre and install the 'Preload' application.Speed up Gedit
A bug in a plugin in Gedit causes poor performance - go to > Edit > Preferences > Plugins and untick the 'File Browser Panel'
Subscribe to:
Posts (Atom)