Sunday, June 30, 2013

Youtube Klon Gunakan PhpMotion

Bismillahirahmanirahim, Berjaya juga untuk install youtube klon bagi kegunaan opis aku. Hish susah juga sbb ideanya untuk sediakan satu server bagi simpan semua video tu. Nak simpan kat youtube ada tempat slow sangat. Akhirnya timbul la idea nak wat klon youtube kat dalam intranet opis.

So ini yang aku nak kongsikan bersama

1. Speksifikasi Server

2. Guna Ubuntu 9.04 upgrade to 11.04 sebab server tu dah lama x de apa pn applikasi dalam tu.

3. Install Webmin (web based cpanel percuma - aku suka pakai sebab senang nak install)

cd /tmp
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.610.tar.gz
sudo su
gunzip webmin-1.610.tar.gz
tar xf webmin-1.610.tar
cd webmin-1.610./setup.sh /usr/local/webmin

4. Aku mencari dalam google , akhirnya bertemu dengan phpmotion so aku google lagi nak cari cari yg simple dan mudah untuk install. Oleh itu kredit kepada 2 website ni yang bantu aku cuba

a. http://erwin-heldy.blogspot.com/2011/09/instalasi-phpmotion-di-ubuntu-1104.html

b. http://aacable.wordpress.com/tag/phpmotion-on-ubuntu/

5. Untuk itu dikongsikan langkah2 aku install phpmotion ni.

sudo su
apt-get update
apt-get install apache2 mysql-server php5 ffmpeg flvtool2 mencoder lame libogg0 php5-ffmpeg php5-curl curl libapache2-mod-php5 php5-mysql lynx-cur libapache2-mod-speedycgi
6. Download phpmotion dari website phpmotion http://www.phpmotion.com/content/view/1/180/ kena register dahulu then baru boleh download. Pada masa aku buat ni ada 2 version jadi sesiapa berminat check dulu version php korang dalam server ubuntu kang silap x jalan plak.

Untuk check korang guna

php -v

Atau kalau korang dah register boleh guna command get untuk download
wget http://www.phpmotion.com/registration/download.php?php_version=53

Atau guna webmin untuk upload kat dalam server dan extract terus kedalam /var/www
7. Apabila dah download korang extract

unzip /home/username_kamu/Downloads/phpmotion.zip
cp -R /home/username_kamu/Downloads/phpmotion /var/www
chown -Rf www-data.www-data /var/www/phpmotion
chmod -Rf 744 /var/www/phpmotion
chmod -Rf 755 /var/www/phpmotion/cgi-bin

8. Bagi tujuan korang nak upload file video ,music dan lain-lain kita perlu reconfigure balik file php.ini
Configuration ini akan benarkan Upload saiz file sampai 100MB tetapi awas perlu diingatkan makin besar makin lambat server nak upload dan process kepada format .flv yang akan digunakan oleh phpmotion untuk streaming kat website korang. So keputusan ditangan korang la ye...

nano /etc/php5/apache2/php.ini
atau
vi /etc/php5/apache2/php.ini

atau gunakan webmin cari "/etc/php5/apache2/php.ini" dan edit gunakan configuration dibawah ni.
open_basedir = (no value)
upload_max_filesize = 1000M
post_max_size = 100M
max_execution_time = 1500
session.gc_maxlifetime = 14000
safe_mode = off
enable_dl = On
dan tambahkan selepas itu:
extension=/var/www/phpmotion/phpshield/Linux_x86-32/ixed.5.3.lin

9. Configure virtual host apache untuk membolehkan page phpmotion dipaparkan mengikut setting dan directory cgi yang diperlukan.


nano /etc/apache2/sites-available/default
atau
vi /etc/apache2/sites-available/default

atau gunakan webmin cari "/etc/apache2/sites-available/default" dan edit gunakan configuration dibawah ni.


Bagi yang ada hosting dan url

ServerName media.nama.url.anda
DocumentRoot /var/www/phpmotion

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

ScriptAlias /cgi-bin/ /var/www/phpmotion/cgi-bin/


Bagi yang tiak ada hosting dan url


DocumentRoot /var/www/phpmotion

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

ScriptAlias /cgi-bin/ /var/www/phpmotion/cgi-bin/



Sunday, February 19, 2012

How to make logkeys autostart

Autorun at system start

sudo gedit /etc/init.d/logkeys-start

Paste this in there

#!/bin/bash

sudo logkeys --start --us-keymap

and save it

Run this

sudo su

cd

cd /etc/init.d/

update-rc.d logkeys-start defaults

chmod +x /etc/init.d/logkeys-start

reboot That's it

The log file will be the one that is at

sudo nano /var/log/logkeys.log

Friday, February 17, 2012

Installation Logkeys

1st need to install g++ if you haven't install it.
sudo apt-get install g++    # to install g++ on a Debian-based OS
or
sudo apt-get install build-essential # if previous command fails

Proceed with

$ tar xvzf logkeys-0.1.1a.tar.gz     # to extract the logkeys archive

$ cd logkeys
-0.1.1a/build # move to build directory to build there
$
../configure # invoke configure from parent directory
$ make
# make compiles what it needs to compile
( become superuser now ) # you need root to install in system dir
$ sudo su
$ make install
# installs binaries, manuals and scripts
How to

Create log file by default log file is /var/log/logkeys.log and is not readable by others.

