本文基于wlnmp一键安装包部署lnmp基础环境,当前安装系统CentOS7
1、添加epel源
1 |
yum install epel-release |
2、添加wlnmp一键安装包源
1 |
rpm -ivh https://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm |
3、安装nginx、php7.4、MySQL5.7
1 |
yum install wnginx wphp74 wmysql57 |
4、安装php一些额外的依赖
1 |
yum install wphp74-fileinfo wphp74-ldap wphp74-apcu wphp74-cas |
5、配置glpi目录,下载glpi
1 2 3 4 5 |
mkdir /data/www cd /data/www/ wget https://github.com/glpi-project/glpi/releases/download/9.5.3/glpi-9.5.3.tgz tar xf glpi-9.5.3.tgz chown -R www.www glpi/ |
6、配置MySQL数据库
默认密码为空,修改默认root密码,添加glpi用户并授权
1 |
mysql -uroot -p |
1 2 3 4 |
mysql> set password = password('wlnmp'); mysql> create database glpi character set utf8 collate utf8_bin; mysql> grant all privileges on glpi.* to glpi@localhost identified by 'glpi'; mysql> exit |
7、配置nginx
1 |
vim /usr/local/nginx/conf/vhost/demo.conf |
注意:server_name中的地址,改成你自己的
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
server { listen 80 default_server; server_name 10.10.10.100; index index.html index.htm index.php; root /data/www/glpi; error_page 500 502 503 504 /50x.html; include enable-php74.conf; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } access_log /data/logs/nginx/demo_access.log; error_log /data/logs/nginx/demo_error.log; } |
8、保存退出重启nginx
1 |
/etc/init.d/nginx restart |
9、安装GLPI
确保上面都是绿色的勾,在进行下一步,最后两项警告直接忽略掉,不用管
默认 登录名/密码是:
默认管理员帐号是 glpi/glpi
技术员帐号是 tech/tech
普通帐号是 normal/normal
只能发布的帐号是 post-only/postonly