Skip to main content

How to Install Apache, PHP, and MySQL on Virtual Private Server (VPS) Centos

How to Install Apache, PHP, MySQL on Virtual Private Server (VPS) Centos - Now I will try to share how to setup VPS. What is VPS?? you can klik here.
There are many the example of webserver is Apache, nginx, etc.

Now, I will explaining How to Install Apache, PHP, MySQL on Virtual Private Server (VPS) Centos:

First, INSTALL MYSQL
yum install mysql mysqlserver
After it, Let's we setup mysql for runnung automatic when starting up
chkconfig –levels 235 mysqld on
And than, start mysql using command
/etc/init.d/mysqld start
or
service mysqld start 
Creating password for mysql database

mysqladmin -u root password yourpassword
mysqladmin -h server.latihan.com -u root password yourpassword
Second , INSTALL APACHE2
yum install httpd
 Let's we setup apache for runnung automatic when starting up
chkconfig –levels 235 httpd on
 And than, start apache using command
/etc/init.d/httpd start
or
service httpd start
And than, test apache using web browser, access your VPS IP or if you are using Server PC write http://localhost or http://127.0.0.1
If you are see Apache 2 Test Page, it is work :D
In the CentOS, the default of directory webserver is /var/www/html
and files of configuration is on /etc/httpd/conf/httpd.conf and direktory /etc/httpd/conf.d/

Third, INSTALL PHP5
After you are install Apache, you can install PHP using command
yum install php
And than, restart your apache
/etc/init.d/httpd restart
or
service httpd restart 
You can testing the service of php using this file. run below command
vi /var/www/html/info.php
Then, press i , and than insert/write the script of below
<?php
phpinfo();
?>
Then, press ESC, then :w and exit :q
After it, you can check it file on your browser, access using http://ipvps/info.php IP VPS  or localhost http://localhost/info.php or http://127.0.0.1/info.php

Fouth, SETTING PHP5 SUPPORT ON MYSQL
For php service can supporting on MySQL, so we must install moduls of php, you can search moduls of php using this command
yum search php
Install the moduls
yum install -y php php-devel php-gd php-mbstring php-mcrypt php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel 

And than, restart your apache
/etc/init.d/httpd restart
or
service httpd restart 
Finish, Now your CentOS were running nginx apache2 webserver, PHP, and MySQL.

Paper 4Share -  How to Install Apache, PHP, MySQL on Virtual Private Server (VPS) Centos

Comments

Popular posts from this blog

How to Install CloudSim in Ubuntu (in 3 easy steps)

The contents of this DIY has been tested on Ubuntu 12.04 LTS x64 with CloudSim 3.0.3 beta and JDK8u11 x64. It should work similarly on other distros of Ubuntu and for different version of JDK as long as you use Java version 1.5 or newer. The text shown in RED in the DIY represents the values that will differ depending upon your JDK version and locations. CloudSim is a framework for modelling and simulating cloud computing infrastructure and services. In this DIY we will see how to install CloudSim in Windows easily and efficiently. A more detailed description, APIs and research papers related to CloudSim can be found here . Let us begin. Step 1: Setting up the Prerequisites 1. First of all we need to download the CloudSim and latest version of the Java Development Toolkit (JDK). CloudSim can be found here . 2. CloudSim requires a working Java installation. So, open up a terminal and run the following 1 sudo add-apt-repository ppa:webupd8team/java 2 sudo apt-get...

6 Url Shorteners Yang Menghasilkan Uang Selain AdF.ly

Salam sobat GBX nah di pertemuan kita kali ini ane akan membahas 6 Url Shorteners Yang Menghasilkan Uang Selain AdF.ly seperti yang anda tau adf.ly adalah url shortener terbaik yang membayar kita karena telah menggunakan jasannya, tapi selain adf.ly ternyata masih banyak lagi Url Shorteners Yang Menghasilkan Uang, sekarang kita lihat saja ulasan di bawah.  6 Url Shorteners Yang Menghasilkan Uang Selain AdF.ly 1. Adfly adf.ly Yup yang ini memang patut diletakkan di peringkat satu ya, Adfly sudah ada dan terpercaya sejak bertahu-tahun lalu dan sudah menjadi pemendek link / url terbaik selama ini.  Selain menyediakan fasilitas penyingkat url, adfly juga merupakan situs penghasil dollar yang sudah sangat terkenal (melalui Pay Per Click dan Referal). Banyak juga teman-teman di internet yang sudah sukses mendapatkan dollar lho. (adfly ini sudah terpercaya dan ya semoga terus aman begitu dech). Komisi yang telah anda dapatkan dari adfly ini bisa langsung di transfer ke pay...

How To Add or Remove System Icons From The Kali Linux Desktop

When Kali Linux is started, there are always one or more system icons on the desktop. “Computer” is usually a default icon. However, some people might like to remove this icon and/or add other icons like the famous “Trash” icon. All the other tutorials will tell you to use the Linux, “gconfig-editor,” but Kali Linux does not have this system editor! I believe I am the only one who knows of a way to do this, so let me share my knowledge in this simple tutorial. Step one: Start and login to Kali Linux using your account or the “root” account. Step two: Open the main menu. Hover your mouse on “System Tools,” and click on “dconf Editor.” After a few seconds, the dconf Editor will open. Now all you have to do is browse to the correct category and set the options. Step three: When the dconf Editor window opens, click on the plus sign next to “org” (located in the left pane). Step four: Now click the plus sign next to “gnome.” Step five: Scroll down the list in the left pan...