Posted under » MySQL » Apache » Arch on 07 December 2024
Just like AWS linux installing LAMP Arch supports MariaDB instead of MySQL(Oracle) by default.
$ pacman -S apache php php-apache mariadb libmariadbclient mariadb-clients
To start or restart Apache manually,
$ systemctl start httpd.service
To check status
$ systemctl status httpd $ systemctl status mysql
if you face this error : Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
It probably means mysql does not have access to the mysql folder.. so you need to
$ chown mysql:mysql /var/lib/mysql/ -R
In Arch Apache is called httpd which is similar to AWS Linux, CentOS or Redhat so you stop and start the same way.
The location of the apache config is at /etc/httpd/conf/httpd.conf.
Similarly, to install openssh,
$ pacman -S openssh
It is preferable to autoload ssh instead of starting manually like above Apache example with systemctl
$ systemctl enable --now sshd $ systemctl enable sshd #later