Archive for the 'linux' Category

Mengamankan website


Bagi para web developer sebaiknya jangan menggunakan Permission 777 atau 765 Saat Mendevelop Web PHP di GNU/Linux untuk kemaman website.

sebaiknya gunakan 755 untuk Directory (Folder) dan 644 untuk File.

lihat userid yang aktif (user dan grup mana yang mengeksekusi apache) tuliskan script php berikut, simpan di root folder dengan nama (id.php):

php system("id");

kemudian eksekusi di http://namadomain/id.php akan muncul user id dan grup yang mengeksekusi apache, user ini nanti yang akan di set untuk permission folder dan file. Eksekusi perintah berikut:

untuk pengguna LAMPP, dengan asumsi root directory = /var/www/html dan user group = www-data

cd /var/www/html
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;
chown www-data:www-data -R *

untuk pengguna XAMPP, dengan asumsi root directory = /opt/lampp/htdocs dan user group = daemon

cd /opt/lampp/htdocs
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;
chown daemon:daemon -R *



How to install VirtualBox on Debian 9 Strech


apt-get update
apt-get upgrade -y
apt-get install gcc make linux-headers-4.9.0-3-amd64 linux-headers-amd64 -y

Installation of non-free edition

Debian 9 “Stretch”

Packages for VirtualBox are not available in Debian 9. To install VirtualBox you must use the upstream third-party repository.

Add virtualbox.list to /etc/apt/sources.list.d

deb stretch contrib

Add Oracle VirtualBox public key:

curl -O
sudo apt-key add oracle_vbox_2016.asc

Install virtualbox-5.1

sudo apt-get update
sudo apt-get install virtualbox-5.1

Complete instructions on the VirtualBox Wiki

How to instal Tarball files (*.tar.gz)



Q. I’m new to Linux. Over few days I found lots software distributed as .tar.gz file. How do I install tar.gz files under Linux?

A. tar.gz also known as tarball, an archive format for electronic data and software. Most Linux tarball contains a source code for software. If you are new to Linux I recommend using apt-get, rpm and yum command to install all binary packages.

Tarballs are a group of files in one file. Tarball files have the extension .tar.gz, .tgz or .tar.bz2. Most open source software use tarballs to distribute programs/source codes.

# 1: Uncompress tarball

To uncompress them, execute the following command(s) depending on the extension:
$ tar zxf file.tar.gz
$ tar zxf file.tgz
$ tar jxf file.tar.bz2
$ tar jxf file.tbz2

Now change directory
$ ls
$ cd path-to-software/
Read the rest of this entry »

Install .rpm Files in Debian and Ubuntu


Sumber :

Some time you might find some applications are having only .rpm files but you want a .deb package for your debian,Ubuntu and other debian derived ditributions.If you can’t find .deb debian package in any of the debian,ubuntu repositories or elsewhere, you can use the alien package converter to install the .rpm file.

Alien is a program that converts between the rpm, dpkg, stampede slp, and slackware tgz file formats. If you want to use a package from another distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it.

Despite the large version number, alien is still (and will probably always be) rather experimental software. It has been used by many people for many years, but there are still many bugs and limitations.

Alien should not be used to replace important system packages, like sysvinit, shared libraries, or other things that are essential for the functioning of your system. Many of these packages are set up differently by Debian and Red Hat, and packages from the different distributions cannot be used interchangably. In general, if you can’t uninstall the package without breaking your system, don’t try to replace it with an alien version. Read the rest of this entry »