LAMP adalah istilah yang merupakan singkatan dari Linux, Apache, MySQL dan Perl/PHP/Phyton. Merupakan sebuah paket perangkat lunak bebas yang digunakan untuk menjalankan sebuah aplikasi secara lengkap.
Komponen-komponen dari LAMP
- Linux - Sistem Operasi
- Apache HTTP Server - Web Server
- MariaDB atau MySQL - Sistem Basis Data
- Perl atau PHP atau Phyton - bahasa pemrograman yang dipakai
Berikut ini langkah istallasi LAMP support di linux opensuse 12.3 :
1. Instllasi MySQL5
Pertama kita harus menginstall MySQL5 seperti ini :
Pertama kita harus menginstall MySQL5 seperti ini :
# zypper install mysql-community-server mysql-community-server-client
Lalu kita membuat link sistem startup untuk MySQL (sehingga MySQL dijalankan secara otomatis setiap kali sistem boot) dan mulai server MySQL:
#systemctl enable mysql.service
#systemctl start mysql.service
#systemctl start mysql.service
Untuk mengamankan instalasi MySQL, jalankan:
#mysql_secure_installation
Sekarang Anda akan diminta beberapa pertanyaan:
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, 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): <-- ENTER
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] <-- Y
New password: <-- fill in your desired MySQL root password
Re-enter new password: <-- confirm that password
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL 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] <-- Y
... 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] <-- Y
... Success!
By default, MySQL 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] <-- Y
- 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] <-- Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, 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): <-- ENTER
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] <-- Y
New password: <-- fill in your desired MySQL root password
Re-enter new password: <-- confirm that password
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL 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] <-- Y
... 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] <-- Y
... Success!
By default, MySQL 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] <-- Y
- 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] <-- Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
Sekarang konfigurasi MySQL Anda sudah diamankan.
2. Installing Apache2
Apache2 tersedia sebagai paket OpenSUSE, oleh karena itu kita dapat menginstalnya seperti ini:
#zypper install apache2
Sekarang mengkonfigurasi sistem anda untuk memulai Apache pada saat boot ...
#systemctl enable apache2.service
dan lakukan untuk memulai server Apache2 :
#systemctl start apache2.service
Sekarang buka web browser Anda ketikkan http://localhost, dan anda akan melihat halaman placeholder Apache2 (jangan khawatir tentang 403 error, hal ini terjadi karena tidak ada file index (misalnya index.html) di direktori dokumen root) :
Apache dokumen standar root / srv / www / htdocs / pada OpenSUSE, dan file konfigurasi / etc/apache2/httpd.conf. Konfigurasi tambahan disimpan di / etc/apache2/conf.d / direktori.
3. Installing PHP5
Kita dapat menginstal PHP5 dan Apache PHP5 sebagai berikut:
#zypper install apache2-mod_php5
Kita harus me-restart Apache setelah itu:
#systemctl restart apache2.service
4. Pengujian PHP5 / Mendapatkan Detail Tentang Instalasi PHP5 Anda
Document root dari situs web default adalah / srv / www / htdocs /. Sekarang kita akan menciptakan sebuah file PHP kecil (info.php) dalam direktori tersebut dan menyebutnya dalam browser. File akan menampilkan banyak rincian yang berguna tentang instalasi PHP kita, seperti versi PHP yang diinstal.
#nano /srv/www/htdocs/info.php
Masukkan script berikut ini :
<?php
phpinfo();
?>
Sekarang buka web browser Anda dan ketikkan http://localhost/info.php, maka akan tampil semua informasi tentang PHP5 tersebut.Seperti yang Anda lihat, PHP5 bekerja, dan itu bekerja melalui Apache 2.0 Handler, seperti ditunjukkan pada baris Server API. Jika Anda menggulir ke bawah, Anda akan melihat semua modul yang sudah diaktifkan di PHP5. MySQL tidak terdaftar di sana yang berarti kita tidak memiliki dukungan MySQL di PHP5 belum.
4. Mendapatkan MySQL Dukungan Pada PHP5
Untuk mendapatkan dukungan MySQL di PHP, kita dapat menginstal paket php5-mysql. Ini adalah ide yang baik untuk menginstal beberapa modul PHP5 lainnya serta Anda mungkin membutuhkannya untuk aplikasi Anda:
#zypper install php5-mysql php5-bcmath php5-bz2 php5-calendar php5-ctype php5-curl php5-dom php5-ftp php5-gd php5-gettext php5-gmp php5-iconv php5-imap php5-ldap php5-mbstring php5-mcrypt php5-odbc php5-openssl php5-pcntl php5-pgsql php5-posix php5-shmop php5-snmp php5-soap php5-sockets php5-sqlite php5-sysvsem php5-tokenizer php5-wddx php5-xmlrpc php5-xsl php5-zlib php5-exif php5-fastcgi php5-pear php5-sysvmsg php5-sysvshm
Sekarang restart Apache2:
#systemctl restart apache2.service
Sekarang muat ulang http://localhost/info.php di browser Anda dan gulir ke bawah ke bagian modul lagi. Anda sekarang sudah menemukan banyak modul baru di sana, termasuk modul MySQL:
5. Installing phpMyAdmin
phpMyAdmin adalah antarmuka web di mana Anda dapat mengelola database MySQL Anda.
phpMyAdmin dapat diinstal sebagai berikut:
#zypper install phpMyAdmin
Tunggu hingga proses installasi selesai kemudian lakukan perintah berikut ini :
#nano /etc/apache2/conf.d/phpMyAdmin.conf
terlebih dahulu Anda harus menambahkan dua alias berikut tepat di awal :
Alias /phpMyAdmin /srv/www/htdocs/phpMyAdmin
Alias /phpMyAdmin /srv/www/htdocs/phpMyAdmin
[...]
Restart Apache2 Anda :
#systemctl restart apache2.service
Setelah itu, Anda dapat mengakses phpMyAdmin dengan mengetik di web browser http://localhost/phpMyAdmin/.
Semoga bermanfaat......! Salam Kenal dari saya (*_*)






