Networking, Server

Step by Step webserver (Apache) di Centos [vps]

Hari Jumat kemarn dpt email dari salah satu penyedia server si USA. blabala.com lahūüėÄ. yang katanya VPS gw udah di aktifin sama admin. 2bln baru aktif. gerr… parah!!

…………………….

Peralatan perang

#PC udah diinstall Os. Centos (gw pake yang 6.3 32bit)

karna gw PC nya lokasi nya nan jauh disana,

#Putty Telnet Terminal

#Winscp Telnet Directory (optional)

………………………………………………………………

Step Pertama Install Apache

How to install Apache Server on CentOS, RedHat, Linux

  1. Install Apache HTTP Server

    yum install httpd

    Note: This is typically installed with CentOS by default

How to configure Apache Server on CentOS, RedHat, Linux

  1. Set the apache service to start on boot

    chkconfig –levels 235 httpd on

  2. Enable name-based virtual hosting on port 80
    1. Open the httpd configuration file located at /etc/httpd/conf/httpd.conf
    2. Un-comment the line containing the text NameVirtualHost *:80
    3. Save the file
    4. Restart the Apache HTTP Server daemon

      service httpd restart

      Note: Ignore the “NameVirtualHost *:80 has no VirtualHosts” warning for now.

How to test Apache Server on CentOS, RedHat, Linux

  1. Visit localhost in your web browser.  You should see an Apache Test Page.

……………………………………………………………………

Step ke 2 Install PHP

How to install PHP

  1. Run the yum install command

    yum install php

…………………………………………………………………..

Step 3 Install Mysql

How to install MySQL

  1. Install MySQL

    yum install mysql-server mysql php-mysql

How to configure MySQL

  1. Set the MySQL service to start on boot

    chkconfig –levels 235 mysqld on

  2. Start the MySQL service

    service mysqld start

…………………………………………………………………

Step Ke 4 install PhpMyAdmin

Disini gw kasih manual nya aja yak

  1. Download phpmyadmin nya di http://www.phpmyadmin.net/home_page/downloads.php
  2. Ekstrak di folder /var/www/
  3. Akses via broser iplo/folderphpmyadmin. contoh http://5.175.157.217/phpmyadmin
  4. Akses username root pass: [null]

 

Masalah:

Masalah gw kemaren jelimet di password buat masuk ke phpmyadmin yang ternyata pasword nya bukan [null].

 

Solusi:

mysqladmin command to change root password

 

If you have never set a root password for MySQL server, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:

$ mysqladmin -u root password NEWPASSWORD

However, if you want to change (or update) a root password, then you need to use the following command:

$ mysqladmin -u root -p’oldpassword’ password newpass

For example, If the old password is abc, you can set the new password to 123456, enter:

$¬†mysqladmin¬†-u¬†root¬†-p’abc’¬†password¬†‘123456’

………………………………………………………

kalo mau rubah usermane

………………………………………………………

Change MySQL password for other users

 

To change a normal user password you need to type (let us assume you would like to change password for user vivek) the following command:

$ mysqladmin -u vivek -p oldpassword password newpass

Changing MySQL root user password using MySQL sql command

This is another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user vivek:

 

1) Login to mysql server, type the following command at shell prompt:

$ mysql -u root -p

2) Use mysql database (type command at mysql> prompt):

mysql> use mysql;

3) Change password for user vivek, enter:

mysql>¬†update¬†user¬†set¬†password=PASSWORD(“NEWPASSWORD”)¬†where¬†User=’vivek’;

4) Finally, reload the privileges:

mysql> flush privileges; mysql> quit

 

…………………………….

done.

Tasted by ibalabala.

hasil –> http://5.175.157.217/phpmyadmin/

Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s