Detailed steps for installing the openssl swoole and other extensions under linux
- 2020-05-12 06:38:53
- OfStack
OpenSSL is an open source ssl technology. Since I need to use php related functions, I need to get the files of https, so I have to install this thing. Below, I will introduce the detailed steps of installing openssl, swoole and other extensions under linux.
Compile the installation
Let's look at the compiled installation of php first. If you need to install a new extension, let's take installing the openssl extension as an example
1, find php source directory, the source is located in the/opt download here/php - 5.5.30, if I can't find it, check the php version, through wget http: / / cn2 php. net distributions/php - 5.5.30. tar. gz changed php - 5.5.30 to specific version can be downloaded again
2, switch to the source directory, find the corresponding extension package cd /opt/download/ php-5.5.30 /ext/openssl
3, find phpize directory (by whereis lookup), and then execute/usr local/bin/phpize
4. Some may report an error after execution, indicating that config.m4 cannot be found. The current directory config0.m4 is config.m4, which can be renamed directly (mv config0.m4 config.m4).
5,. / configure - with - openssl with - php - config = / usr/local/bin/php - config
6, make & & make install, a openssl.so file will be generated after successful execution
7. Look for: extension_dir = in php.ini file, and add extension= openssl.so in php.ini file
8. Restart apache and check whether the extension has been installed successfully through php-m or phpinfo
yum installation
Installing the extension is much easier with php installed with yum
yum install php-openssl
Install other extensions, such as the swoole extension, and do the same