Panduan Cara Install LAMP di CentOS 7

<p><strong>Cara Install LAMP di CentOS 7 &&num;8211&semi; <&sol;strong>LAMP merupakan akronim dari <strong>Linux&comma; Apache&comma; MariaDB&comma; PHP<&sol;strong> adalah sebuah bundel untuk kebutuhan aplikasi web&comma; Apache akan digunakan sebagai server web&comma; MariaDB akan digunakan sebagai server database&comma; PHP akan digunakan sebagai engine&comma; dan berjalan pada sistem operasi GNU&sol;Linux&period; Pada tutorial kali ini saya akan membahas tentang bagaimana cara install LAMP di centos 7&period; <strong>Baca juga&colon; <a href&equals;"https&colon;&sol;&sol;www&period;tutorialpedia&period;net&sol;cara-setting-vps-linux-untuk-web-hosting&sol;">Cara Setting VPS Linux Untuk Web Hosting<&sol;a><&sol;strong><&sol;p>&NewLine;<p>Tutorial ini akan saya jelaskan secara singkat&comma; jadi pastikan anda minimal paham tentang alur dari linux khususnya centos 7&period; Jadi&comma; saya tidak perlu menjelaskan basic-basic dari linux&comma; yang mana itu akan membuat tulisan ini semakin panjang&period;<&sol;p>&NewLine;&NewLine;<div class&equals;"wpcd-coupon wpcd-coupon-default wpcd-coupon-id-6404" >&NewLine; <div class&equals;"wpcd-col-1-8">&NewLine; <div class&equals;"wpcd-coupon-discount-text">&NewLine;&Tab;&Tab;&Tab;Free &dollar;100 <&sol;div>&NewLine;&Tab;&Tab; <div class&equals;"coupon-type">&NewLine;&Tab;&Tab;&Tab;&Tab;Coupon <&sol;div>&NewLine;&Tab;&Tab; <&sol;div>&NewLine; <div class&equals;"wpcd-coupon-content wpcd-col-7-8">&NewLine; <div class&equals;"wpcd-coupon-header">&NewLine; <div class&equals;"wpcd-col-3-4">&NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;<h1 class&equals;"wpcd-coupon-title">&NewLine;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;&Tab;<a href&equals;"https&colon;&sol;&sol;www&period;tutorialpedia&period;net&sol;go&sol;digitalocean" target&equals;"&lowbar;blank" rel&equals;"nofollow">Free &dollar;100 Digital Ocean<&sol;a>&NewLine; &Tab;&Tab;<&sol;h1>&NewLine;&Tab;&Tab;&Tab;&Tab;&Tab; <&sol;div>&NewLine; <div class&equals;"wpcd-col-1-4">&NewLine;&Tab;&Tab;&Tab;&Tab; <div class&equals;"wpcd-coupon-code">&NewLine; <a rel&equals;"nofollow" href&equals;"https&colon;&sol;&sol;www&period;tutorialpedia&period;net&sol;go&sol;digitalocean"&NewLine; class&equals;"wpcd-btn-6404 masterTooltip wpcd-btn wpcd-coupon-button"&NewLine; target&equals;"&lowbar;blank"&NewLine; title&equals;""&NewLine; data-clipboard-text&equals;"CLICK TO OPEN">&NewLine; <span class&equals;"wpcd&lowbar;coupon&lowbar;icon">&NewLine; &Tab;<img class&equals;"" src&equals;"https&colon;&sol;&sol;www&period;tutorialpedia&period;net&sol;wp-content&sol;plugins&sol;wp-coupons-and-deals&sol;assets&sol;img&sol;coupon-code-24&period;png" style&equals;"width&colon; 100&percnt;&semi;height&colon; 100&percnt;&semi;" >&NewLine; <&sol;span>&NewLine;&NewLine; CLICK TO OPEN <&sol;a>&NewLine; <&sol;div>&NewLine;&NewLine;&Tab;&Tab;&Tab;&Tab;&Tab; <&sol;div>&NewLine;&NewLine; <&sol;div>&NewLine; <div class&equals;"wpcd-extra-content">&NewLine; <div class&equals;"wpcd-col-3-4">&NewLine; <div class&equals;"wpcd-coupon-description">&NewLine; <span class&equals;"wpcd-full-description"><p>Daftar gunakan link berikut ini&comma; untuk mendapatkan free &dollar;100 Selama 60 hari selama Hacktoberfest&excl; Anda juga akan mendapatkan &dollar;10 tambahan ketika sudah melakukan topup min &dollar;10 dan membelanjakan &dollar;10&period;<&sol;p><&sol;span>&NewLine; <span class&equals;"wpcd-short-description"><&sol;span>&NewLine; <&sol;div>&NewLine; <&sol;div>&NewLine; <div class&equals;"wpcd-col-1-4">&NewLine;&Tab;&Tab;&Tab;&Tab; <&sol;div>&NewLine; <&sol;div>&NewLine; <&sol;div>&NewLine; <script type&equals;"text&sol;javascript">&NewLine;&Tab;&Tab;window&period;addEventListener&lpar;'DOMContentLoaded'&comma; function&lpar;&rpar; &lbrace;&NewLine;&Tab;&Tab;&Tab;var clip &equals; new ClipboardJS&lpar;'&period;wpcd-btn-6404'&rpar;&semi;&NewLine;&Tab;&Tab;&rcub;&rpar;&semi;&NewLine;&NewLine; <&sol;script>&NewLine; <div class&equals;"clearfix"><&sol;div>&NewLine; <&sol;div>&NewLine;&NewLine;&NewLine;<p>Berikut panduan cara install LAMP di CentOS 7&period;<&sol;p>&NewLine;<h2><strong>Panduan Cara Install LAMP di CentOS 7<&sol;strong><&sol;h2>&NewLine;<h3><strong>Install Apache<&sol;strong><&sol;h3>&NewLine;<p>1&period; Untuk installasi apache di centos 7 gunakan perintah dibawah ini&colon;<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true ">yum install httpd -y<&sol;pre>&NewLine;<p>2&period; Menjalankan service apache<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true ">systemctl start httpd<&sol;pre>&NewLine;<p>3&period; Agar apache otomatis berjalan ketika server mengalami <em>reboot<&sol;em><&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true ">systemctl enable httpd<&sol;pre>&NewLine;<p>4&period; Anda bisa mengecek status apache berjalan atau tidak menggunakan perintah berikut<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true ">systemctl status httpd<&sol;pre>&NewLine;<p>5&period; Lalu coba akses alamat ip server anda di browser untuk memastikan apakah apache tersebut sudah berjalan&period;<&sol;p>&NewLine;<h3><strong>Install MariaDB<&sol;strong><&sol;h3>&NewLine;<p>MariaDB Merupakan fork dari Mysql dan sekarang digunakan sebagai pengganti Mysql pada sebagian besar distribusi GNU&sol;Linux&comma; MariaDB 100&percnt; compatible dengan Mysql jadi anda tidak perlu khawatir jika anda sebelumnya menggunakan Mysql&comma; dipastikan tidak akan ada masalah saat anda migrasi ke MariaDB<&sol;p>&NewLine;<p>1&period; Install MariaDB<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true ">yum install mariadb mariadb-server<&sol;pre>&NewLine;<p>2&period; Jalankan service maria DB<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true ">systemctl start mariadb<&sol;pre>&NewLine;<p>3&period; selanjutnya anda diharuskan untuk mengkonfigurasi MariaDB&comma; dengan mengeset kata sandi&comma; membatasi akses&comma; dan menghapus pengguna dan database yang tidak digunakan&comma; gunakan perintah berikut<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true ">mysql&lowbar;secure&lowbar;installation<&sol;pre>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true " title&equals;"Log">NOTE&colon; RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL &NewLine;SERVERS IN PRODUCTION USE&excl; PLEASE READ EACH STEP CAREFULLY&excl; &NewLine;In order to log into MySQL to secure it&comma; we'll need the current &NewLine;password for the root user&period; If you've just installed MySQL&comma; and &NewLine;you haven't set the root password yet&comma; the password will be blank&comma; &NewLine;so you should just press enter here&period; &NewLine;Enter current password for root &lpar;enter for none&rpar;&colon; &num;&num; Press Enter &num;&num; &NewLine;OK&comma; successfully used password&comma; moving on&period;&period;&period; &NewLine;Setting the root password ensures that nobody can log into the MySQL &NewLine;root user without the proper authorisation&period; &NewLine;Set root password&quest; &lbrack;Y&sol;n&rsqb; Y &num;&num; Press Enter &num;&num; &NewLine;New password&colon; &num;&num; Enter new password &num;&num; &NewLine;Re-enter new password&colon; &num;&num; Re-enter new password &num;&num; &NewLine;Password updated successfully&excl; &NewLine;Reloading privilege tables&period;&period; &NewLine;&period;&period;&period; Success&excl; &NewLine;By default&comma; a MySQL installation has an anonymous user&comma; allowing anyone &NewLine;to log into MySQL without having to have a user account created for &NewLine;them&period; This is intended only for testing&comma; and to make the installation &NewLine;go a bit smoother&period; You should remove them before moving into a &NewLine;production environment&period; &NewLine;Remove anonymous users&quest; &lbrack;Y&sol;n&rsqb; Y &num;&num; Press Enter &num;&num; &NewLine; &period;&period;&period; Success&excl; &NewLine;Normally&comma; root should only be allowed to connect from 'localhost'&period; This &NewLine;ensures that someone cannot guess at the root password from the network&period; &NewLine;Disallow root login remotely&quest; &lbrack;Y&sol;n&rsqb; &num;&num; Press Enter &num;&num; &NewLine;&period;&period;&period; Success&excl; &NewLine;By default&comma; MySQL comes with a database named 'test' that anyone can &NewLine;access&period; This is also intended only for testing&comma; and should be removed &NewLine;before moving into a production environment&period; &NewLine;Remove test database and access to it&quest; &lbrack;Y&sol;n&rsqb; &num;&num; Press Enter &num;&num; &NewLine; - Dropping test database&period;&period;&period; &NewLine;&period;&period;&period; Success&excl; &NewLine;- Removing privileges on test database&period;&period;&period; &NewLine;&period;&period;&period; Success&excl; &NewLine;Reloading the privilege tables will ensure that all changes made so far &NewLine;will take effect immediately&period; &NewLine;Reload privilege tables now&quest; &lbrack;Y&sol;n&rsqb; &num;&num; Press Enter &num;&num; &NewLine; &period;&period;&period; Success&excl; &NewLine;Cleaning up&period;&period;&period; &NewLine;All done&excl; If you've completed all of the above steps&comma; your MySQL &NewLine;installation should now be secure&period; &NewLine;Thanks for using MySQL&excl;<&sol;pre>&NewLine;<p>4&period; Agar mariaDB otomatis berjalan ketika server mengalami <em>reboot<&sol;em><&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true ">systemctl enable mariadb<&sol;pre>&NewLine;<h2><strong>Install PHP<&sol;strong><&sol;h2>&NewLine;<p>versi PHP yang terdapat pada repositori CentOS 7 merupakan PHP Versi 5&period;4 yang sudah usang dan sudah tidak ada dukungan dari upstream&comma; dan saat ini sudah banyak yang beralih ke php versi 7&period; Untuk itu kita perlu menambahkan repository php 7 di centos&period;<&sol;p>&NewLine;<p>1&period; Menambah repository PHP 7 dari repository pihak ketiga<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true">rpm -Uvh https&colon;&sol;&sol;dl&period;fedoraproject&period;org&sol;pub&sol;epel&sol;epel-release-latest-7&period;noarch&period;rpm &NewLine;rpm -Uvh https&colon;&sol;&sol;mirror&period;webtatic&period;com&sol;yum&sol;el7&sol;webtatic-release&period;rpm<&sol;pre>&NewLine;<p>2&period; lalu pasang php56 dan ektensi yang dibutuhkan<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true ">yum install php56w php56w-gd php56w-mbstring php56w-mcrypt php56w-intl php56w-mysqlnd php56w-fpm<&sol;pre>&NewLine;<p>3&period; untuk ektensi lain bisa anda cari dengan peintah berikut<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true ">yum search php56w<&sol;pre>&NewLine;<p>Tes Web Server<br &sol;>&NewLine;tambahkan berkas info&period;php pada direktori baku web server apache<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true">vim &sol;var&sol;www&sol;html&sol;info&period;php<&sol;pre>&NewLine;<p>dan tambahkan skrip berikut<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true">&lt&semi;&quest;php phpinfo&lpar;&rpar;&semi; &quest;&gt&semi;<&sol;pre>&NewLine;<p>lalu coba anda akses pada peramban tautan berikut<&sol;p>&NewLine;<pre class&equals;"lang&colon;default decode&colon;true">http&colon;&sol;&sol;alamat-ip-atau-domain&sol;info&period;php<&sol;pre>&NewLine;<p>jika menampilkan halaman info php berarti instalasi lamp anda telah berhasil<&sol;p>&NewLine;

