Howto install LAMP – PHP5 Apache2 MySQL On Fedora 18

Howto install LAMP – PHP5 Apache2 MySQL On Fedora 18

PackageKit holding yum lock fedora 18

 

 

1. Install MySQL5:

[root@dhcppc2 ~]# yum -y install mysql mysql-server
Loaded plugins: langpacks, presto
updates/group_gz | 368 kB 00:01
Resolving Dependencies
–> Running transaction check
—> Package mysql.i686 0:5.5.28-1.fc18 will be updated
—> Package mysql.i686 0:5.5.30-1.fc18 will be an update
–> Processing Dependency: real-mysql-libs(x86-32) = 5.5.30-1.fc18 for package: mysql-5.5.30-1.fc18.i686
—> Package mysql-server.i686 0:5.5.28-1.fc18 will be updated
—> Package mysql-server.i686 0:5.5.30-1.fc18 will be an update
–> Running transaction check
—> Package mysql-libs.i686 0:5.5.28-1.fc18 will be updated
—> Package mysql-libs.i686 0:5.5.30-1.fc18 will be an update
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
mysql i686 5.5.30-1.fc18 updates 4.9 M
mysql-server i686 5.5.30-1.fc18 updates 8.8 M
Updating for dependencies:
mysql-libs i686 5.5.30-1.fc18 updates 712 k

Transaction Summary
================================================================================
Upgrade 2 Packages (+1 Dependent package)

Total download size: 14 M
Downloading Packages:
Setting up and reading Presto delta metadata
updates/prestodelta | 1.7 MB 00:06
Processing delta metadata
Download delta size: 79 k
mysql-libs-5.5.28-1.fc18_5.5.30-1.fc18.i686.drpm | 79 kB 00:03
Finishing rebuild of rpms, from deltarpms
<locally rebuilding deltarpms> | 712 kB 00:06
Presto reduced the update size by 89% (from 712 k to 79 k).
Package(s) data still to download: 14 M
warning: /var/cache/yum/i386/18/updates/packages/mysql-server-5.5.30-1.fc18.i686.rpm: Header V3 RSA/SHA256 Signature, key ID de7f38bd: NOKEY
Public key for mysql-server-5.5.30-1.fc18.i686.rpm is not installed
(1/2): mysql-server-5.5.30-1.fc18.i686.rpm | 8.8 MB 00:33
(2/2): mysql-5.5.30-1.fc18.i686.rpm | 4.9 MB 03:21
——————————————————————————–
Total 69 kB/s | 14 MB 03:22
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386
Importing GPG key 0xDE7F38BD:
Userid : “Fedora (18) <fedora@fedoraproject.org>”
Fingerprint: 7efb 8811 dd11 e380 b679 fced ff01 125c de7f 38bd
Package : fedora-release-18-1.noarch (@anaconda)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-i386
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : mysql-libs-5.5.30-1.fc18.i686 1/6
Updating : mysql-5.5.30-1.fc18.i686 2/6
Updating : mysql-server-5.5.30-1.fc18.i686 3/6
Cleanup : mysql-server-5.5.28-1.fc18.i686 4/6
Cleanup : mysql-5.5.28-1.fc18.i686 5/6
Cleanup : mysql-libs-5.5.28-1.fc18.i686 6/6
Verifying : mysql-libs-5.5.30-1.fc18.i686 1/6
Verifying : mysql-5.5.30-1.fc18.i686 2/6
Verifying : mysql-server-5.5.30-1.fc18.i686 3/6
Verifying : mysql-server-5.5.28-1.fc18.i686 4/6
Verifying : mysql-5.5.28-1.fc18.i686 5/6
Verifying : mysql-libs-5.5.28-1.fc18.i686 6/6

Updated:
mysql.i686 0:5.5.30-1.fc18 mysql-server.i686 0:5.5.30-1.fc18

Dependency Updated:
mysql-libs.i686 0:5.5.30-1.fc18

Complete!

2. Config MySQL start automatically whenever the system boots and start the MySQL Server:

[root@dhcppc2 ~]# systemctl enable mysqld.service

[root@dhcppc2 ~]# systemctl start mysqld.service

3. Run and config security option:

[root@dhcppc2 ~]# mysql_secure_installation

 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we’ll need the current
