Community Blog How to Setup ClipBucket with Nginx on CentOS 7

How to Setup ClipBucket with Nginx on CentOS 7

In this article, you will get some information on the installation of ClipBucket with Nginx on CentOS 7.

ClipBucket does not restrict its installation to any specific operating system (OS). You can use any operating system (OS) of your choice; however, the installation steps would vary according to the choice of operating system.

In this tutorial, we will be installing and configuring ClipBucket and Nginx on an Alibaba Cloud Elastic Compute Service (ECS) instance with CentOS 7.

Install RPMFusion Repository

For ClipBucket, you will require some backend multimedia software like FFmpeg and MP4Box. These software are needed to convert uploaded videos so they are compatible with the backend. These software are not available in Epel release or CentOS official repositories.

To install the backend multimedia software, you can check the commands here.

Install PHP and Extensions

After you have successfully installled the backedn multimedia software and MariaDB server, you will need to install and configure PHP-FPM daemon to process PHP. For installation of new version of PHP-FPM, REMI repository would be required. Follow the steps below to achieve the required things.

To install REMI repository, execute the following command.

sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y

To install the required extensions of PHP, execute the following command.

sudo yum install php70-php-cli php70-php-pecl-imagick php70-php-fpm php70-php-mysql php70-php-opcache -y

Create the backup of the file php-fpm.conf in directory /etc/opt/remi/php70/ and rename it to php-fpm.conf.real by executing the command below.

sudo mv /etc/opt/remi/php70/php-fpm.conf /etc/opt/remi/php70/php-fpm.conf.real

Create the backup of the file php.ini in directory /etc/opt/remi/php70/ and rename it to php.ini.real by executing the command below.

sudo mv /etc/opt/remi/php70/php.ini /etc/opt/remi/php70/php.ini.real

Make the backup of the file www.conf in directory /etc/opt/remi/php70/php-fpm.d/ and rename it to www.conf.real by executing the command below.

sudo mv /etc/opt/remi/php70/php-fpm.d/www.conf /etc/opt/remi/php70/php-fpm.d/www.conf.real

Create a new file named php-fpm.conf by executing the command below.

sudo su -c "echo -e 'include=/etc/opt/remi/php70/php-fpm.d/*.confn[global]ndaemonize = yesnemergency_restart_threshold = 2nemergency_restart_interval = 1mnerror_log = /var/log/php-fpm/php-fpm-7.0-error.lognpid = /var/run/php-fpm-7.0.pidnprocess_control_timeout = 10s' > /etc/opt/remi/php70/php-fpm.conf"

Create a new file named www.conf by executing the following command.

 sudo su -c "echo -e '[www]ngroup = apachenlisten = /var/run/php-fpm-7.0.socknlisten.backlog = 65536nlisten.owner = apachenlisten.group = apachenpm = staticnpm.max_children = 2npm.max_requests = 10240nuser = apache' > /etc/opt/remi/php70/php-fpm.d/www.conf"

Create a new file named php.ini by executing the following command.

sudo su -c "echo -e '[PHP]nallow_url_fopen = Onnalways_populate_raw_post_data = -1ndisplay_errors = Offnerror_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICTnexpose_php = Offnlog_errors = Onnmax_execution_time = 7201nmemory_limit = 256Mnoutput_buffering = 4096npost_max_size = 256Mnregister_argc_argv = Offnrequest_order = "GP"nupload_max_filesize = 256Mnvariables_order = "GPCS"n[Date]ndate.timezone = America/New_Yorkn[Session]nsession.cache_limiter =nsession.gc_divisor = 1000nsession.hash_bits_per_character = 5nsession.save_handler = filesnsession.save_path = "/var/opt/remi/php70/lib/php/session/"nurl_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"' > /etc/opt/remi/php70/php.ini"

Navigate to /var/log/ directory.

 cd /var/log

Create a folder / directory named php-fpm by using the command below.

 sudo mkdir php-fpm

Start php-fpm server and enable it to start it automatically after reboot.

sudo systemctl enable php70-php-fpm
sudo systemctl start php70-php-fpm

Now you have successfully installed PHP and Extensions, then you can install Nginx server and ClipBucket, create a Database, configure ClipBucket following the steps in this tutorial.

Related Blog Posts

How to Install NextCloud on CentOS 7

NextCloud is a free and open source self-hosted alternative to Dropbox or Google Drive. It lets you host your files onto your own private server, providing you full control over your data.

In this article, you will get some information on the installation of NextCloud on CentOS 7 with Alibaba Cloud ECS.

How to Install BookStack on CentOS 7

BookStack is a free and open source tool which helps you to create documentation for your project. It is a simple and self-hosted platform for organizing and storing information. It is written in the PHP programming language and uses the Laravel web framework. BookStack introduces an interesting approach to storage; your data is stored in a similar manner to Books, which are at the highest level, followed by Chapters, and then Pages.

Related Market Products

There are some products with php infrastructures built by partners can be quickly launched on Alibaba Cloud servers.

LNMP on Centos

the Installation of the software, is based on 1.3.3 version of one key installation package of linux in Alibaba Cloud , on this basis,compile and install the softwares with modifying and optimizing appropriate functions.

nginx + php combination has more efficient performance compared to a combination of apache + php , it is more suitable for high performance requirements of the site owner , such as electricity providers , forums and so on.

LAMP Stack PHP 7

Classical web application environment with LAMP stack and the next generation of PHP version 7. It also includes Selfmanagement Preset, a self-management, self-monitoring and self-healing components and phpMyAdmin, a web interface tool for the administration of MySQL.

Related Documentation

There are some documentation may be useful to you.


You can write codes based on Alibaba Cloud SDK to call an Alibaba Cloud API so as to flexibly deploy and quickly operate Alibaba Cloud products and services.

Cache PHP session variables

You may store some data in the global variable $_SESSION for convenient access when establishing a PHP website. The ini configuration file of PHP contains [Session] configurations for storing the data to a file or the Memcached server. The configuration item session.save_handler = memcached makes the decision. In most cases, the session data does not require persistence. The session information is cached into Memcached to improve the website performance.

Related Products

Container Service

Container Service provides the high-performance and scalable container application management service, which enables you to manage the lifecycle of containerized applications by using Docker and Kubernetes. Container Service provides multiple application release methods and the continuous delivery ability, and supports microservice architecture. By simplifying the setup of container cluster and integrating with the Alibaba Cloud abilities of virtualization, storage, network, and security, Container Service makes an ideal running cloud environment for containers.

ApsaraDB for Memcache

ApsaraDB for Memcache is a managed memory based caching service, which supports high-speed access to queries and data. ApsaraDB for Memcache improves the response of dynamic websites or applications by relieving the load on the backend database as cache data is stored in-memory.

Related Course

An Introduction to Application Containerization

This course is designed to help IT companies who want to containerize their business applications, as well as cloud computing engineers and cloud computing enthusiasts who want to learn container technologies. By learning this course, you can fully understand what the application containerization is, the layering theory of Docker image, the principle and common instructions of Dockerfile, common tools of application containerization, and how to deploy a containerized application based on Alibaba Cloud Container Service. So as to provide a reference for the evaluation, design and implementation of containerized applications.

0 0 0
Share on

Alibaba Clouder

1,141 posts | 190 followers

You may also like