Recent Articles

Kumpulan DNS Gratis Tercepat!

0
DNS merupakan sebuah sistem yang bertugas menyimpan semua informasi data domain dalam jaringan. Dengan adanya DNS, domain atau hostname yang ada akan ditranslate dan...

Apa itu DNS ? Dan Fungsinya

0
Apa itu DNS? - DNS (Domain Name System) adalah sebuah sistem yang bertugas menyimpan semua informasi data domain dalam jaringan. Dengan adanya DNS, domain...

Apa itu OLT ? Serta Fungsinya Dalam Jaringan

0
Apa itu olt ? OLT (Optical Line Termination) adalah perangkat keras yang berfungsi sebagai titik akhir (end-point) dari layanan jaringan optik pasif (Passive Optical...

Template Voucher Untuk Mixradius

2
Template Voucher Untuk Mixradius - Pasti kalian bosen kan dengan template voucher default mixradius? tenang. kali ini saya akan memberikan template untuk voucher mixradius kamu agar...

Daftar Port Game Online Mikrotik Terbaru

2
Daftar port game online dibawah ini bisa digunakan untuk membuat rule agar koneksi ke game online tersebut bisa lancar, bisa juga untuk memisahkan antara...

Related Articles

Leave A Reply

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Dapatkan konten terbaik dari kami!