menembus batas impian


Login to Centos server as root user

Using command prompt check whether you are logged in as root user or not. If you are not logged in as root user, you will not be able to run any installation commands.
su –

The above command will ask you for root password if you are not logged in as root user, else if you are logged in as root user than it will not display any message.
Install Apache

First step is to install the Apache server.
yum install httpd httpd-devel

To start the apache server you can use:
service httpd start

or
/etc/init.d/httpd start

(Not required at this point) If you want to restart the Apache server you can use:
service httpd restart

Install MySQL

To install the MySQL server type in
yum install mysql mysql-server mysql-devel

The above command will install MySQL server with username as root and password is empty.

To change the MySQL server password, start the MySQL server by:
/etc/init.d/mysqld start

mysql

The above two commands will take you to the MySQL command prompt where you can use MySQL commands. To change the root password to a new one from security point of view. Use the MySQL commands to change the root user password.
mysql USE mysql;

mysql UPDATE user SET Password= (‘newpassword’) WHERE user=’root’;

mysql FLUSH PRIVILEGES;

mysql exit;

Once done, check by logging in:
mysql -u root -p

Enter Password:

After changing the password you might not be able to log in, if you have previously installed MySQL or it prompts an error that you can’t logging using password empty for root@localhost than change the password again by using:
service mysqld stop

rm -fr /var/lib/mysql/*

service mysqld start

mysqladmin -u root password ‘rawr’

rawr is the new password.

To login to MySQL command prompt as root user use
mysql –u root –p

The above command will ask for root password for MySQL admin, entering your root password will log you in as root user for MySQL.
Install PHP

For installing php you need to update the EPCL package for the centos, as in centos some php modules are missing like php-mycrypt etc. which is required by phpMyAdmin for login as root user to phpMyAdmin.

To get the package for CentOS 6
cd /tmp

wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm

rpm -ivh epel-release-6-7.noarch.rpm

After installing the package you can install the php with other php extensions by:
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml

To test whether php is working or not

You can create an index.php file in your root folder, usually at /var/www/html

On your browser type in http://localhost/index.php will display the php info and other extensions installed.
Installing phpMyAdmin

PHPMyAdmin will is a free MySQL database Administration Tool. You can install phpMyAdmin by using the yum install phpMyAdmin command. Make sure you have installed the php-mcrypt modules as it is required by phpMyAdmin to login as root user for phpMyAdmin.
yum install phpmyadmin

Restart the apache, MySQL and memcache services.
service httpd start

service mysqld start

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: