Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure the workerman server environment

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

What this article shares to you is about how to configure the workerman server environment. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

1. Purchase Ali Cloud centos server

2. Download Linux and install web environment with one click, and copy to the server

3. Execute one-click installation package (. / install.sh), which will automatically clean up the environment installed by the previous one-click installation package.

4. Select the appropriate software version according to your needs

5. Check the password:

Standard edition: cat / alidata/account.log

Professional version: cat / root/sh-1.5.4/account.log

Note: it may not be here, but in the download directory

6. Install phpwind and phpmyadmin

Enter your domain name or ip directly into the browser. If you visit phpwind for the first time, you will automatically jump to the installation page.

7. VI. Environmental catalogue and related operation commands

Website directory: / alidata/www server software directory: / alidata/serverMysql directory / alidata/server/mysql Php directory / alidata/server/php

Tomcat directory / alidata/server/tomcat7

If nginx is selected, there will be a nginx directory in / alidata/server/nginx/

The Nginx configuration file is in / alidata/server/nginx/conf

Add Nginx virtual host you can modify / alidata/server/nginx/conf/vhosts/phpwind.conf

If apache is selected, there will be a httpd directory in / alidata/server/httpd

The apache configuration file is in / alidata/server/httpd/conf

Add apache virtual host you can modify / alidata/server/httpd/conf/vhosts/phpwind.conf

Summary of each service operation command:

Nginx:

/ etc/init.d/nginx start/stop/restart/reload)

Apache:

/ etc/init.d/httpd start/stop/restart/...

Mysql:

/ etc/init.d/mysqld start/stop/restart/...

Php-fpm:/etc/init.d/php-fpm start/stop/restart/...

Tomcat:

/ etc/init.d/tomcat7 start/stop/restart/...

Ftp:

/ etc/init.d/vsftpd start/stop/restart/... For example, start nginx:

/ etc/init.d/nginx start

8 、

Install the workerman environment

Http://www.workerman.net/install

1. Run curl-Ss http://www.workerman.net/check.php in the command | php to check whether the local environment satisfies workerman.

He has no pcntl extension in this package and needs to install it himself, which has been a headache for me all day. But today suddenly enlightened, in fact, it is also very simple, but before the horn is sharp, has been making mistakes.

First of all, you need to enter the pcntl directory of the php source package

[root@iZ25pkurrazZ etc] # cd / mnt/sh-1.4.5/php-5.5.7/ext/pcntl/

And then

/ alidata/server/php-5.5.7/bin/phpize &. / configure & & make install

Note: if you report an error: configure: error: Cannot find php-config. Please use-with-php-config=PATH

Then you need to find php-config, find /-name php-config

Find / alidata/server/php-5.5.7/bin/php-config

So it should be:

/ alidata/server/php-5.5.7/bin/phpize &. / configure-- with-php-config=/alidata/server/php-5.5.7/bin/php-config & & make install

Then add the extension to php.ini, and that's fine. The previous error is because it was written in the wrong place. The php.ini of this package is in / alidata/server/php/etc/php.ini.

So we have to stop here, too.

[root@iZ25pkurrazZ pcntl] # echo "extension=pcntl.so" > > / alidata/server/php/etc/php.ini

If it is php-5.5.7, it is:

Echo "extension=pcntl.so" > > / alidata/server/php-5.5.7/etc/php.ini

Hey, it's over!

By the way, remember to restart php and server, apache or nginx

Restart

Nginx [root@iZ25pkurrazZ pcntl] # / etc/init.d/nginx restart

Restart php [root@iZ25pkurrazZ pcntl] # / etc/init.d/php-fpm restart

When using php-m, it is found that both PDO and pcntl extensions are available, and then use curl-Ss http://www.workerman.net/check.php | php to check.

9. Open phpmyadmin, create the database, and import the database file.

10. modify the user name and password of the project database.

11. Add and modify xx.conf virtual host file

12 enable phpinfo, which needs to be closed in php.ini; short_open_tag = Off, restart

The above is how to configure the workerman server environment, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report