Home >Operation and Maintenance >Linux Operation and Maintenance >How to use OneinStack for PHP installation in Linux
Download OneinStack
You can download OneinStack by visiting the following website:
http://oneinstack.com/software
On this page you will find the download link for OneinStack, select the version you need and download it.
Install OneinStack
After downloading OneinStack, unzip it and go to the unzipped directory and execute the following command To begin the installation:
./install.sh
During this time, you will be prompted for the following information:
- 选择要安装的软件版本(Nginx、MySQL、PHP等) - php.ini文件的路径 - 是否启用OPcache - 是否启用Memcached缓存 - 是否启用Redis缓存 - 是否设置MySQL root密码 - 是否允许远程访问MySQL
Select the correct options for your needs and follow each prompt.
Verify PHP installation
After the installation is complete, you can use the following command to check whether PHP was installed successfully:
php -v
If PHP has been installed correctly, you should see the output of the PHP version.
Configuring PHP
OneinStack comes with a default configuration file called php.ini. You can modify it as needed. The file is located at:
/usr/local/php/etc/php.ini
You can open the file using an editor such as nano or vi and make any changes you want. To ensure the changes take effect, please restart PHP after making the changes.
Add virtual hosts using OneinStack
OneinStack also provides a convenient way to add and manage virtual hosts . You can launch the web management interface using the following command:
./vhost.sh
During this time, you will be asked to enter your username and password to access the management interface. You can then use this interface to add new virtual hosts and make other changes you want.
The above is the detailed content of How to use OneinStack for PHP installation in Linux. For more information, please follow other related articles on the PHP Chinese website!