password for the root user. If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] Y  // ENTER
New password:********  // Type your root password
Re-enter new password:********* // Confirm your root password
Password updated successfully!
Reloading privilege tables..
… Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] <– ENTER
… Success!

Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] <– ENTER
… Success!

By default, MySQL comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]<– ENTER
– Dropping test database…
… Success!
– Removing privileges on test database…
… Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] <– ENTER
… Success!

Cleaning up…

 

All done! If you’ve completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

4. Install Apache2:

[root@dhcppc2 ~]# yum -y install httpd
Loaded plugins: langpacks, presto
Resolving Dependencies
–> Running transaction check
—> Package httpd.i686 0:2.4.3-15.fc18 will be installed
–> Processing Dependency: httpd-tools = 2.4.3-15.fc18 for package: httpd-2.4.3-15.fc18.i686
–> Processing Dependency: libaprutil-1.so.0 for package: httpd-2.4.3-15.fc18.i686
–> Processing Dependency: libapr-1.so.0 for package: httpd-2.4.3-15.fc18.i686
–> Running transaction check
—> Package apr.i686 0:1.4.6-3.fc18 will be installed
—> Package apr-util.i686 0:1.4.1-6.fc18 will be installed
—> Package httpd-tools.i686 0:2.4.3-15.fc18 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================
Package Arch Version Repository Size
=========================================================================================
Installing:
httpd i686 2.4.3-15.fc18 updates 1.1 M
Installing for dependencies:
apr i686 1.4.6-3.fc18 fedora 107 k
apr-util i686 1.4.1-6.fc18 fedora 83 k
httpd-tools i686 2.4.3-15.fc18 updates 78 k

Transaction Summary
=========================================================================================
Install 1 Package (+3 Dependent packages)

Total download size: 1.3 M
Installed size: 3.6 M
Downloading Packages:
(1/4): httpd-tools-2.4.3-15.fc18.i686.rpm | 78 kB 00:00:01
(2/4): apr-util-1.4.1-6.fc18.i686.rpm | 83 kB 00:00:01
(3/4): apr-1.4.6-3.fc18.i686.rpm | 107 kB 00:00:03
(4/4): httpd-2.4.3-15.fc18.i686.rpm | 1.1 MB 00:00:07
—————————————————————————————–
Total 178 kB/s | 1.3 MB 00:07
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : apr-1.4.6-3.fc18.i686 1/4
Installing : apr-util-1.4.1-6.fc18.i686 2/4
Installing : httpd-tools-2.4.3-15.fc18.i686 3/4
Installing : httpd-2.4.3-15.fc18.i686 4/4
Verifying : apr-1.4.6-3.fc18.i686 1/4
Verifying : httpd-tools-2.4.3-15.fc18.i686 2/4
Verifying : apr-util-1.4.1-6.fc18.i686 3/4
Verifying : httpd-2.4.3-15.fc18.i686 4/4

Installed:
httpd.i686 0:2.4.3-15.fc18

Dependency Installed:
apr.i686 0:1.4.6-3.fc18 apr-util.i686 0:1.4.1-6.fc18 httpd-tools.i686 0:2.4.3-15.fc18

Complete!

5. Config Apache start at boot time and start the httpd service:

[root@dhcppc2 ~]# systemctl enable httpd.service

[root@dhcppc2 ~]# systemctl start httpd.service

6.Now you can connect to your web server via web browser:

Apache2  PHP5 MySQL  Fedora 18 LAMP 2

7. Install PHP5:

[root@dhcppc2 ~]# yum -y install php
Loaded plugins: langpacks, presto
Resolving Dependencies
–> Running transaction check
—> Package php.i686 0:5.4.12-1.fc18 will be installed
–> Processing Dependency: php-common(x86-32) = 5.4.12-1.fc18 for package: php-5.4.12-1.fc18.i686
–> Processing Dependency: php-cli(x86-32) = 5.4.12-1.fc18 for package: php-5.4.12-1.fc18.i686
–> Running transaction check
—> Package php-cli.i686 0:5.4.12-1.fc18 will be installed
—> Package php-common.i686 0:5.4.12-1.fc18 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================
Package Arch Version Repository Size
=========================================================================================
Installing:
php i686 5.4.12-1.fc18 updates 2.7 M
Installing for dependencies:
php-cli i686 5.4.12-1.fc18 updates 2.6 M
php-common i686 5.4.12-1.fc18 updates 844 k

