Saturday, December 1, 2012

Compiling Qt for visual studio 2012 - windows 8

Download Qt 4.8.4 from here
Download Perl from here
Download JOM from ftp://ftp.qt.nokia.com/jom/jom.zip

1. Install Perl, which we downloaded


2. Extract the Qt src file (zip file) to C:/Qt


3. Qt 4.8.4 has problem compiling the webkit module so we have to replace
C:\Qt\src\3rdparty\webkit\Source\JavaScriptCore\wtf\HashSet.h with this HashSet.h 
4. Extract JOM to C:/Qt/jom

5. Set up the environment variables for Qt

QTDIR=C:\Qt\QMAKESPEC=win32-msvc2012
6. Update PATH variable to  %QTDIR%\bin
add ';' to the end of the path and then append %QTDIR%\bin

7.Open VS2012 Native tools command line and move to C:\Qt

cd C:\Qt
8.Then type 
configure -opensource -platform win32-msvc2012
9. Then type
jom\jom.exe -j n
where n is the number of cores of your CPU.For me its ( jom\jom.exe -j 2 )

Compilation usually takes 5 - 6 hours 

Thursday, January 12, 2012

How to install Lampp/Xampp and how to secure Lampp/Xampp on Unix

INSTALLING LAMPP

1. Download the lampp installation file from http://www.apachefriends.org/en/xampp-linux.html

2. Take terminal and type "sudo su" and enter root password to become root user

3. Extract the file using tar command " tar xvfz {downloaded_file_name} /opt"

    Donot extract the files using any other extractors as it will extract with wrong permissions ! and may lead to not proper working of the server !!

4. After extracting you can Start your server by typing "/opt/lampp/lampp start"

5. To view the default site , fire up your browser and type 127.0.0.1 in the address bar .. You should see the default xampp page here :) 

CHANGE OWNERSHIP TO YOUR ACCOUNT

1. As a root user go to "/opt/lampp" folder using the cd command 

2. Then change the ownership of the htdocs folder by typing this command 
 "chown -R username:username htdocs"

3. Then from here move to /opt/lampp/etc folder to associate your username with the apache server .Find the file called httpd.conf and open it with nano or gedit and find the line  "User nobody" and change it to "user {username}"

4. Now restart lampp to see the effect :)  you can restart lampp by typing this in 
"/opt/lampp/lampp restart"

To view the status if the server type "/opt/lampp/lampp status"
To stop the server type "/opt/lampp/lampp stop" and "/opt/lampp/lampp start" to start the server again 

5. Also go to "/opt/lampp/phpmyadmin"   and type "chown username:username config.inc.php"  to change the ownership of the config files and make it readable .

ENABLING BASIC LAMPP SECURITY FEATURES

1. In the terminal type "/opt/lampp/lampp security"  and give the password for everything and secure it .

RUNNING LAMMP AT STARTUP 


1. Move to "/etc/init.d/" folder and type this commad "sudo vi lampp" and add these lines
 "#!/bin/bash
/opt/lampp/lampp start"
save the file 

2. In the terminal type "sudo chmod +x /etc/init.d/lampp"  to give execute permission for that script .

3. Use update-rc.d to install init scripts to all runlevel by typing 
"sudo update-rc.d lampp defaults"