Linux builds PHP extension development framework, Linux builds PHP framework_PHP tutorial. Install phpize (if you use php source code to compile, you don’t need it, you have it yourself)
Linux builds PHP extension development framework, Linux builds PHP framework_PHP tutorial. Open the php source code. There is the ext_skel tool in ext. It is convenient to use it
./ext_skel --extname = myext
After generating the extension frame, you need to modify the extended mp4 file,
#cd ext/myext/
#vim config.mp4
Modify the file as above. .
3. Compile and install the extension
#cd myext
#phpize
#./configure --with-php-config = /usr/bin/php-config //The location of php-config can be whereis.
#make
#make test //There is a prompt to fill in y or n, fill in n
#make install
Generate myext.so
Add extension=myext.so in php.ini
Use php -m to check whether the extension is installed successfully.
It’s quite troublesome. Use xampp to install it with one click. After completion, just change the security configuration
Find a Fedora or RHEL, select the httpd server during installation, and check its detailed settings for php support (I think it is installed by default) and mysql database server.
Just install it afterwards.
The rest is simple setup. The default web directory is in a subdirectory within /var/www/ (I forgot the details).
Or install ubuntu. The apt source includes apache (apacheLinux builds PHP extension development framework, Linux builds PHP framework_PHP tutorial may be called httpd), php, and mysql. After that, it’s just a simple setup.
But the process is best to google. Mainly depends on his settings. The default settings are not easy to use. The settings are different for each Linux distribution.
However, I have the impression that there is a special LAMP (Linux + Apache + Mysql + Php) system, which can be used directly after installing it. You can also try it out. However, please note that this system is intended for direct production use. In other words, there are generally no additional programs. It is possible that the machine you choose to run LAMP on is installed and can only be used as a web server alone, and cannot be developed or used for other purposes.