Assalamualaikum Wr.Wb..
dengan diberikan nikmat dan rezeki dari Allah SWT, saya Mr.Gagaltotal666 akan
berbagi kepada anda yaitu tentang cara Install dan Konfigurasi
Lamp Stack di Centos Server Localhost GNU/Linux..
LAMP Stack atau yang biasa dikenal (Linux, Apache, MySQL dan PHP)
sama seperti LEMP, namun perbedaannya ada pada web server
yang digunakan. Jika LEMP menggunakan Nginx, sedangkan
LAMP menggunakan Apache.
oke ikuti langkah berikut
pertama install suatu package epel-release dan package lain nya
$ yum -y install epel-release
install mysql atau mariadb
$ yum -y install mariadb-server mariadb
$ systemctl start mariadb.service
$ systemctl enable mariadb.service
$ mysql_secure_installation
install apache2 yaitu disebut nya kalo di centos httpd
$ yum -y install httpd
$ systemctl start httpd.service
$ systemctl enable httpd.service
kemudian aktifkan firewall untuk port 80 http dan 443 https
di apache nya
$ firewall-cmd --permanent --zone=public --add-service=http
$ firewall-cmd --permanent --zone=public --add-service=https
$ firewall-cmd --reload
kemudian tambahkan repository remi-release
$ rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
$ yum -y install yum-utils
$ yum update
selanjut nya config dan enable kan remi php serta install package php
$ yum-config-manager --enable remi-php73
$ yum -y install php php-opcache
$ systemctl restart httpd.service
test untuk membuat file info php di directory htdoc apache
$ vim /var/www/html/info.php
$ nano /var/www/html/info.php
<?php
phpinfo(); ?>
install tambahan package PHP
$ yum -y install php-mysqlnd php-pdo
$ yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-soap curl curl-devel
$ systemctl restart httpd.service
selanjut nya install PHPMyadmin
$ yum -y install phpMyAdmin
$ nano /etc/httpd/conf.d/phpMyAdmin.conf
$ vim /etc/httpd/conf.d/phpMyAdmin.conf
di bagian isi nya ikuti seperti ini, kalo mau di modif link /phpmyadmin
ganti terserah anda mau menamakan nya apa saja
[...]
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
# <RequireAny>
# Require ip 127.0.0.1
# Require ip ::1
</RequireAny>
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>
buka di browser anda, kemudian masukan IP server
yang tadi di install lamp stack, contoh seperti ini
$ 192.168.34.184
$ 192.168.34.184/info.php
$ 192.168.34.184/phpmyadmin
kalau masih kurang mengerti, lihat video tutorial dibawah ini
oke mungkin itu saja mengenai artikel cara install lamp-stack di centos
kalau ada kesalahan dan kekurangan nya mohon berikan masukan nya ya
sekian dan semoga bermanfaat...
Wasalamualaikum Wr.Wb...
0 Comments