How to deploy php game program

angryTom
Release: 2023-02-28 10:02:01
Original
2452 people have browsed it

How to deploy php game program

How to deploy php game program

Here we use centos7 server to explain how to deploy php game program.

There is no difference between deploying game programs and ordinary programs. The steps are to build a PHP execution environment and upload the source code to the web environment.

1. Install httpd

yum install httpd -y
Copy after login

2. Start httpd

systemctl start httpd
# service httpd start
Copy after login

3. Modify httpd Configuration, change the port to the port number required by the game

vim /etc/httpd/conf/httpd.conf
Copy after login

Find Listen 80 and change 80 to the port required by the game, such as: 8080

and then press esc - :wq Save and exit.

4. Restart the service

systemctl restart httpd
# service httpd restart
Copy after login

5. Install php

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Copy after login

Install php7

yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64
Copy after login

Install php-fpm

yum install php70w-fpm php70w-opcache
Copy after login

Start php-fpm

systemctl start php-fpm
Copy after login

Boot startup settings

systemctl enable php-fpm
systemctl daemon-reload
Copy after login

6. Upload the game source code to the website root directory

7. If you are using a vps, you need to set up a security group with the service provider to open the ports used by the game.

For more PHP related knowledge, please visit PHP Chinese website!

The above is the detailed content of How to deploy php game program. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template