Skip to main content

Install LAMP (Linux ,Apache2 , MySQL dan PHP5 ) di Opensuse 11.4 [rev]

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
   
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
#
# 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>
ubah bagian Options None menjadi Options All.kemudian restart service apache (/etc/init.d/apache2 restart
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 /
4. 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

Popular posts from this blog

[Arsip] Uninstal Zimbra Mail Server

UnInstalling Zimbra on Linux Uninstall Directions for Linux/All Other Operating Systems As root: 1) Run the commands: su – zimbra zmcontrol stop exit (you should be root after you run exit) 2a) Run the command:  ps -ef | grep -i zimbra If you see running processes 2b) Kill any lingering processes:  kill -9 <pid> 3a) Run the command:  df If you see "amavisd" 3b) run command:  umount /opt/zimbra/amavisd<-new-blah>/tmp 4)  cd /<tmp_tar_install_dir>/zcs/ 5) Run the command:  ./install.sh -u 6) Run the following commands to complete the unistall: rm -rf /opt/zimbra rm -rf /var/log/*zimbra* rm -rf /tmp/*zimbra* rm -rf /tmp/hsperfdata* rm -rf /tmp/install.* rm -rf /tmp/*swatch* rm -rf /tmp/log* Ensure that you removed ALL the files owned by the user zimbra AND that contain the name "zimbra" in: /var/log/ /tmp/ 7) Run the following commands to delete the users and groups: userdel zimbra userdel postfix groupdel zimbra groupdel postfix 8) Remove the line &q

Zimbra Admin Error : Diffie-Hellman key in Server Key Exchange handshake message

Ketika Membuka zimbra admin , muncul error seperti dibawah ini : Secure Connection Failed An error occurred during a connection to Server Zimbra. SSL received a weak ephemeral Diffie-Hellman key in Server Key Exchange handshake message. (Error code: ssl_error_weak_server_ephemeral_dh_key)     The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.     Please contact the website owners to inform them of this problem. ketika saya menggunakan Firefox Ver 42. Berdasarkan penjelasan dari support Mozilla , ini semacam celah keamanan SSL. saat firefox update aplikasi tersebut meningkatkan keamanan celah Diffie-Hellman Diffie–Hellman key exchange (D–H) [nb 1] is a specific method of securely exchanging cryptographic keys over a public channel and was one of the first public-key protocols as originally conceptualized by Ralph Merkle.[1][2] D–H is one of the earliest practical examples of public key exchange implemented within the f
Problem LDAP service  pada Zimbra  [Solved] terjadi pada server replikasi zimbra di kantor saya pada tanggal 5 November 2016 tiba-tiba error LDAP tidak mau startup service. service zimbra start Host test.domainku.com Starting ldap...Done. Failed. Failed to start slapd. Attempting debug start to determine error. daemon: bind(7) failed errno=98 (Address already in use) slap_open_listener: failed on ldap://mail.domain.com:389 Setelah cari-cari di google berhasil yaitu dengan menjalankan ulang file zmsetup.pl -Login sebagai root - /opt/zimbra/libexec/zmsetup.pl root@mailserver:~# /opt/zimbra/libexec/zmsetup.pl Operations logged to /tmp/zmsetup.11072016-131240.log Running bdb db_recover...done. Running zmldapapplyldif...done. Reboot mailserver kemudian berjalan normal ada juga yang menggunakan tutorial seperti dibawah ini (bisa dicoba): Untuk melihat service openldap yang sudah aktif : # ps -ef | grep slap openldap 1129 1 0 15:28 ? 00:00:00 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap