search
HomeBackend DevelopmentPHP ProblemHow to install php environment in suse

Suse method to install php environment: 1. Install apache through make install; 2. Install mysql using mysql non-RPM binary installation package; 3. Install php dependent library; 4. Install php; 5. Modify apache configuration file; 6. Start apache.

How to install php environment in suse

The operating environment of this article: SUSE Linux Enterprise 15 system, php5.2.6 version, DELL G3 computer.

How does suse install the php environment?

Build an apache php mysql environment on SuSE Linux

1. Install apache

apache installation package: httpd-2.2.9.tar.gz, the installation steps are as follows:

1) ./configure --prefix=/usr/local/httpd-2.2.9

2) make

3) make install

2. Install mysql

Directly use mysql non-RPM binary installation package, such as: mysql-5.1.36-linux -i686-glibc23.tar.gz, the specific steps are as follows:

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &

3. Install php dependent libraries

libxml2, expat, gd, gettext, use the standard installation of these dependent libraries automake installation method.

4. Install php

php installation package: php-5.2.6.tar.gz, the installation steps are as follows:

1) ./configure --prefix=/ usr/local/php-5.2.6 --enable-mbstring=LANG --with-mysql=/usr/local/mysql --with-gd=/usr/local/gd --with-gettext=/usr/local /gettext --with-libxml-dir=/usr/local/libxml2 --with-libexpat-dir=/usr/local/expat --with-apxs2=/usr/local/httpd/bin/apxs

The parameter --with-apxs2=/usr/local/httpd/bin/apxs is to generate the libphp5.so file, so it is necessary.

2) make

3) make install

After the installation is complete, copy php.ini-dist to /usr/local/php/lib/ and rename it to php .ini. Basically, PHP has been installed successfully here. If an error occurs in the middle, there will generally be no error unless the correct option is selected during configuration.

5. Modify the apache configuration file httpd.conf and add the following two lines:

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

And make sure there is the following sentence in the file. If not, add it after all LoadModules:

LoadModule php5_module modules/libphp5.so

6. Start apache

#/usr/local/httpd/bin/apachectl restart

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to install php environment in suse. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools