OneinStack is a one-click installation program that integrates Nginx, Apache, MySQL, PHP, Redis and other software, aiming to simplify the deployment and management of Web environments on Linux servers. This article will provide a detailed tutorial on the OneinStack PHP installation process and provide specific code examples to help readers better understand and operate.
Before you start installing OneinStack, you need to ensure that the server meets the following conditions:
Log in to SSH and use the wget
command to download the OneinStack script:
wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz
Unzip OneinStack:
tar xzf oneinstack-full.tar.gz cd oneinstack
Run the OneinStack script and select the software you want to install, select here Install PHP:
./install.sh
After PHP is installed, you can modify the PHP configuration file according to your needs, for example, modify the php.ini
file:
vi /usr/local/php/etc/php.ini
Restart the PHP service to make the configuration take effect:
/etc/init.d/php-fpm restart
Create info.php# in the root directory of the website ## File:
vi /home/wwwroot/default/info.php
info.php, enter the following:
<?php phpinfo(); ?>
, check the details of PHP to confirm that PHP is installed successfully.
# 安装PHP GD扩展 ./addons.sh install php-gd # 安装PHP Redis扩展 ./addons.sh install php-redis # 安装PHP Memcached扩展 ./addons.sh install php-memcached
The above is the detailed content of OneinStack detailed tutorial for installing PHP. For more information, please follow other related articles on the PHP Chinese website!