INSTALL LAMP SERVER ( LINUX , MariaDB5dan10 , PHP7.1 ) IN LINUX MINT Untuk Belajar PHP - Web Development
Assalamualaikum wr.wb
Kali Ini Saya akan membahas tentang langkah-langkah untuk menginstall LAMP Server.
Alat dan Bahan :
- Laptop/pc
- Internet
Langkah - Langkah Yang Harus Dilakukan :
1. Install Apache
# apt-get install apache2 --> Y [ Enter]
tunggu proses instalasi selesai lalu buka http://localhost/ jika sudah muncul seperti di bawah instalasi berhasil.
2. Install PHP
# apt-get install php5 php5-mysql php5-gd php5-json php5-mcrypt php5-xmlrpc php5-cl php5-intl php5-curl php-pear php5-imagick / #apt-get install php7.1 php7.1-cli php7.1-common php7.1-curl php7.1-dev php7.1-gd php7.1-imap php7.1-intl php7.1-json php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-pgsql php7.1-phpdbg php7.1-sqlite3 php7.1-sybase php7.1-xml php7.1-xmlrpc php7.1-xsl php7.1-zip libapache2-mod-php7.1
Untuk mengetahui PHP-extention apa saja yang sudah terinstall kita buat file baru pada folder root
server :
#sudo xed /var/www/html/phpinfo.php
isikan sesuai yang dibawah :
<?php
phpinfo();
?>
ctrl + s ( untuk menyimpan )
selanjutnya anda dapat membuka web browser anda dan masuk ke alamat
http://locahost/phpinfo.php <<<--sesuai dengan nama file yang kita buat tadi
Succes !!
# apt-get install mariadb-server
Jangan Lupa Ketik Y besar lalu Enter tunggu proses selesai
setelah berhasil terinstall, kita harus men-set root password untuk root password agar mariadb dapat kita gunakan user root dengan full priviliges dengan perintah dibawah ini
konfigurasi mariadb :
#sudo mysql_secure_installation
Ikuti seperti Dibawah :
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and you haven't set the root password yet, the password will be blank, so you should just press enter here.
Enter current password for root (enter for none): <- Tekan Enter OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorisation.
Set root password? [Y/n] <- Tekan Enter New password: <- Masukan Password Baru Re-enter new password: <- Masukan Password Baru Lagi Password updated successfully! Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.
Remove anonymous users? [Y/n] <- Tekan Enter
... Success!
Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] <- Tekan Enter
... Success!
By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment.
Remove test database and access to it? [Y/n] <- Tekan Enter
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far will take effect immediately.
Reload privilege tables now? [Y/n] <- Tekan Enter
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB installation should now be secure.
Thanks for using MariaDB!
jika anda tidak bisa login menggunakan user biasa anda harus menggunakan sudo atau root dengan perintah
#sudo mysql -u root -p
MariaDB [(none)]> use mysql;
MariaDB [(mysql)]> update user set plugin='' where User='root';
MariaDB [(mysql)]> flush privileges;
MariaDB [(mysql)]> quit;
4. Install PHPMyadmin
# apt-get install phpmyadmin
Sekian dan Terimakasih !
Tidak ada komentar:
Posting Komentar