Oke, kali ini ane mau berbagi sedikit tutorial install webserver apache, mysql, dan phpmyadmin di CentOS 6. Ane masih tahap belajar juga sih . Ada VPS baru kemaren yaudah buat belajar dikit dikit . heheh π
Oke langsung saja ke langkah langkah nya :
Setelah login root di server , masukkan command
[[email protected] ~]# yum update
lalu
Mulai Installasi Apache
[[email protected] ~]# yum install httpd
Setelah penginstalan, buka file /etc/httpd/conf/httpd.conf dan cari #ServerName www.example.com:80 .
ganti www.example.com dengan ip server vps kalian π
Langkah selanjutnya restart apache
[[email protected] ~]# service httpd start
Nah , server kalian sudah siap digunakan π
public html nya ada di /var/www/html/
Selanjutnya
MySQL Installation
[[email protected] ~]# yum install mysql-server
tunggu proses installasi
start mysql service
[[email protected] ~]# service mysqld start
lanjut, command dibawah ini supaya apache otomatis berjalan saat booting
[[email protected] ~]# chkconfig –levels 235 mysqld on
Selanjutnya, membuat root password untuk mysql.
[[email protected] ~]# mysqladmin -u root password ‘passwordkalian’
Test dengan login mysql
[[email protected] ~]# mysql -u root -p ( tekan enter)
Enter password:(masukkan password root yang telah kalian buat)
kalau sukses kalian akan mendapat tampilan seperti ini
[[email protected] ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 3
Server version: 5.1.61 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.
mysql>
Installasi PHP
[[email protected] ~]# yum install php php-mysql
Setelah itu restart apache
[[email protected] ~]# service httpd restart
Sebenarnya sampai sini server sudah siap digunakan π
tapi kadang ada yang gak mau ribet jadi nginstall phpMyAdmin juga . Oke dah dibawah ini tutorialnya :
Installasi phpMyAdmin
[[email protected] ~]# rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm
Update repositories
[[email protected] ~]# yum check-update
Setelah diupdate, sekarang install phpmyadminnya
[[email protected] ~]# yum install phpMyAdmin
restart httpd
[[email protected] ~]# service httpd restart
Sekarang phpmyadmin siapdigunakan.
cek di
http://ipserver/phpmyadmin/
contoh
http://48.48.48/phpmyadmin/
Troubleshooting
#2002 β Canβt connect to local MySQL server through socket β/var/lib/mysql/mysql.sockβ (2)
( kemungkinan mysql tidak berjalan , coba jalankan dengan command “service mysql start‘)
phpmyadmin saat dibuka menampilkan halaman 403 alias forbidden.
coba kalian edit file /etc/httpd/conf.d/phpMyAdmin.conf , hapus semua “deny from all” , ganti “allow from none” dengan “allow from all”
Setelah itu restart apache.
Sekian tutorial kali ini , semoga bermanfaat. π
Leave a Reply