How to install LAMP Server on Arch Linux

Arch Linux Tutorial - Hello Arch Linux users, today we will guide you how to install LAMP Server on Arch Linux. On this tutorial, we use Arch Linux 2017, Linux Kernel 4.12. But, this tutorial should works on any Arch version. LAMP Server stands for Linux, Apache, MySQL/MariaDB and PHP. These are great packages to create a powerful web application server.

Prerequisites

  • Internet connection
  • root access

Steps to install LAMP Server on Arch Linux

Step 1. Update Arch

This is important to keep our system up to date. Use the following command to update Arch Linux

sudo pacman -Syu

Step 2. Install Apache web server

Apache is a lightweight and powerful web server used by millions of internet users. You can install it using this single command.

sudo pacman -S apache

Output

[dhani@archServer /]$ sudo pacman -S apache
[sudo] password for dhani: 
resolving dependencies...
looking for conflicting packages...

Packages (3) apr-1.6.2-1  apr-util-1.6.0-1  apache-2.4.27-1

Total Download Size:   1.82 MiB
Total Installed Size:  7.34 MiB

:: Proceed with installation? [Y/n] 

Now start and enable httpd

sudo systemctl start httpd
sudo systemctl status httpd

Now open web browser and type the IP address of the Arch Linux to see if the web server is running well. You should see something like this.

apache arch linux

Step 3. Install MariaDB

Now its time to install MariaDB server on Arch. Use the following command to install MySQL Server (MariaDB) on Arch Linux.

sudo pacman -S mysql

Configure MariaDB

First, we need to initialize the database.

sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Secure MySQL installation

mysql_secure_installation

Follow on screen wizard by answering some question such as changing the root password etc.

Start and enable MySQL

sudo systemctl start mariadb
sudo systemctl enable mariadb

Step 4. Install PHP

Now install PHP and some modules with this command

sudo pacman -Sy php php-apache php-gd php-mcrypt

Output sample

install php on arch[5]

Edit php configuration

sudo nano /etc/httpd/conf/httpd.conf

Add the following lines to the conf file

LoadModule php7_module modules/libphp7.so
AddHandler php7-script php
Include conf/extra/php7_module.conf

Now comment line below

#LoadModule mpm_event_module modules/mod_mpm_event.so

And uncomment line below

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

Now restart apache

sudo systemctl restart httpd

At this point, our LAMP Server is ready. Thanks for reading this how to install LAMP Server on Arch Linux. See you in another tutorial.

How to install MariaDB on Arch Linux

Arch Linux Tutorial - This tutorial is going to show you how to install MariaDB on Arch Linux. As you know, MariaDB is a free and open source relational database server which provides a high performance and reliability of a database system on top of Linux OS. Arch Linux is a great operating system for Desktop. But, it doesn’t mean that Arch Linux is not good for server.

install mariadb on arch linux

On this Arch Linux tutorial, I am using the latest Arch Linux 2017 series, powered by Linux Kernel 4.12.4. MariaDB works great on this version. When this post is written, MariaDB 10.1 is available in Pacman repository. To install MariaDB on Arch Linux, please follow these steps

Step 1. Update Arch Linux

It is important to update our system to make sure we are running the latest packages.

sudo pacman -Syu

Step 2. Install MariaDB

Use this command to install MariaDB on Arch Linux

sudo pacman -S mariadb

The command will download and install MariaDB. After that, do not start mariadb service. We need to do some configuration first. Execute this command to complete the installation process.

mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Now start mariadb service

sudo systemctl start mariadb

Secure MariaDB installation

sudo mysql_secure_installation

Follow on screen wizard to complete the process. And now we have a working MariaDB on Arch Linux 2017. Thanks for reading this post.

Configure Static IP Address on Arch Linux via command line

Arch Linux Tutorial - Hello everyone, today I am going to show you how to configure static IP address on Arch Linux 2017 via command line. I assume you have direct access to Arch Linux and a basic understanding of Linux commands. This tutorial will cover only for ethernetc connection. Next time I will show you how to configure WiFi connection on Arch Linux.

arch

Arch Linux comes with built in network configuration samples located in /etc/netctl/examples. We will use this sample and modify a little bit for our system.

ls /etc/netctl/examples

Output:

root@archiso ~ # ls /etc/netctl/examples
bonding          ethernet-static  openvswitch  vlan-dhcp      wireless-wpa
bridge           macvlan-dhcp     pppoe        vlan-static    wireless-wpa-config
ethernet-custom  macvlan-static   tunnel       wireless-open  wireless-wpa-configsection
ethernet-dhcp    mobile_ppp       tuntap       wireless-wep   wireless-wpa-static

