Feeds:
Posts
Comments

Archive for August, 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 »

Linux Terminal

What I like when I work with linux is the console. Instead using mouse to run Evolution to check my email, I just use:

Alt-F2

type “evolution

then press “enter” button.

 

You can do to another program, such as:

type “xmms” for music

type “xterm2” for terminal

type “konsole” for terminal (Not automatically installed in Ubuntu Feisty, you have to download it with command: $sudo apt-get install konsole).

type “konqueror” for File Manager (Not automatically installed also in Ubuntu Feisty, you have to download it).

etc….etc….

to close, just type “exit” and press “enter” in the terminal.

 

Read Full Post »

Ubuntu Repository

When the first time I used Ubuntu, I always thought why Ubuntu has Repository.

Then finally, I realized what a good thinking to provide a function like this in an Operating System.

I think, the most advantages are

  • save your time when you re-install your OS.

  • you can make an update all your clients in a LAN by pointing their’s repository to a server.

 

In Ubuntu, the repository file is located at:

/etc/apt/sources.list

You can modify it with gedit or vim, such as:

$sudo gedit /etc/apt/sources.list

 

Before you make any changes a configuration file in Linux, always make as a habit to back up the configuration. Just do as below:

$cd /etc/apt

$sudo mv sources.list sources.list.bak

 

or you can do like this:

$sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

 

Usually, I disable the repository source that I don’t need for the moment with character ‘#’. It’s very easy, just put the ‘#’ in front of ‘deb’. I suggest do not delete it because may be you need next time.

 

For Samples:

# ================================================================

# Repository from Main Server

deb http://archive.ubuntu.com/ubuntu/ feisty main universe restricted multiverse

 

# ================================================================

# Repository for Compiz Fussion

# deb http://download.tuxfamily.org/3v1deb feisty eyecandy

# deb-src http://download.tuxfamily.org/3v1deb feisty eyecandy

# ================================================================

# CANONICAL COMMERCIAL REPOSITORY (Hosted on Canonical servers, not Ubuntu

# servers. RealPlayer10, Opera, DesktopSecure and more to come.)

# deb http://archive.canonical.com/ubuntu feisty-commercial main

# ================================================================

# E17 repository “edevelop.org”

# deb http://edevelop.org/pkg-e/ubuntu edgy e17

# deb-src http://edevelop.org/pkg-e/ubuntu edgy e17

 

This is what I’m talking about. You can update your Ubuntu via local network. It mean, you

can do it also with 2 computers. Just point to folder and IP address of the repository source.

# ================================================================

# Repository via local Network

# deb http://192.168.0.6/ubuntu7.04/ feisty main restricted universe multiverse

 

If your friend create a local repository in his laptop and you want to update via Ethernet cable,

you can do like this:

deb http://your_friend_ipaddress/your_friend_repository_folder/

for example:

deb http://192.168.1.5/repo_ubuntu/

 

 

Read Full Post »

Newbee in linux…. don’t worry. Take your time. Try any linux distros that you can find, play with it….. until you choose which one is the best for you.

Read Full Post »

« Newer Posts

Follow

Get every new post delivered to your Inbox.

Join 70 other followers