Low cost ecommerce web development India flash website design
Linux Installation
This section covers the procedure for installing PHP and MySQL under most
current distributions of Linux. These instructions were tested under the latest
version Debian Linux (3.0); however, they should work on other distributions
such as RedHat and Mandrake without much trouble. The steps involved will
be very similar, if not identical.
As a user of one of the handful of Linux distributions available, you may be
tempted to download and install packaged distributions of PHP and MySQL.
Debian users will be used to installing software using the apt-get utility, while
other distributions often rely on RPM packages. These prepackaged versions of
software are really easy to install; unfortunately, they also limit the software
configuration options available to you. If you already have MySQL and PHP installed
in packaged form, then feel free to proceed with those versions, and skip
forward to the section called “Post-Installation Setup Tasks”. If you encounter
any problems, you can always return here to uninstall the packaged versions and
reinstall PHP and MySQL by hand.
Since many Linux distributions will automatically install PHP and MySQL for
you, your first step should be to remove any old packaged versions of PHP and
MySQL from your system. If one exists, use your distribution's graphical software
manager to remove all packages with php or mysql in their names.
If your distribution doesn't have a graphical software manager, or if you didn't
install a graphical user interface for your server, you can remove these from the
command line. You'll need to be logged in as the root user to issue the commands
to do this. Note that in the following commands, shell# represents the shell
prompt, and shouldn't be typed in.
In Debian, you can use apt-get to remove the relevant packages:
shell#apt-get remove mysql-server
shell#apt-get remove mysql-client
shell#apt-get remove php4
In RedHat or Mandrake, you can use the rpm command-line utility:
shell#rpm -e mysql
shell#rpm -e php
If any of these commands tell you that the package in question is not installed,
don't worry about it unless you know for a fact that it is. In such cases, it will be
16
Installation
necessary for you to remove the offending item by hand. Seek help from an experienced
user if you don't know how. If the last command runs successfully (i.e.
no message is displayed), then you did indeed have an RPM version of PHP installed,
and you'll need to do one more thing to get rid of it entirely. Open your
Apache configuration file (usually /etc/httpd/conf/httpd.conf) in your favourite
text editor and look for the two lines shown here. They usually appear in
separate sections of the file, so don't worry if they're not together. The path of
the libphp4.so file may also be slightly different (e.g. extramodules instead of
just modules). If you can't find them, don't worry — it just means that the
package utility was smart enough to remove them for you.
LoadModule php4_module modules/libphp4.so
AddModule mod_php4.c
These lines are responsible for telling Apache to load PHP as a plug-in module.
Since you just uninstalled that module, you'll need to get rid of these lines to
make sure Apache keeps working properly. You can comment out these lines by
adding a hash (#) at the beginning of both lines.
To make sure Apache is still in working order, you should now restart it without
the PHP plug-in:
shell#apachectl graceful
With everything neat and tidy, you're ready to download and install MySQL and
PHP.
website designer freelance ASP PHP ecommerce web developer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110