Archive for the 'linux' Category

Mengamankan website

30/10/2017

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 *

Sumber:
https://situsali.com/jangan-pernah-menggunakan-permission-777-atau-765-saat-mendevelop-web-php-di-gnulinux/

https://situsali.com/mudah-mengatur-permission-di-bitnami-xampp-di-gnulinux/

Advertisements

How to install VirtualBox on Debian 9 Strech

02/08/2017

https://wiki.debian.org/VirtualBox#Debian_9_.22Stretch.22
https://www.virtualbox.org/wiki/Downloads
https://www.virtualbox.org/wiki/Linux_Downloads

apt-get update
apt-get upgrade -y
apt-get install gcc make linux-headers-4.9.0-3-amd64 linux-headers-amd64 -y
/sbin/vboxconfig
./VirtualBox-5.1.26-117224-Linux_amd64.run

NOTE:
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 http://download.virtualbox.org/virtualbox/debian stretch contrib

Add Oracle VirtualBox public key:

curl -O https://www.virtualbox.org/download/oracle_vbox_2016.asc
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)

23/12/2009

Sumber: http://www.cyberciti.biz

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

23/12/2009

Sumber : http://www.debianadmin.com

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 »