You can set it anyway you like with the command --outputt

But before that you need to create the log file

$ touch /home/"you home directory"/Documents/test.log

Then run the logkeys :

$ logkeys --start -u --output /home/"you home directory"/Documents/test.log

The "-u" use for keymap to US-keymap

to test

$ tail /home/"your directory"/Documents/test.log

How to stop

$ logkeys --kill

Tuesday, February 14, 2012

LKL Linux KeyLogger vs. logkeys

From Ubuntu Forum - by Fabrizio

Business case is: install a key logging utility on Ubuntu 10.04 (Lucid Lynx).

Solution: Trying to address the business case I stumbled upon two different key logging utilities: LKL Linux KeyLogger and logkeys. Based upon my humble experience first one does not matches expectations, while the second one does it in full.

Scope of the article: share the experience with others which might have a similar business case.

Assumption: the lab system has an italian keyboard layout.


FIRST TRY: LKL Linux KeyLogger

http://blog.theunical.com/ubuntu/lin...ger-in-ubuntu/

- How to install?
http://sourceforge.net/projects/lkl/
./confiure
make
sudo make install

- How to use?
sudo lkl -l -k /home/XYZ/Downloads/lkl/keymaps/it_km -o /home/XYZ/loggy.log
(apparently seems ok)

- now it has to start automatically at any reboot
cd /etc/init.d
sudo vi rc.local
add at the bottom "/usr/local/bin/lkl -l -k /home/XYZ/Downloads/lkl/keymaps/it_km -o /home/XYZ/loggy.log &"
(it starts but in the loggy.log file there is only garbage, I tried to remove the two keyboard mapping it_UP e it_ALT, but no way it does not log anything meaningful)


SECOND TRY: logkeys

http://code.google.com/p/logkeys/

- How to install?
gunzip logkeys-0.1.1a.tar.gz
tar xvf logkeys-0.1.1a.tar
cd logkeys-0.1.1a/
cd build/
../configure
('sudo apt-get install build-essential' if previous command fails)
make
sudo make install

- it is important to have the correct map file so download the it.map file from their website

- How to use?
sudo logkeys -s -m /home/XYZ/Downloads/de.map -o /home/XYZ/loggy.log
sudo logkeys -k

- now it has to start automatically at boot time
cd /etc/init.d
sudo vi rc.local
add at the bottom "/usr/local/bin/logkeys -s -m /home/XYZ/Downloads/de.map -o /home/XYZ/loggy.log &"
(it starts and the loggy.log file is human readable, mission accomplished)


CONCLUSION
IMHO logkeys rules! ;o)

Cheers,

Fabrizio

Saturday, February 4, 2012

Upgrade Ubuntu 9.04 to 9.10 then 10.04

You cannot skip versions between upgrades. The version between Jaunty and Lucid is Karmic. I suggest you do backup important data and do a complete reinstall as many things has changed, including the boot loader.

If you do not like a fresh install, you can upgrade using an Alternate CD.

Preparations:

  • Backup the system (if possible a disk image)
  • Backup your personal files (the home directory) so you can easily copy the files
  • Remove all PPA's and non-standard repositories, including their packages
  • Be prepared for failure, have a Live CD available so you can still boot even if the disk is dead

The upgrade using the alternate CD is described below:

  1. Download ubuntu-9.10-alternate-i386.iso from http://releases.ubuntu.com/karmic/ to your home directory (replace i386 with amd64 if you've a 64-bit system and ubuntu with kubuntu for KDE)
  2. Open a terminal and run:

    sudo mount -o loop ~/ubuntu-9.10-alternate-i386.iso /media/cdrom
  3. Start the upgrade by executing:

    gksu "sh /media/cdrom/cdromupgrade"

    If you're using KDE (Kubuntu):

    kdesudo "sh /media/cdrom/cdromupgrade"
  4. Reboot

After this upgrade from 9.04 to 9.10, proceed with the upgrade to 10.04 using:

sudo do-release-upgrade -d

Wednesday, December 28, 2011

How to install webmin on ubuntu using apt-get install webmin

Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.

Install webmin on ubuntu 11.04 (Natty) server


We have already discussed how to install ubuntu 11.04 LAMP server now we will install webmin for easy administartion

Edit /etc/apt/sources.list file

sudo vi /etc/apt/sources.list

Add the following lines

deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Save and exit the file

Now you need to import GPG key

wget http://www.webmin.com/jcameron-key.asc

sudo apt-key add jcameron-key.asc

Update the source list

sudo apt-get update

Install webmin

sudo apt-get install webmin

Now you need to access webmin using http://serverip:10000/ once it opens you should see similar to the following screen



You need to enter root username and password to login.Once you logged in you should see similar to the following screen.

Friday, November 11, 2011

Configure Screenlet In 11.10



Add Desktop Widget/Goodies

To add its appearance and performance you can add some Desktop Goodies/Widget on your desktop. There some desktop application which usually fill Linux Desktop that is Screenlets, Conky, Super Karamba, Cairo-Dock, and Docky. All application that i mention above can improve your desktop appearance besides add functionality.

Install Screenlets in Ubuntu 11.10
Here's following command to install Screenlets on your desktop

sudo add-apt-repository ppa:screenlets/ppa
sudo apt-get update
sudo apt-get install screenlets && sudo apt-get install screenlets-pack-all