On this page
PHP 7.0.33 has been released on PHP.net on 6th December 2018, and is also available for CentOS/RHEL 6.9 and 7.4 at Webtatic via Yum. Source - Issues PEAR installer now supports PHP 7.0, however most pecl libraries will not support it as well without their maintainers adding compatibility, so only pecl libraries that do support it will be in the Webtatic repository.
- The Perfect Server - CentOS 6.1 x86_64 With Apache2 [ISPConfig 3]
The Perfect Server - CentOS 6.1 x86_64 With Apache2 [ISPConfig 3]
Version 1.0
Author: Falko Timme
Follow me on Twitter
Author: Falko Timme
Follow me on Twitter
This tutorial shows how to prepare a CentOS 6.1 x86_64 server for the installation of ISPConfig 3, and how to install ISPConfig 3. ISPConfig 3 is a webhosting control panel that allows you to configure the following services through a web browser: Apache web server, Postfix mail server, MySQL, BIND nameserver, PureFTPd, SpamAssassin, ClamAV, Mailman, and many more. Since version 3.0.4, ISPConfig comes with full support for the nginx web server in addition to Apache; this tutorial covers the setup of a server that uses Apache, not nginx.
Please note that this setup does not work for ISPConfig 2! It is valid for ISPConfig 3 only!
I do not issue any guarantee that this will work for you!
ISPConfig 3 Manual
In order to learn how to use ISPConfig 3, I strongly recommend to download the ISPConfig 3 Manual.
On about 300 pages, it covers the concept behind ISPConfig (admin, resellers, clients), explains how to install and update ISPConfig 3, includes a reference for all forms and form fields in ISPConfig together with examples of valid inputs, and provides tutorials for the most common tasks in ISPConfig 3. It also lines out how to make your server more secure and comes with a troubleshooting section at the end.
ISPConfig Monitor App For Android
With the ISPConfig Monitor App, you can check your server status and find out if all services are running as expected. You can check TCP and UDP ports and ping your servers. In addition to that you can use this app to request details from servers that have ISPConfig installed (please note that the minimum installed ISPConfig 3 version with support for the ISPConfig Monitor App is 3.0.3.3!); these details include everything you know from the Monitor module in the ISPConfig Control Panel (e.g. services, mail and system logs, mail queue, CPU and memory info, disk usage, quota, OS details, RKHunter log, etc.), and of course, as ISPConfig is multiserver-capable, you can check all servers that are controlled from your ISPConfig master server.
For download and usage instructions, please visit http://www.ispconfig.org/ispconfig-3/ispconfig-monitor-app-for-android/.
1 Requirements
To install such a system you will need the following:
- Download the two CentOS 6.1 DVDs from a mirror next to you (the list of mirrors can be found here: http://isoredirect.centos.org/centos/6/isos/x86_64/).
- a fast Internet connection.
2 Preliminary Note
In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100 and the gateway 192.168.0.1. These settings might differ for you, so you have to replace them where appropriate.
3 Install The Base System
Boot from your first CentOS 6.1 DVD (DVD 1). Select Install or upgrade an existing system:
It can take a long time to test the installation media so we skip this test here:
The welcome screen of the CentOS installer appears. Click on Next:
Choose your language next:
Select your keyboard layout:
I assume that you use a locally attached hard drive, so you should select Basic Storage Devices here:
You might see the following warning - Error processing drive. If you see this click on the Re-initialize all button to proceed:
Fill in the hostname of the server (e.g. server1.example.com), then click on the Configure Network button:
Go to the Wired tab, select the network interface (probably eth0) and click on Edit...:
Mark the Connect automatically checkbox and go to the IPv4 Settings tab and select Manual in the Method drop-down menu. Fill in one, two, or three nameservers (separated by comma) in the DNS servers field (e.g. 8.8.8.8,8.8.4.4), then click on the Add button next to the Addresses area:
Now give your network card a static IP address and netmask (in this tutorial I'm using the IP address 192.168.0.100 and netmask 255.255.255.0 for demonstration purposes; if you are not sure about the right values, http://www.subnetmask.info might help you). Also fill in your gateway (e.g. 192.168.0.1) and click on the Apply... button:
The network configuration is now finished. Click on the Next button:
This tutorial exists for these OS versions
- CentOS 7.6
On this page
- 4 Installing PHP
This tutorial shows how to install an Apache web server on CentOS 7 server with PHP (mod_php) and MySQL database. The acronym LAMP is short for Linux, Apache, MySQL, PHP.
This updated tutorial shows the installation of the latest PHP versions (7.0, 7.1, 7.2 and 7.3) on CentOS 7.6.
1 Preliminary Note
In this tutorial, I use the hostname server1.example.com with the IP p 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.
I will add the EPEL repo here to install latest phpMyAdmin as follows:
To edit files on the shell, I'll install the nano editor. If you prefer vi for file editing, then skip this step.
2 Installing MySQL / MariaDB
MariaDB is a MySQL fork of the original MySQL developer Monty Widenius. MariaDB is compatible with MySQL and I've chosen to use MariaDB here instead of MySQL. Run this command to install MariaDB with yum:
Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:
Set passwords for the MySQL root account:
3 Installing Apache
CentOS 7 ships with Apache 2.4. Apache is directly available as a CentOS 7 package, therefore we can install it like this:
Here a screenshot of the installation process.
Now configure your system to start Apache at boot time...
To be able to access the webserver from outside, we have to open the HTTP (80) and HTTPS (443) ports in the firewall. The default firewall on CentOS is firewalld which can be configured with the firewalld-cmd command.
Now direct your browser to the IP address of your server, in my case http://192.168.0.100, and you should see the Apache placeholder page:
4 Installing PHP
The PHP version that ships with CentOS as default is quite old (PHP 5.4). Therefore I will show you in this chapter some options to install newer PHP versions like PHP 7.0 to 7.3 from Remi repository.
Add the Remi CentOS repository.
Install yum-utils as we need the yum-config-manager utility.
and run yum update
Now you have to chose which PHP version you want to use on the server. If you like to use PHP 5.4, then proceed to chapter 4.1. To install PHP 7.0, follow the commands in chapter 4.2, for PHP 7.1 chapter 4.3, for PHP 7.4 use chapter 4.4 and for PHP 7.3 follow chapter 4.5 instead. Follow just one of the 4.x chapters and not all of them as you can only use one PHP version at a time with Apache mod_php.
4.1 Install PHP 5.4
To install PHP 5.4, run this command:
4.2 Install PHP 7.0
We can install PHP 7.0 and the Apache PHP 7.0 module as follows:
4.3 Install PHP 7.1
If you want to use PHP 7.1 instead, use:
4.4 Install PHP 7.2
If you want to use PHP 7.2 instead, use:
4.5 Install PHP 7.3
If you want to use PHP 7.3 instead, use:
In this example and in the downloadable virtual machine, I'll use PHP 7.3.
We must restart Apache to apply the changes:
5 Testing PHP / Getting Details About Your PHP Installation
The document root of the default website is /var/www/html. We will create a small PHP file (info.php) in that directory and call it in a browser to test the PHP installation. The file will display lots of useful details about our PHP installation, such as the installed PHP version.
Now we call that file in a browser (e.g. http://192.168.0.100/info.php):
As you see, PHP 7.3 is working, and it's working through the Apache 2.0 Handler, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP. MySQL is not listed there which means we don't have MySQL support in PHP yet.
6 Getting MySQL Support In PHP
To get MySQL support in PHP, we can install the php-mysqlnd package. It's a good idea to install some other PHP modules as well as you might need them for your applications. You can search for available PHP5 modules like this:
Pick the ones you need and install them like this:
In the next step I will install some common PHP modules that are required by CMS Systems like Wordpress, Joomla, and Drupal:
Now restart Apache web server:
Now reload http://192.168.0.100/info.php in your browser and scroll down to the modules section again. You should now find lots of new modules like curl etc there.:
If you don't need the PHP info output anymore, then delete that file for security reasons.
7 phpMyAdmin installation
phpMyAdmin is a web interface through which you can manage your MySQL databases.
phpMyAdmin can now be installed as follows:
phpMyAdmin can now be installed as follows:
Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <RequireAny> stanza and adding the 'Require all granted' line):
Restart Apache to apply the configuration changes:
Afterwards, you can access phpMyAdmin under http://192.168.0.100/phpmyadmin/:
8 Download as a virtual machine
This setup is available as virtual machine download in ova/ovf format (compatible with VMWare and Virtualbox) for howtoforge subscribers.
Login details for the VM
- The Linux root password is: howtoforge.
- Rhe MySQL root password is: howtoforge
Please change both passwords on the first login.
- The IP address of the VM is 192.168.0.100
9 Links
Apache: http://httpd.apache.org/
PHP: http://www.php.net/
MySQL: http://www.mysql.com/
CentOS: http://www.centos.org/
phpMyAdmin: http://www.phpmyadmin.net/
PHP: http://www.php.net/
MySQL: http://www.mysql.com/
CentOS: http://www.centos.org/
phpMyAdmin: http://www.phpmyadmin.net/