Transaction Summary
=========================================================================================
Install 1 Package (+2 Dependent packages)

Total download size: 6.1 M
Installed size: 22 M
Downloading Packages:
php-cli-5.4.12-1.fc18.i686.rpm FAILED 00:40 ETA
http://mirrors.ispros.com.bd/fedora/updates/18/i386/php-cli-5.4.12-1.fc18.i686.rpm: [Errno 14] HTTP Error 404 – Not Found : http://mirrors.ispros.com.bd/fedora/updates/18/i386/php-cli-5.4.12-1.fc18.i686.rpm
Trying other mirror.
(1/3): php-common-5.4.12-1.fc18.i686.rpm | 844 kB 00:00:10
(2/3): php-5.4.12-1.fc18.i686.rpm | 2.7 MB 00:00:15
(3/3): php-cli-5.4.12-1.fc18.i686.rpm | 2.6 MB 00:00:22
—————————————————————————————–
Total 165 kB/s | 6.1 MB 00:38
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-common-5.4.12-1.fc18.i686 1/3
Installing : php-cli-5.4.12-1.fc18.i686 2/3
Installing : php-5.4.12-1.fc18.i686 3/3
Verifying : php-cli-5.4.12-1.fc18.i686 1/3
Verifying : php-5.4.12-1.fc18.i686 2/3
Verifying : php-common-5.4.12-1.fc18.i686 3/3

Installed:
php.i686 0:5.4.12-1.fc18

Dependency Installed:
php-cli.i686 0:5.4.12-1.fc18 php-common.i686 0:5.4.12-1.fc18

Complete!

8. Restart Apache Server:

[root@dhcppc2 ~]# systemctl restart httpd.service

9. Testing PHP5 / Getting Details About Your PHP5 Installation: create a small PHP file (info.php) The document root of the default web site /var/www/html to get etails about our PHP installation:

[root@dhcppc2 ~]# vi /var/www/html/info.php
<?php
phpinfo();
?>

10. Now you access PHP info from your browser:

Apache2  PHP5 MySQL  Fedora 18 LAMP 3
11. By default, PHP5 does not support MySQL.If you scroll further down,you’ll see Apache 2.0 Handler’s listed not MySQL. You’ve to install the php-mysql package:

[root@dhcppc2 ~]# yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-magickwand php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy
Loaded plugins: langpacks, presto
Resolving Dependencies
–> Running transaction check
—> Package php-gd.i686 0:5.4.12-1.fc18 will be installed
–> Processing Dependency: libt1.so.5 for package: php-gd-5.4.12-1.fc18.i686
—> Package php-imap.i686 0:5.4.12-1.fc18 will be installed
–> Processing Dependency: libc-client.so.2007 for package: php-imap-5.4.12-1.fc18.i686
—> Package php-ldap.i686 0:5.4.12-1.fc18 will be installed
—> Package php-magickwand.i686 0:1.0.9-4.fc18 will be installed
—> Package php-mbstring.i686 0:5.4.12-1.fc18 will be installed
—> Package php-mcrypt.i686 0:5.4.12-1.fc18 will be installed
–> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt-5.4.12-1.fc18.i686
—> Package php-mssql.i686 0:5.4.12-1.fc18 will be installed
–> Processing Dependency: php-pdo(x86-32) = 5.4.12-1.fc18 for package: php-mssql-5.4.12-1.fc18.i686
–> Processing Dependency: libsybdb.so.5 for package: php-mssql-5.4.12-1.fc18.i686
—> Package php-mysql.i686 0:5.4.12-1.fc18 will be installed
—> Package php-odbc.i686 0:5.4.12-1.fc18 will be installed
–> Processing Dependency: libodbc.so.2 for package: php-odbc-5.4.12-1.fc18.i686
—> Package php-pear.noarch 1:1.9.4-11.fc18.2 will be installed
—> Package php-shout.i686 0:0.9.2-11.fc18 will be installed
—> Package php-snmp.i686 0:5.4.12-1.fc18 will be installed
—> Package php-soap.i686 0:5.4.12-1.fc18 will be installed
—> Package php-tidy.i686 0:5.4.12-1.fc18 will be installed
—> Package php-xml.i686 0:5.4.12-1.fc18 will be installed
—> Package php-xmlrpc.i686 0:5.4.12-1.fc18 will be installed
–> Running transaction check
—> Package freetds.i686 0:0.91-5.gitf3ae29d.fc18 will be installed
—> Package libc-client.i686 0:2007f-3.fc18 will be installed
—> Package libmcrypt.i686 0:2.5.8-12.fc18 will be installed
—> Package php-pdo.i686 0:5.4.12-1.fc18 will be installed
—> Package t1lib.i686 0:5.1.2-10.fc18 will be installed
—> Package unixODBC.i686 0:2.3.1-2.fc18 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================
Package Arch Version Repository Size
=========================================================================================
Installing:
php-gd i686 5.4.12-1.fc18 updates 146 k
php-imap i686 5.4.12-1.fc18 updates 75 k
php-ldap i686 5.4.12-1.fc18 updates 53 k
php-magickwand i686 1.0.9-4.fc18 fedora 101 k
php-mbstring i686 5.4.12-1.fc18 updates 543 k
php-mcrypt i686 5.4.12-1.fc18 updates 46 k
php-mssql i686 5.4.12-1.fc18 updates 63 k
php-mysql i686 5.4.12-1.fc18 updates 133 k
php-odbc i686 5.4.12-1.fc18 updates 74 k
php-pear noarch 1:1.9.4-11.fc18.2 updates 352 k
php-shout i686 0.9.2-11.fc18 fedora 30 k
php-snmp i686 5.4.12-1.fc18 updates 53 k
php-soap i686 5.4.12-1.fc18 updates 212 k
php-tidy i686 5.4.12-1.fc18 updates 51 k
php-xml i686 5.4.12-1.fc18 updates 176 k
php-xmlrpc i686 5.4.12-1.fc18 updates 72 k
Installing for dependencies:
freetds i686 0.91-5.gitf3ae29d.fc18 fedora 1.1 M
libc-client i686 2007f-3.fc18 fedora 563 k
libmcrypt i686 2.5.8-12.fc18 fedora 99 k
php-pdo i686 5.4.12-1.fc18 updates 129 k
t1lib i686 5.1.2-10.fc18 fedora 156 k
unixODBC i686 2.3.1-2.fc18 fedora 403 k

