Install WebHTB on Ubuntu 10.04

Sunday, December 5, 2010
Assume here your Ubuntu LAMP, PHP5, have been running well.

1. Download webhtb "wget http://www.webhtb.ro/downloads/WebHTB_V2.9.bz2"

2. Extract to directory /var/www/ "sudo tar -jxvf WebHTB_V2.9.bz2 /var/www/"

3. Change directory ownership "sudo chown -R www-data:www-data /var/www/webhtb"

4. Activate SSL module on Apache2 "sudo a2enmod ssl"

5. Generate SSL key for apache2
"sudo apt-get install openssl ssl-cert"
"sudo mkdir -p /etc/apache2/ssl"
"sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem"

6. Create Virtual Host for Webhtb "sudo vim /etc/apache2/sites-available/webhtb"
NameVirtualHost *:443

SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem

ServerAdmin webmaster@localhost
DocumentRoot /var/www/webhtb/

Options FollowSymLinks
AllowOverride All


Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all


ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all


ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

7. Activate Virtual Host WebHTB "sudo a2ensite webhtb"

8. Reload your apache2 "sudo /etc/init.d/apache2 force-reload"

9. Install sysvconfig php5-cli php5-snmp "sudo apt-get install php5-cli php5-snmp"

10. Create startup script for WebHTB "sudo cp -r /var/www/webhtb/docs/webhtb /etc/init.d/"

11. Edit startup script "sudo vim /etc/init.d/webhtb" #search this line dir="/var/www/html/webhtb" and change into dir="/var/www/webhtb"

12. Make it executeable "sudo chmod u+x /etc/init.d/webhtb" "chown -R www-data:www-data /var/www/webhtb"

13. Set your root password "sudo passwd root"

14. Browse from another computer to https://your-server-local-ip/setup/index.php
Insert:
* MySQL admin user: root
* MySQL admin password: yourrootpassword
* MySQL WebHTB user: "leave it blank"
* MySQL WebHTB password: "leave it blank"
* MySQL WebHTB password again: "leave it blank"
* MySQL WebHTB databasename: webhtb
* Default interface: eth1 ---> ## Your LAN interface

Now you can manage your internet bandwidth :
1. Add interface --- add your LAN interface
2. Create some class (This is a must!!)
>Class Name : Squid-DNS
>Bandwidth : 10240 (10Mbps)
>Limit : 10240
>Prio :0
>Que : SFQ (Stochastic Fairness Queeing)
3. Add client
>Choose class Squid-DNS
CLIENT : DNS-request
BANDWITDH : 128
LIMIT :128
SRC IP : DNS Server Local IP / Provider (to add more than one IP click Add new src)
4. Add your next client to your CLIENT Class and there you go!!! Read More...

Install Canon iP1980 on Ubuntu 10.04

Tuesday, November 23, 2010
Back to another tips again today....
Yes... like the title, here's the step :
1. Download the Canon iP1980 driver from here and here
2. And now repackage it using "dpkg -i cnijfilter-common_3.00-1_i386.deb" and yes... it's said that the package needed libcupsys2... and Hey Canon!!!! That package is obsolete and have been changed by libcups2!!!! What a shame for a big company like Canon that didn't have time for updating their driver.
3. But it doesn't meant we giving up right!!! What we need now is just changing the dependency from Canon OLD DRIVER!!! we just have to remove the libcupsys2 and change it to libcups2
4. First of all you will need to extract the .deb to a temporary directory (tmpdir) "dpkg-deb -x cnijfilter-common_3.00-1_i386.deb tmpdir"
5. Then we are going to pull the control file that is located in the tmp/DEBIAN/ folder. This is where you will make your dependency changes "dpkg-deb --control cnijfilter-common_3.00-1_i386.deb"
6. Edit the control file using your favorite text editor "vim tmpdir/DEBIAN/control"
7. Just remove the "libcupsys2" and change it to "libcups2"
8. After edit the control file, now you can repackage it using "dpkg -b tmpdir new-name-of-package.deb"
9. Just do "dpkg -i new-name-of-package.deb"
10. Do the same thing with the cnijfilter-ip1900series_3.00-1_i386.deb.

For you guys who don't want to bother with the "repackaging issue" you guys can download the driver from here and here
Read More...

Install HP Laserjet 1020 on Ubuntu 10.04 Server

Wow.... after a frustrated day, finally i can install HP LaserJet on Ubuntu 10.04 Lucid Lynx.
Straight to the step!!!

1. Download the HPLip from here
2. Execute the file "sh hplip-3.10.9.run" then just choose automatic for the installation way then follow and answer nicely every question and command :).
3. After the re-plug (or if you fail or choose to restart, you could just run "sudo hp-setup -i" again) and choose usb (for me).
4. If the hp-setup asking for the plugin, just choose to download it and it will be downloaded automatically.
5. After the installation is finished, YOU MUST HAVE SWITCH-OFF AND THEN SWITCH-ON AGAIN your printer!!!! This is what i miss and make the headache all the day, after that just try to print a test page from your CUPS.

Hope to save your days guys, have a nice ministry....:) Read More...

Install Magic Mouse on Apple Bootcamp

Tuesday, November 16, 2010
Hello All,

I received my Magic Mouse and it works great under OSX but I couldn't get it working under Windows at all. Searching here and around the web, I've compiled a guide on how I got it working. Hopefully, Apple will release proper drivers in the future but for now, here is what I did:

1. Remove your Magic Mouse from your OS X bluetooth device (i don't know why Windows connected with my OS X)

2. On Windows Turn mouse off...if you have already tried installing, remove the device and then turn the mouse off. To remove it, open Start, type "Devices" and press enter. Select "remove device"...Now let's get started:

1) Update the Bluetooth Driver.
Open Device Manager.
Start > (Right Click Computer) > Properties. Click Device Manager in upper left of this window. Double click (Bluetooth Radios), Right click on "Generic Bluetooth" and select "Properties". Open the Driver tab and then select "Update Driver". Click "Browse my computer for driver software". On the next screen, towards the bottom, click on "Let me pick from a list of device drivers...". Uncheck "Show compatible hardware". Select "Apple" and then "Apple built in bluetooth". Done
(You don't have to do this step if you already installed Bootcamp 3.1)

2)In the notification area of the task bar, right click on Bluetooth icon and select "Add a device". Turn on your mouse. It will show up on screen. Right click on the mouse icon. Select Properties. Select the "Services" tab and check the "Drivers for keyboard, mice, etc". The mouse may disappear from the screen since it's been added.

3) Disable power management for Bluetooth Radio. Open device manager, open Bluetooth Radios and right click on "Apple Bluetooth". Select the "Power Management". Uncheck "Allow the computer to turn off this device to save power".

4) Mouse should be working in Windows 7/Vista now.

For addition if you want some hack for smoother experience on your magic mouse, UneasySilence have managed to hack the driver to make it run on PCs running any version of Windows from XP to 7, you can get it here for 32bit and 64bit
Next time if you want to connect your Magic mouse to your Windows or OS X, just power up your magic mouse and wait for 3 seconds, then just left click 4 times... and viola!! "It's just works!!!" Read More...