As you can see, we have ethernet-dhcp and ethernet-static that can be used to configure our ethernet connection. Now we need to find our network card name.

ip link

Output

root@archiso ~ # ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 36:3a:d8:6a:4b:8a brd ff:ff:ff:ff:ff:ff

As you can see from the output above, my network card is ens18. Replace ens18 with your network card name. Now copy the configuration sample.

cp /etc/netctl/examples/ethernet-static /etc/netctl/ens18

Now we need to edit the new config file we just created

nano /etc/netctl/ens18

Original Output:

Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.1.23/24' '192.168.1.87/24')
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='192.168.1.1'
DNS=('192.168.1.1')

## For IPv6 autoconfiguration
#IP6=stateless

## For IPv6 static address configuration
#IP6=static
#Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
#Routes6=('abcd::1234')
#Gateway6='1234:0:123::abcd'

After made some changes, here is my configuration file looks like (I deleted some unused lines)

Description='A basic static ethernet connection'
Interface=ens18
Connection=ethernet
IP=static
Address=('10.34.0.102/24')
Gateway='10.34.0.1'
DNS=('10.34.0.10')

Do not forget to replace eth0 with your network card name (ens18 in my case).

Now enable the network card upon boot

netctl enable ens18

Stop network and then start the network profile

ip link set ens18 down
netctl start ens18

Stop and disable dhcpcd service

systemctl stop dhcpcd
systemctl disable dhcpcd


Stremio 3.6.5 is now available, install it on Arch Linux

Stremio 3.6.5 is available on Arch Linux repository (AUR). As you might know, Stremio is a free application to watch/stream online movies, TV series, YouTube channel from various sources. Stremio comes with a nice user interface, easy to use and its very stable. Here, I will guide you to install Stremio on Arch Linux and can be used on other Arch based Linux as well.



Stremio Features:
  • Simple and nice user interface
  • Supports various movie sources
  • Supports YouTube channel and some other TV channels
  • Supports Add ons like Spotify, Popcorn Time and many more
  • Movies grouped into categories based on genres
How to install Stremio 3.6.5 on Arch Linux
Open Add/Remove Software and type stremio. Make sure you have enabled AUR repository on Arch. Then, type stremio on the search box and you should see stremio-bin inside AUR tab.

Mark stremio-bin for installation and press Apply. Follow the installation wizard until it completed. Enjoy Stremio on Arch Linux.

Screenfetch, display system information on Terminal with a nice looking

Welcome to another Arch Linux tips and tutorial. Today I want to show you how to display system information in Terminal console in a nice looking way, with ASCII art. Screenfetch is a Terminal application that can display many information about the current system. You may have seen this kind of Terminal application on other websites or forum and now, you can do it yourself on your Arch Linux. 

Steps to install Screenfetch on Arch Linux
Open Terminal and type the following command to install screenfetch on Arch Linux and derivatives such as Manjaro, Antergos etc.
sudo pacman -S screenfetch
To use it, simply run this command
screenfetch
Done.

Enable SSH on Arch Linux

21 January 2017-A quick tutorial to enable SSH Server on Arch Linux. In case you want to connect to remote computer via SSH, you will need to install OpenSSH first. To quickly install OpenSSH on Arch Linux, use the following command
sudo pacman -S openssh

[root@arch-pc ~]# pacman -S openssh   resolving dependencies...looking for conflicting packages...
Packages (3) dnssec-anchors-20150403-1  ldns-1.7.0-2  openssh-7.4p1-2
Total Download Size:   1.13 MiBTotal Installed Size:  6.43 MiB
:: Proceed with installation? [Y/n] y


Done. Now check if ssh running on Arch Linux. Make sure the status is active
systemctl status ssh
root@openmediavault:~# systemctl status ssh��� ssh.service - OpenBSD Secure Shell server   Loaded: loaded (/lib/systemd/system/ssh.service; enabled)   Active: active (running) since Fri 2017-01-20 14:13:00 WIB; 1 day 23h ago Main PID: 611 (sshd)   CGroup: /system.slice/ssh.service           ������  611 /usr/sbin/sshd -D           ������13307 sshd: root@pts/0           ������13606 -bash           ������13946 systemctl status ssh
Jan 22 11:56:40 openmediavault sshd[11381]: Did not receive identification string from 10.34.0.221Jan 22 12:11:58 openmediavault sshd[11612]: Did not receive identification string from 10.34.0.221Jan 22 12:27:18 openmediavault sshd[11831]: Did not receive identification string from 10.34.0.221Jan 22 12:42:46 openmediavault sshd[12065]: Did not receive identification string from 10.34.0.221Jan 22 12:58:05 openmediavault sshd[12258]: Did not receive identification string from 10.34.0.221Jan 22 13:13:30 openmediavault sshd[12499]: Did not receive identification string from 10.34.0.221Jan 22 13:28:55 openmediavault sshd[12690]: Did not receive identification string from 10.34.0.221Jan 22 13:44:15 openmediavault sshd[13555]: Did not receive identification string from 10.34.0.221Jan 22 13:44:29 openmediavault sshd[13307]: Accepted password for root from 10.34.0.235 port 4...sh2Jan 22 13:44:29 openmediavault sshd[13307]: pam_unix(sshd:session): session opened for user ro...=0)Hint: Some lines were ellipsized, use -l to show in full.
Run SSH
systemctl start ssh
Stop
systemctl stop ssh
Enable ssh during boot
systemctl enable ssh

