Category Archives: Linux Ubuntu

Linux Ubuntu

How To Install Linux, Apache, MySQL, PHP (LAMP)

About LAMP

LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP. Since the virtual private server is already running Ubuntu, the linux part is taken care of. Here is how to install the rest.

Set Up

The steps in this tutorial require the user to have root privileges on your VPS. You can see how to set that up in the Initial Server Setup in steps 3 and 4.

Step 1: Install Apache

Apache is a free open source software which runs over 50% of the world’s web servers.

To install apache, open terminal and type in these commands:

sudo apt-get update
sudo apt-get install apache2

Continue reading

HowTo: Linux Show List Of Network Cards

  1. lspci command : List all PCI devices.
  2. lshw command : List all hardware.
  3. dmidecode command : List all hardware data from BIOS.
  4. ifconfig command : Outdated network config utility.
  5. ip command : Recommended new network config utility.

lspci command

Type the following command:
# lspci | egrep -i --color 'network|ethernet'

lshw command

Continue reading

How To Set Up a Firewall Using Iptables on Ubuntu 14.04

Introduction

Setting up a good firewall is an essential step to take in securing any modern operating system. Most Linux distributions ship with a few different firewall tools that we can use to configure our firewalls. In this guide, we’ll be covering the iptables firewall.

Iptables is a standard firewall included in most Linux distributions by default (a modern variant called nftables will begin to replace it). It is actually a front end to the kernel-level netfilter hooks that can manipulate the Linux network stack. It works by matching each packet that crosses the networking interface against a set of rules to decide what to do.

In the previous guide, we learned how iptables rules work to block unwanted traffic. In this guide, we’ll move on to a practical example to demonstrate how to create a basic rule set for an Ubuntu 14.04 server. The resulting firewall will allow SSH and HTTP traffic.

Note: This tutorial covers IPv4 security. In Linux, IPv6 security is maintained separately from IPv4. For example, “iptables” only maintains firewall rules for IPv4 addresses but it has an IPv6 counterpart called “ip6tables”, which can be used to maintain firewall rules for IPv6 network addresses.

If your VPS is configured for IPv6, please remember to secure both your IPv4 and IPv6 network interfaces with the appropriate tools. For more information about IPv6 tools, refer to this guide: How To Configure Tools to Use IPv6 on a Linux VPS

Continue reading

วิธีแก้ ไข .htaccess ไม่ทำงาน .htaccess Is Not working in Linux(Ubuntu) Apache2

login Server  root

nano /etc/apache2/apache2.conf

 

From:

<Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

TO:

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>
and
<Directory />
 Options Indexes FollowSymLinks MultiViews
 AllowOverride All
 Order allow,deny
 allow from all
</Directory>


ok  save file   

sudo   /etc/init.d/apache2 restart


ok  wokrk

Its working. It’s enabled use of .htaccess files.