192.168.200.120 | nginx、php-fpm、phpshe |
192.168.200.127 | mariadb |
nginx配置
[root@nginx ~]# vim /etc/nginx/conf.d/phpshe.conf
server {
listen 80;
server_name www.shop-phpshe.org;
root /code/phpshe;
location / {
index index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
[root@nginx phpshe]# systemctl reload nginx.service
代码包解压、授权
[root@nginx ~]# mkdir /code/phpshe
[root@nginx phpshe]# cd /code/phpshe/
[root@nginx phpshe]# yum -y install unar.x86_64
[root@nginx phpshe]# unar phpshe1.8.rar
[root@nginx phpshe]# ls
phpshe1.8 phpshe1.8.rar
[root@nginx phpshe]# mv phpshe1.8/* ./
[root@nginx phpshe]# ls
admin.php config.php hook index.php module PHPSHE安装升级说明.txt user.php
api.php data httpd.ini install phpshe1.8 robots.txt
common.php favicon.ico include license.php phpshe1.8.rar template
[root@nginx phpshe]# chown -R www.www /code/phpshe/
创建数据库
MariaDB [(none)]> create database phpshe;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all on *.* to phpshe@'%' identified by '111';
Query OK, 0 rows affected (0.00 sec)
浏览器访问
登录后台
## 先授权
[root@nginx phpshe]# chown -R www.www /var/lib/php/session/
- www.shop-phpshe/admin.php