Transaction Summary
=========================================================================================
Install 16 Packages (+6 Dependent packages)

Total download size: 4.5 M
Installed size: 21 M
Is this ok [y/N]: y
Downloading Packages:
(1/22): freetds-0.91-5.gitf3ae29d.fc18.i686.rpm | 1.1 MB 00:00:06
(2/22): libc-client-2007f-3.fc18.i686.rpm | 563 kB 00:00:08
(3/22): php-gd-5.4.12-1.fc18.i686.rpm | 146 kB 00:00:07
(4/22): php-imap-5.4.12-1.fc18.i686.rpm | 75 kB 00:00:00
(5/22): php-ldap-5.4.12-1.fc18.i686.rpm | 53 kB 00:00:00
(6/22): php-magickwand-1.0.9-4.fc18.i686.rpm | 101 kB 00:00:00
(7/22): php-mbstring-5.4.12-1.fc18.i686.rpm | 543 kB 00:00:02
(8/22): libmcrypt-2.5.8-12.fc18.i686.rpm | 99 kB 00:00:11
(9/22): php-mcrypt-5.4.12-1.fc18.i686.rpm | 46 kB 00:00:00
(10/22): php-mssql-5.4.12-1.fc18.i686.rpm | 63 kB 00:00:00
(11/22): php-mysql-5.4.12-1.fc18.i686.rpm | 133 kB 00:00:00
(12/22): php-odbc-5.4.12-1.fc18.i686.rpm | 74 kB 00:00:00
(13/22): php-pdo-5.4.12-1.fc18.i686.rpm | 129 kB 00:00:00
(14/22): php-shout-0.9.2-11.fc18.i686.rpm | 30 kB 00:00:00
(15/22): php-pear-1.9.4-11.fc18.2.noarch.rpm | 352 kB 00:00:01
(16/22): php-snmp-5.4.12-1.fc18.i686.rpm | 53 kB 00:00:00
(17/22): php-soap-5.4.12-1.fc18.i686.rpm | 212 kB 00:00:01
(18/22): php-tidy-5.4.12-1.fc18.i686.rpm | 51 kB 00:00:00
(19/22): php-xml-5.4.12-1.fc18.i686.rpm | 176 kB 00:00:00
(20/22): php-xmlrpc-5.4.12-1.fc18.i686.rpm | 72 kB 00:00:00
(21/22): t1lib-5.1.2-10.fc18.i686.rpm | 156 kB 00:00:01
(22/22): unixODBC-2.3.1-2.fc18.i686.rpm | 403 kB 00:00:17
—————————————————————————————–
Total 124 kB/s | 4.5 MB 00:37
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-pdo-5.4.12-1.fc18.i686 1/22
Installing : php-mysql-5.4.12-1.fc18.i686 2/22
Installing : php-snmp-5.4.12-1.fc18.i686 3/22
Installing : php-mbstring-5.4.12-1.fc18.i686 4/22
Installing : php-xml-5.4.12-1.fc18.i686 5/22
Installing : php-ldap-5.4.12-1.fc18.i686 6/22
Installing : php-shout-0.9.2-11.fc18.i686 7/22
Installing : php-xmlrpc-5.4.12-1.fc18.i686 8/22
Installing : php-soap-5.4.12-1.fc18.i686 9/22
Installing : 1:php-pear-1.9.4-11.fc18.2.noarch 10/22
Created directory: /var/lib/net-snmp/cert_indexes
Created directory: /var/lib/net-snmp/mib_indexes
Installing : php-tidy-5.4.12-1.fc18.i686 11/22
Installing : php-magickwand-1.0.9-4.fc18.i686 12/22
Installing : unixODBC-2.3.1-2.fc18.i686 13/22
Installing : freetds-0.91-5.gitf3ae29d.fc18.i686 14/22
Installing : libmcrypt-2.5.8-12.fc18.i686 15/22
Installing : t1lib-5.1.2-10.fc18.i686 16/22
Installing : libc-client-2007f-3.fc18.i686 17/22
Installing : php-imap-5.4.12-1.fc18.i686 18/22
Installing : php-gd-5.4.12-1.fc18.i686 19/22
Installing : php-mcrypt-5.4.12-1.fc18.i686 20/22
Installing : php-mssql-5.4.12-1.fc18.i686 21/22
Installing : php-odbc-5.4.12-1.fc18.i686 22/22
Verifying : php-magickwand-1.0.9-4.fc18.i686 1/22
Verifying : php-pdo-5.4.12-1.fc18.i686 2/22
Verifying : freetds-0.91-5.gitf3ae29d.fc18.i686 3/22
Verifying : php-tidy-5.4.12-1.fc18.i686 4/22
Verifying : php-gd-5.4.12-1.fc18.i686 5/22
Verifying : 1:php-pear-1.9.4-11.fc18.2.noarch 6/22
Verifying : php-soap-5.4.12-1.fc18.i686 7/22
Verifying : php-xmlrpc-5.4.12-1.fc18.i686 8/22
Verifying : php-imap-5.4.12-1.fc18.i686 9/22
Verifying : php-shout-0.9.2-11.fc18.i686 10/22
Verifying : php-mysql-5.4.12-1.fc18.i686 11/22
Verifying : libc-client-2007f-3.fc18.i686 12/22
Verifying : php-mcrypt-5.4.12-1.fc18.i686 13/22
Verifying : php-ldap-5.4.12-1.fc18.i686 14/22
Verifying : php-xml-5.4.12-1.fc18.i686 15/22
Verifying : php-odbc-5.4.12-1.fc18.i686 16/22
Verifying : php-mssql-5.4.12-1.fc18.i686 17/22
Verifying : php-mbstring-5.4.12-1.fc18.i686 18/22
Verifying : php-snmp-5.4.12-1.fc18.i686 19/22
Verifying : t1lib-5.1.2-10.fc18.i686 20/22
Verifying : unixODBC-2.3.1-2.fc18.i686 21/22
Verifying : libmcrypt-2.5.8-12.fc18.i686 22/22

