{"id":12968,"date":"2020-04-06T10:17:26","date_gmt":"2020-04-06T10:17:26","guid":{"rendered":"https:\/\/www.semigataweb.com\/blog\/?p=12968"},"modified":"2020-04-15T03:57:57","modified_gmt":"2020-04-15T03:57:57","slug":"cara-instal-apache-mysql-dan-php-di-ubuntu-16-04","status":"publish","type":"post","link":"https:\/\/semigataweb.com\/blog\/cara-instal-apache-mysql-dan-php-di-ubuntu-16-04\/","title":{"rendered":"Cara Instal Apache, MySQL, dan PHP di Ubuntu 16.04"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"860\" height=\"449\" src=\"https:\/\/www.semigataweb.com\/blog\/wp-content\/uploads\/2020\/04\/image-26.png\" alt=\"Cara Instal Apache, MySQL, dan PHP di Ubuntu 16.04\" class=\"wp-image-12972\" srcset=\"https:\/\/semigataweb.com\/blog\/wp-content\/uploads\/2020\/04\/image-26.png 860w, https:\/\/semigataweb.com\/blog\/wp-content\/uploads\/2020\/04\/image-26-300x157.png 300w, https:\/\/semigataweb.com\/blog\/wp-content\/uploads\/2020\/04\/image-26-768x401.png 768w, https:\/\/semigataweb.com\/blog\/wp-content\/uploads\/2020\/04\/image-26-45x23.png 45w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><figcaption>Cara Instal Apache, MySQL, dan PHP di Ubuntu 16.04<\/figcaption><\/figure>\n\n\n\n<div id=\"toc_container\" class=\"toc_black no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><\/li><li><\/li><li><\/li><li><\/li><\/ul><\/div>\n<h5 class=\"wp-block-heading\"><span id=\"Langkah_1_Instal_Apache\">Langkah 1: Instal Apache<\/span><\/h5>\n\n\n\n<p>Pertama, perbarui manajer paket Anda.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get update -y<\/pre>\n\n\n\n<p>Instal dan buka Apache.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get install apache2 -y\nsudo systemctl start apache2.service<\/pre>\n\n\n\n<p>Verifikasi bahwa Apache telah diinstal sempurna dengan mengaksesnya dari browser lokal Anda. Buka&nbsp;<code>hostname -I<\/code>&nbsp;untuk mengetahui alamat IP untuk server dan arahkan ke&nbsp;<code>http:\/\/SERVER_IP\/<\/code>.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><span id=\"Langkah_2_Instal_MySQL\">Langkah 2: Instal MySQL<\/span><\/h5>\n\n\n\n<p>Ketik perintah berikut ke prompt shell.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get install mysql-server -y<\/pre>\n\n\n\n<p>MySQL akan di-instal ke server database MariaDB (garpu MySQL). Anda akan diminta memasukkan kata sandi untuk pengguna root MySQL, jadi teruskan saja.<\/p>\n\n\n\n<p>Kemudian, jalankan&nbsp;<code>sudo \/usr\/bin\/mysql_secure_installation<\/code>. Ketik &#8220;<code>y<\/code>&#8220;.<\/p>\n\n\n\n<p>Bergantung pada tingkat keamanan, Anda dapat menyesuaikan kompleksitas kata sandi.<\/p>\n\n\n\n<p>Untuk salah satu opsi berikut, tekan &#8220;<code>y<\/code>&#8221; dan lanjutkan.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><span id=\"Langkah_3_Instal_PHP\">Langkah 3: Instal PHP<\/span><\/h5>\n\n\n\n<p>Instal PHP:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get install php -y<\/pre>\n\n\n\n<p>Kemudian instal ekstensi PHP umum seperti&nbsp;<code>GD<\/code>,&nbsp;<code>MySQL<\/code>, dan sebagainya.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get install -y php-{bcmath,bz2,intl,gd,mbstring,mcrypt,mysql,zip} &amp;&amp; sudo apt-get install lib<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><span id=\"Langkah_4_Mulai_Apache_dan_MySQL_saat_proses_boot_berjalan\">Langkah 4: Mulai Apache dan MySQL saat proses boot berjalan<\/span><\/h5>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl enable apache2.service\nsudo systemctl enable mysql.service<\/pre>\n\n\n\n<p>Terakhir, restart Apache agar PHP dapat berjalan.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">systemctl restart apache2.service<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contents Langkah 1: Instal Apache Pertama, perbarui manajer paket Anda. Instal dan buka Apache. Verifikasi bahwa Apache telah diinstal sempurna dengan mengaksesnya dari browser lokal Anda. Buka&nbsp;hostname -I&nbsp;untuk mengetahui alamat IP untuk server dan arahkan ke&nbsp;http:\/\/SERVER_IP\/. Langkah 2: Instal MySQL Ketik perintah berikut ke prompt shell. MySQL akan di-instal ke server database MariaDB (garpu MySQL). [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":12972,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,31,29],"tags":[97,98,26],"_links":{"self":[{"href":"https:\/\/semigataweb.com\/blog\/wp-json\/wp\/v2\/posts\/12968"}],"collection":[{"href":"https:\/\/semigataweb.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/semigataweb.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/semigataweb.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/semigataweb.com\/blog\/wp-json\/wp\/v2\/comments?post=12968"}],"version-history":[{"count":7,"href":"https:\/\/semigataweb.com\/blog\/wp-json\/wp\/v2\/posts\/12968\/revisions"}],"predecessor-version":[{"id":13265,"href":"https:\/\/semigataweb.com\/blog\/wp-json\/wp\/v2\/posts\/12968\/revisions\/13265"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/semigataweb.com\/blog\/wp-json\/wp\/v2\/media\/12972"}],"wp:attachment":[{"href":"https:\/\/semigataweb.com\/blog\/wp-json\/wp\/v2\/media?parent=12968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/semigataweb.com\/blog\/wp-json\/wp\/v2\/categories?post=12968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/semigataweb.com\/blog\/wp-json\/wp\/v2\/tags?post=12968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}