How to install MariaDb Server on Arch Linux

Turn your Arch Linux into a rock solid database server with MariaDb, an open source version of MySQL Server. This quick tutorial is going to show you how to install and configure MariaDb Server on Arch Linux. This tutorial mostly use the Terminal command line.

Mariadb on Arch

Steps to install MariaDb Server on Arch Linux

Open Terminal and simply execute the following command

sudo pacman -S mariadb

Provide the root password to complete. Once finished, you will see something like this on the Terminal window.

arch linux mariadb

Initialize the MariaDB data directory.

sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Start MariaDB server

sudo systemctl start mariadb

Secure Mariadb

mysql_secure_installation

mariadb on arch linux

Done. Now check if MariaDb is running

install mariadb on arch linux

Arch Linux GNOME crashes after installing Google Chrome

My Arch Linux with GNOME Desktop was running very well on my Virtualbox machine. Until I installed Google Chrome 55.0 on top of it. The Google Chrome installation itself run without problems and I also write a post about it. But, every time I run Google Chrome, the Arch Linux crashes and the main Virtualbox window also gone. No error message displayed, its just gone and I need to re open it from the start. Even after I restarted the host machine, this issue persist.

arch linux error

System details:

  • Arch Linux with Kernel 4.8.12-2
  • GNOME Shell 3.22.2
  • Virtualbox 5.1.12 on Windows 10 64 host.
  • Hardware virtualisation enabled on the host.
  • 5 GB RAM allocated for the vm
  • 3D display enabled with 128 MB allocated

So, I guest there is a problem with the system when Google Chrome is running.

Install Pamac GUI software manager on Arch Linux

Pamac is a GTK3 front end for libalpm, a graphical interface to install, remove software on Arch based Linux. This tutorial is going to show you how to install Pamac GUI on Arch Linux. I prefer to call it as a graphical Software Manager for Arch Linux. If you are installing Arch Linux from scratch, this program will not installed by default. But don't worry, installing Pamac is very easy.

pamac

Steps to install Pamac GUI on Arch Linux

Step 1. Install yaourt on Arch

Please refers to my previous tutorial to install and enable yaourt on Arch Linux.

Step 2. Install Pamac

Use the following command to install Pamac

sudo pacman -S pamac-aur

install pamac gui on arch

Thank you.

How to install Yaourt on Arch Linux

Yaourt is a command line interface program which complete pacman for installing additional software in Arch Linux. If you install Arch Linux from scratch, Yaourt won't be installed by default. We need to install it manually. Here I will show you how to install yaourt on Arch Linux.

install yaourt on arch

Steps to install yaourt on Arch Linux

I use the following steps to install yaourt on my Arch Linux

git clone https://aur.archlinux.org/package-query.git
cd package-query
makepkg -si
cd ..
git clone https://aur.archlinux.org/yaourt.git
cd yaourt
makepkg -si

The command above has been proved to be working on my Arch Linux 2016, Kernel 4.8.12-2. For more information about yaourt commands, please visit the official page of yaourt.

Install Google Chrome 55.0 on Arch Linux

Google releases the new Chrome browser version 55.0 a while ago. Now I want to install this new version of Google Chrome 55.0 on my Arch Linux. Like any other applications, installing Google Chrome on Arch Linux is very easy. Since its available on AUR repository, we need to enable AUR repository on Arch Linux first prior to the installation that will be discussed below.

install google chrome arch linux

Steps to install Google Chrome on Arch Linux

Step 1. Enable AUR Repository.

Please refers to my previous tutorial to enable AUR repository on Arch Linux.

Step 2. Install Google Chrome

Open Pamac Software Manager and type chrome as follow.

google chrome on arch linux

Mark google-chrome package for installation. Press apply to install it.

If you prefer using Terminal, the following command is used to install Google Chrome

yaourt -S google-chrome

Done.

Kategori

Kategori