Installed:
php-gd.i686 0:5.4.12-1.fc18 php-imap.i686 0:5.4.12-1.fc18
php-ldap.i686 0:5.4.12-1.fc18 php-magickwand.i686 0:1.0.9-4.fc18
php-mbstring.i686 0:5.4.12-1.fc18 php-mcrypt.i686 0:5.4.12-1.fc18
php-mssql.i686 0:5.4.12-1.fc18 php-mysql.i686 0:5.4.12-1.fc18
php-odbc.i686 0:5.4.12-1.fc18 php-pear.noarch 1:1.9.4-11.fc18.2
php-shout.i686 0:0.9.2-11.fc18 php-snmp.i686 0:5.4.12-1.fc18
php-soap.i686 0:5.4.12-1.fc18 php-tidy.i686 0:5.4.12-1.fc18
php-xml.i686 0:5.4.12-1.fc18 php-xmlrpc.i686 0:5.4.12-1.fc18

Dependency Installed:
freetds.i686 0:0.91-5.gitf3ae29d.fc18 libc-client.i686 0:2007f-3.fc18
libmcrypt.i686 0:2.5.8-12.fc18 php-pdo.i686 0:5.4.12-1.fc18
t1lib.i686 0:5.1.2-10.fc18 unixODBC.i686 0:2.3.1-2.fc18

