LAMP adalah singkatan dari Linux, Apache, MySQL, PHP. Tutorial ini menunjukkan bagaimana Anda dapat memasang webserver Apache2 pada OpenSUSE 11.2 server dengan PHP5 support (mod_php) dan dukungan MySQL.
1.Info
Dalam tutorial ini saya menggunakan nama host : server.wtu.co.id dengan alamat IP 192.168.1.36
2. Install MySQL 5
membuat link startup sistem untuk MySQL (sehingga MySQL dijalankan secara otomatis setiap kali sistem boot) dan mulai server MySQL:
Install Secure Instalasi
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): <-- Tekan 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] <-- Pilih Y
New password: <-- Isi Password MySQL
Re-enter new password: <-- Konfirm Password MySQL
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] <-- Pilih 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] <-- Pilih 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] <-- Pilih 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] <-- pilih 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!
3. Install Apache2
mengkonfigurasi sistem anda untuk memulai Apache pada saat boot
Start Apache2
Akses browser dengan alamat IP : 192.168.1.36
5.Install Pakel php5-mysql
Untuk mendapatkan dukungan MySQL di PHP, kita dapat menginstal paket php5-mysql
Restart Service Apache
6.Install Phpmyadmin
simpan di /srv/www/htdocs
Setelah itu, Anda dapat mengakses phpMyAdmin di bawah http://192.168.1.36/phpmyadmin/:
Untuk Ubuntu , ubah yast2 -i menjadi apt-get install
contoh yast2 -i apache2 , menjadi apt-get installSelamat Mencoba
Taufan M |Email me
1.Info
Dalam tutorial ini saya menggunakan nama host : server.wtu.co.id dengan alamat IP 192.168.1.36
2. Install MySQL 5
yast2 -i mysql mysql-client
membuat link startup sistem untuk MySQL (sehingga MySQL dijalankan secara otomatis setiap kali sistem boot) dan mulai server MySQL:
chkconfig --add mysql
/etc/init.d/mysql start
Install Secure Instalasi
mysql_secure_installation
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): <-- Tekan 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] <-- Pilih Y
New password: <-- Isi Password MySQL
Re-enter new password: <-- Konfirm Password MySQL
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] <-- Pilih 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] <-- Pilih 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] <-- Pilih 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] <-- pilih 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!
3. Install Apache2
yast2 -i apache2
mengkonfigurasi sistem anda untuk memulai Apache pada saat boot
chkconfig --add apache2
Start Apache2
/etc/init.d/apache2 start
Akses browser dengan alamat IP : 192.168.1.36
Apabila Muncul Permission Denied
anda perlu mengubah file
/etc/apache2/server-default.conf atau
/etc/apache2/default-server.conf
Default root Apache pada Opensuse tersimpan di / srv / www / htdocs / , dan file konfigurasi ada di / etc/apache2/httpd.conf. Konfigurasi tambahan disimpan di direktori / etc/apache2/conf.d /
anda perlu mengubah file
/etc/apache2/server-default.conf atau
/etc/apache2/default-server.conf
#
# Configure the DocumentRoot
#
<Directory
"/srv/www/htdocs"
>
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# for more information.
Options None
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
AllowOverride None
# Controls who can get stuff from this server.
Order allow,deny
Allow from all
</Directory>
ub
ah bagian Options None menjadi Options All.kemudian restart service apache (/etc/init.d/apache2 restart4. Install PHP5
yast2 -i apache2-mod_php5
restart Apache
/etc/init.d/apache2 restart
Test Php
Buat file info.php
cd /srv/www/htdocs
vi /srv/www/htdocs/info.php
<?php
phpinfo();
?>
buka browser 192.168.1.36/info.php):
5.Install Pakel php5-mysql
Untuk mendapatkan dukungan MySQL di PHP, kita dapat menginstal paket php5-mysql
yast2 -i 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-ldap php5-mbstring php5-mcrypt php5-odbc php5-openssl php5-pcntl php5-pgsql php5-shmop php5-snmp php5-soap php5-sysvsem php5-tokenizer php5-wddx php5-xmlrpc php5-xsl php5-zlib php5-exif php5-fastcgi php5-pear php5-sysvmsg php5-sysvshm
Restart Service Apache
/etc/init.d/apache2 restart
6.Install Phpmyadmin
simpan di /srv/www/htdocs
cd /srv/www/htdocs
Download phpmyadmin : wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.0.0/phpMyAdmin-4.0.0-all-languages.zip?r=&ts=1368696475&use_mirror=jaist
mv phpMyAdmin-3.2.3-all-languages phpmyadmin
Setelah itu, Anda dapat mengakses phpMyAdmin di bawah http://192.168.1.36/phpmyadmin/:
Untuk Ubuntu , ubah yast2 -i menjadi apt-get install
contoh yast2 -i apache2 , menjadi apt-get installSelamat Mencoba
Taufan M |Email me
Comments
Post a Comment