CentOS 6.0 PHP server setup guide
Basic Setup
- Put the centos 6.2 CD to the PC and boot the machine, in centos 6.2 is not like other centos versions to struggle to start installation. its like plug and play. Basically we have to choose default preferences for the next next steps. Take care of the partitioning when you have to different OS in your PC.
- Choose web server - for CLI mode if you like GUI choose “Software Development Workstation” while installing.. I am selecting “Software Development Workstation” now.
- After finishing the installation Reboot ;)
- Now create a user and forward and unselect the KDump option and finish
Networking
- Go to System tools => Terminal
- type “su” and give the administrator password.
- now type system-config-network and hit enter
- go to device configuration and select the device (i.e your network adapter/ethernet card) and hit enter.
- now remove the astrick from the DHCP ([*] => []) and provide the ipconfig details ipaddress, default gateway, primary and secondary DNS. and save.
Install Web Server
Please follow the commands bellow.- open terminal and type “su” again and type “yum update”.
- yum install httpd (it will automatically update in yum update) http://library.linode.com/lamp-guides/centos-6
- install httpd
service httpd start - for start apache... if not exist...
Follow this.## Remi Dependency on CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
## CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
## Remi Dependency on CentOS 5 and Red Hat (RHEL) 5 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
## CentOS 5 and Red Hat (RHEL) 5 ##
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
for the installation
yum --enablerepo=remi install httpd php php-common
service httpd start
Now try localhost web server installed./var/www/html/test.php file
Creating a index.php
- vi index.php
- hit i
- type <? phpinfo() ?>
- now hit ESC and :wq for save.
Install Phpmyadmin
http://www.ehowstuff.com/how-to-install-phpmyadmin-on-centos-6-2-server/
search as “install phpmyadmin centos 6.2”
wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.4.9/phpMyAdmin-3.4.9-all-languages.tar.gz
[root@centos62 ~]# mv phpMyAdmin-3.4.9-all-languages.tar.gz /var/www/html/
[root@centos62 ~]# cd /var/www/html/
[root@centos62 html]# tar -xzvf phpMyAdmin-3.4.9-all-languages.tar.gz
[root@centos62 html]# chmod 655 phpMyAdmin-3.4.9-all-languages/
[root@centos62 html]# mv phpMyAdmin-3.4.9-all-languages phpmyadmin
[root@centos62 html]# cd phpmyadmin
try now localhost/phpmyadmin
Install WEBMIN
http://www.zimbio.com/Linux/articles/Uj9tPTpCeeU/How+Install+Webmin+1+570+CentOS+5+7+tar+gzor google it as “install webmin on centos 6.2”
1. Download Webmin:
[root@centos6 ~]# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.570-1.noarch.rpm
2. Add the GPG Key:
[root@centos6 ~]# rpm –import http://www.webmin.com/jcameron-key.asc
3. Install webmin :
[root@centos6 ~]# rpm -U webmin-1.570-1.noarch.rpm
Operating system is CentOS Linux Webmin install complete.
You can now login to http://youripaddress:10000/ as root with your root password.