Feeds:
Posts
Comments

Archive for August 15th, 2007

How to use chmod?

It’s used to change the file access permissions

There are two types of chmod:

  • system letter coding (symbolic)

  • system numeric coding (octal number)

 

Every files and directories in linux have 3 access user.

The user (u), group (g) and owner (o).

When you type $ls -l at the console, you will some informations.

 

drw-r–r– 3 taufanlubis taufanlubis 4096 2007-07-31 16:07 download
d = directory (mean that ‘download’ is directory not file).
3 first characters are for user (u) -> rw- = read (r), write(w) and not executable (x)
3 second characters are for group (g) -> r-x = can be read (r), can not be written (-) and not executable (x)
3 third characters are owner (o) -> r-x = can be read (r), can not be written (-) and not executable (x)

-rwx-w-r– 1 taufanlubis taufanlubis 1020 2007-08-01 10:00 filecoba
1 first character -> – = file (not directory)
3 first characters are for user (u) -> rwx = read (r), write able(w) and executable (x)
3 second characters are for group (g) -> -w- = can’t be read (-), write able (w) and not executable (-)
3 third characters are owner (o) -> r– = can be read (r), can not be written (-) and not executable (-)

lrwxrwxrwx 1 root root 19 2007-07-31 11:15 S20powernowd -> ../init.d/powernowd
1 first character -> l = link
3 first characters are for user (u) -> rwx = read (r), write able(w) and executable (x)
3 second characters are for group (g) -> rwx = read (r), write able(w) and executable (x)
3 third characters are owner (o) -> rwx = read (r), write able(w) and executable (x)

 

How to change the permission with letter coding?

$sudo chmod ug+rx coba -> set user and group to be ‘read able’ (r) and executable (x)

$sudo chmod ug-rx coba -> set user and group to be ‘not read able’ (-) and not executable (-)

 

How to change the permission with system numeric coding?

4 = read
2 = write
1 = executable

$sudo chmod 721 coba

-> 7 (user) / 0 (group) / 0 (owner)

-> 7 = 4+2+1 (read+write+executable) for user

-> 2 = 0+2+0 (not read+write+not executable) for group

-> 1 = 0+0+1 (not read+not write+executable) for owner

 

$sudo chmod 644 coba

-> 6 (user) / 4 (group) / 4 (owner)

-> 6 = 4+2+0 (read+write+not executable) for user

-> 4 = 4+0+0 (read+not write+not executable) for group

-> 4 = 4+0+0 (read+not write+not executable) for owner

 

 

 

 

Read Full Post »

How to install Xampp?

Many people know from their own experience that it’s not easy to install an Apache web server and it gets harder if you want to add MySQL, PHP and Perl.XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use – just download, extract and start.

Just download it from: http://www.apachefriends.org/en/xampp.html

Install xampp using command line:

$sudo tar xvzf xampp-linux-1.6.2.tar.gz -C /opt
$cd /opt/lampp
$sudo ./lampp start

or you can choose which service that you only want to run.

Usage: ./lampp <action>

start Start XAMPP (Apache, MySQL and eventually others)

startapache Start only Apache
startssl Start only SSL support
startmysql Start only MySQL
startftp Start only ProFTPD

stop Stop XAMPP (Apache, MySQL and eventually others)
stopapache Stop only Apache
stopssl Stop only SSL support
stopmysql Stop only MySQL
stopftp Stop only ProFTPD

 

 

reload Reload XAMPP (Apache, MySQL and eventually others)
reloadapache Reload only Apache
reloadmysql Reload only MySQL
reloadftp Reload only ProFTPD
restart Stop and start XAMPP

 

security Check XAMPP’s security
php5 Activate PHP5
php4 Activate PHP4
phpstatus Which version of PHP is active?

 

backup Make backup file of your XAMPP config, log and data files
panel Starts graphical XAMPP control panel

 

To test it, just open your web browser (Firefox) then type: http://localhost

If the installation process is correct then you will see the xampp main page.

Read Full Post »

1. You have to download package dpkg-dev_1.13.24ubuntu6_all.deb (or newer version)
Just type $sudo apt-get install dpkg-dev (in the console screen)

2. Make a folder in /home/your_username, for example repo_ubuntu

3. Copy all files from /var/cache/apt/archives to /home/your_username/repo_ubuntu

$cd /var/cache/apt/archives
$cp -rf * /home/your_username/repo_ubuntu

4. Make index package with dpkg-scanpackages
$cd /home/your_username
$sudo dpkg-scanpackages repo_ubuntu /dev/null | gzip -9c > repo_ubuntu/Packages.gz

(if you are succeed, then the making process is done).

 

How to use this local Repository?

1. Edit your sources.list at /etc/apt/sources.list, but always make a copy first in case you may make a mistake.
$sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
$sudo gedit /etc/apt/sources.list

2. Add your repository (/etc/apt/sources.list) with the below line
deb file:/home/your_username repo_ubuntu/

3. To make new index for your repository, type
$sudo apt-get update

Read Full Post »

How to install Skype in Ubuntu?

Skype need 3 library to run itself. These files are:

– libqt4-core (1.2MB)

– libqt4-gui (4.9MB)

– qt4-qtconfig

 

Just install it with:

$sudo apt-get install libqt4-core

$sudo apt-get install libqt4-gui

$sudo apt-get install qt4-qtconfig

 

Then download the file from www.skype.com

There are 7 files for 7 distros:

  • Feisty Fawn

  • Debian Etch

  • Mepis

  • Xandros

  • Fedora Core 7 / Fedora 7

  • OpenSUSE 10+

  • Mandriva

 

Click Feisty Fawn, to get the file package for Ubuntu then install the package using command:

$sudo dpkg -i skype-1.4.0.74.deb.bin (depend on skype version)

Then fill the user_id and password or sign up for a new account if you don’t have it.

 

 

Read Full Post »

Follow

Get every new post delivered to your Inbox.

Join 75 other followers