Complete!

12. To speed up your PHP page, we recommend install APC:

[root@dhcppc2 ~]# yum install php-pecl-apc
Loaded plugins: langpacks, presto
Resolving Dependencies
–> Running transaction check
—> Package php-pecl-apc.i686 0:3.1.14-1.fc18 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================
Package Arch Version Repository Size
=========================================================================================
Installing:
php-pecl-apc i686 3.1.14-1.fc18 updates 146 k

Transaction Summary
=========================================================================================
Install 1 Package

Total download size: 146 k
Installed size: 446 k
Is this ok [y/N]: y
Downloading Packages:
php-pecl-apc-3.1.14-1.fc18.i686.rpm | 146 kB 00:00:01
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-pecl-apc-3.1.14-1.fc18.i686 1/1
Verifying : php-pecl-apc-3.1.14-1.fc18.i686 1/1

Installed:
php-pecl-apc.i686 0:3.1.14-1.fc18

Complete!

13. Restart Apache2:

[root@dhcppc2 ~]# systemctl restart httpd.service

14. Now reload http://192.168.1.4/info.php in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module:

Apache2  PHP5 MySQL  Fedora 18 LAMP 4

15. Install phpMyAdmin to manage MySQL database via web interface:

[root@dhcppc2 ~]# yum -y install phpmyadmin
Loaded plugins: langpacks, presto
Resolving Dependencies
–> Running transaction check
—> Package phpMyAdmin.noarch 0:3.5.7-1.fc18 will be installed
–> Processing Dependency: php-php-gettext for package: phpMyAdmin-3.5.7-1.fc18.noarch
–> Running transaction check
—> Package php-php-gettext.noarch 0:1.0.11-6.fc18 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================
Package Arch Version Repository Size
=========================================================================================
Installing:
phpMyAdmin noarch 3.5.7-1.fc18 updates 4.2 M
Installing for dependencies:
php-php-gettext noarch 1.0.11-6.fc18 fedora 21 k

Transaction Summary
=========================================================================================
Install 1 Package (+1 Dependent package)

Total download size: 4.2 M
Installed size: 18 M
Downloading Packages:
(1/2): php-php-gettext-1.0.11-6.fc18.noarch.rpm | 21 kB 00:00:06
(2/2): phpMyAdmin-3.5.7-1.fc18.noarch.rpm | 4.2 MB 00:00:21
—————————————————————————————–
Total 197 kB/s | 4.2 MB 00:21
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-php-gettext-1.0.11-6.fc18.noarch 1/2
Installing : phpMyAdmin-3.5.7-1.fc18.noarch 2/2
Verifying : php-php-gettext-1.0.11-6.fc18.noarch 1/2
Verifying : phpMyAdmin-3.5.7-1.fc18.noarch 2/2

Installed:
phpMyAdmin.noarch 0:3.5.7-1.fc18

Dependency Installed:
php-php-gettext.noarch 0:1.0.11-6.fc18

Complete!

16. Configure phpMyAdmin llows connections not just from localhost:

[root@dhcppc2 ~]# vi /etc/httpd/conf.d/phpMyAdmin.conf
# phpMyAdmin – Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory /usr/share/phpMyAdmin/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
Require all granted     // Add the line: Require all granted
</Directory>

<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4

17. Restart Apache2:

[root@dhcppc2 ~]# systemctl restart httpd.service

18. You can access phpMyAdmin under http://192.168.1.4/phpmyadmin/:\

Apache2  PHP5 MySQL  Fedora 18 LAMP 5

That’s all . Thanks for using ithelpblog.com

Tags:  

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>