Lamp is the meaning of linux-apache-mysql-php.
Lamp Web site architecture is rich in Web resources, low price, and other characteristics. is currently the international popular web framework. Open source software used to build dynamic Web sites or servers is itself a separate program, but because it is often used together, it has become more and more compatible, and together form a powerful Web application platform. These four software are the GPL-compliant open source software that is secure, stable, fast, and powerful, using them to build a fast, stable, free web site system.
Experimental environment:
The packages used in the experiment are all Rhel with the RPM installation package.
Red Hat Enterprise Linux 5.4 32-bit
Httpd-2.2.3-31.el5
Php-mysql-5.1.6-23.2.el5_3
Mysql-5.0.77-3.el5
Mysql-server-5.0.77-3.el5
Php-5.1.6-23.2.el5_3
Php-gd-5.1.6-23.2.el5_3
Discuz_x2.5_sc_gbk.zip
Download a discuz forum website template
[Root@localhost ~]# Unzip Discuz_x2.5_sc_gbk.zip
Copy the upload files in the unpacked Discuz package to the Linux default site root directory
[Root@localhost ~]# MV upload//var/www/html/
[Root@localhost ~]# Cd/var/www/html/upload
#这里/var/www/html/upload The absolute path of the site, you need to add upload after the address, no access error
Edit the Apache service file
Vim/etc/http/conf/http.conf
After the installation of PHP, we install the installation package required for the lamp environment, where we use the Yum installation so that Yum will automatically give us a solution to the package dependencies
[Root@localhost ~]# cd/mnt/cdrom/server/
[Root@localhost server]# yum install httpd mysql-server masql php php-gd php-mysql-y
Start Apache and MySQL services and set to boot
[root@localhost server]# Service httpd restart
[Root@localhost server]# chkconfig httpd on
[root@localhost server]# Service mysqld start
[Root@localhost server]# chkconfig mysqld on
Login to MySQL. See if the database was installed successfully
[Root@localhost server]# mysql-u Root
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 2
Server version:5.0.77 Source Distribution
Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| Information_schema |
| MySQL |
| Test |
+--------------------+
3 Rows in Set (0.00 sec
Installed MySQL default is no password, unsafe, we need to set a password on it
The line surface wuhen is I set, very simple, everybody does when must set a safe password.
[root@localhost server]# mysqladmin-u root-p password ' wuhen '
Enter Password:/* need an old password here, no, direct return * *