If this makes it into production form I'll have to do some saving!
Search
Tuesday, 30 April 2013
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'Monday, 15 October 2012
More misc linux stuff
cool linux apps
lmms
handbrake
audacity
xbmc
hugin
htop - awesome coloured version of top
how to make a bitnami stack executable (bin file)
chmod 755 filename.bin
./filename.bin
check packet flow on linux with
iptstate
this uses the libnetfilter_conntrack part of linux kernel
It analyses all nics
If you can see traffic on a particular port and you want to see if it is coming from your machine check your /etc/services file to see if a known service is listed for it.
If you need more info use netstat:
netstat -nap
(you can pipe this to grep to analyse specific ports)
netstat -nap | grep ":22\s"
Look at devices
/sbin/lspci
or
/sbin/lspci -vv
for more detail
look for usb only
/sbin/lspci | grep -i usb
you can also run
/sbin/lsusb
Kernel modules are in
/lib/modules/
find the loaded ones using
lsmod
To find out what has been plugged or unplugged query the kernel with
dmesg
check disk space
df
Check io
iostat
or
iostat 5 5 (try 5 times with 5 second pause)
check processes
ps (plus switches)
create a folder
mkdir
or create nested folders
mkdir -p top/onedown/twodown
copy files
cp cheese.txt /folder/cheese.txt
send mail from the command line in linux (ubuntu)
sudo apt-get install ssmtp
Then edit the ssmtp configuration file:
sudo gedit /etc/ssmtp/ssmtp.conf
at the very least set the mailhub
Mailhub=foo.bar.thing.com
to enable 'mail' from the command line install the mail utils:
sudo apt-get install mailutils
then from the command line, any command can be piped to mail:
ls | mister@cheese.com
Compile a linux application from source:
Download source files
unpack to a working directory:
tar xzvf nameoffile.tgz
cd to this folder
To compile:
./configure
make
su -c "make install"
Apps to configure Linux iptables with a GUI:
www.fwbuilder.org
www.simonzone.com/software/guarddog
www.shorewall.net
APT commands
apt-get update
apt-get upgrade
apt-get install
apt-get remove
apt-get clean
apt-get autoclean
apt-get autoremove
Labels:
apt commands,
chmod,
iostat,
linux,
lspci
Monday, 17 September 2012
Ubuntu 12.04 and SOLR 3.6 Install + TIKA
Ubuntu 12.04 LTS 64 bit Apache solr Tomcat 6 install with Tika and other JARS
We have chosen this particular Linux variant for it's long term support options for updates etc.
- Install base OS, 64 bit variant
- install tomcat6 + tomcat6-common + tomcat6-admin
sudo apt-get install tomcat6
sudo apt-get install tomcat6-admin
- Modify the admin configuration to allow a new login.
sudo service tomcat6 restart
- Check Tomcat works by visiting: http://localhost:8080
- Prepare the solr environment
- Create a temp folder for the solr binary
mkdir -p ~/tmp/solr/
- Navigate to that folder
cd ~/tmp/solr/
- download the latest Apache Lucene solr binary using WGET (you will need to get the latest URL for the version you wish to install)
wget http://apache.ziply.com/lucene/solr/3.6.0/apache-solr-3.6.0.tgz
- Decompress the binary file
tar xzvf apache-solr-3.6.0.tgz
- Create a folder for the main solr files (this is where the main SOLR config files are, not the expanded webapp)
sudo mkdir -p /var/solr
- Copy the compressed solr webapp into the /var/solr folder
sudo cp apache-solr-3.6.0/dist/apache-solr-3.6.0.war /var/solr/solr.war
- copy the main solr files into /var/solr (you can either copy the default examples SOLR or multicore)
sudo cp -R apache-solr-3.6.0/example/solr/* /var/solr/
- Give the tomcat6 service owner rights to the /var/solr folder
sudo chown -R tomcat6 /var/solr/
- set the SOLR home environment variable (solr needs to know where its config is) and change JAVA memory allocations, set on a per webapp basis
sudo gedit /etc/init.d/tomcat6
JAVA_OPTS="$JAVA_OPTS -Dsolr.home=/var/solr -Xms1g -Xmx4g"
- Restart tomcat6
sudo service tomcat6 restart
- Tell Tomcat catalina where to get everything and the solr webapp is extracted and run from:
/var/lib/tomcat6/webapps/solr/
echo -e '\n ' | sudo tee -a /etc/tomcat6/Catalina/localhost/solr.xml\n
echo 'TOMCAT6_SECURITY=no' | sudo tee -a /etc/default/tomcat6
- As we need to index binary files such as Word and PDF we need to copy extra libraries from your extracted solr binary folders
cd ~/tmp/solr/
sudo cp apache-solr-3.6.1/contrib/extraction/lib/*.jar /var/lib/tomcat6/webapps/solr/WEB-INF/lib/
sudo cp apache-solr-3.6.1/contrib/dataimporthandler/lib/*.jar /var/lib/tomcat6/webapps/solr/WEB-INF/lib/
- Restart the server
sudo reboot
- We now need to 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 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"
- If all goes well you should receive output similar to the following:
<?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"><int name="status">0</int><int name="QTime">124</int></lst> </response>
- Now test to see if you can search the index
- From a remote PC enter the following URL:
http://:8080/solr/admin
- In the query string box enter the following:
id:smoketest
- Press search
- If all works well the id will be discovered in the index and results similar to the following will be displayed:
<response> <lst name="responseHeader"> <int name="status">0</int> <int name="QTime">0</int> <lst name="params"> <str name="indent">on</str> <str name="start">0</str> <str name="q">id:smoketest</str> <str name="version">2.2</str> <str name="rows">10</str> </lst></lst> <result name="response" numFound="1" start="0"> <doc> <arr name="content_type"> <str>application/pdf</str> </arr><str name="id">smoketest</str> </doc> </result> </response>
- the 'numFound' variable 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/solr/conf/schema.xml
Labels:
12.04,
apache,
curl,
extract,
index,
Indexing,
linux,
Lucene,
pdf index,
pdf search,
smoketest,
solr,
solr 3.6,
solr extract,
solr update,
tika,
Tomcat,
ubuntu,
web index
Location:
London, UK
Subscribe to:
Posts (Atom)
