LNMP平台下MySQL和Zabbix的故障排查

今午一个伙计问我你能不能帮忙排查一下 Zabbix 4.0 监控系统连不上数据库的原因,经查看 Zabbix 日志,发现有以下报告:

connection to database 'zabbix' failed:
Access denied for user 'zabbix'@'localhost' (using password: YES)
database is down: reconnecting in 10 seconds

重启MySQL数据库后,发现数据库一直无法启动,提示为:

Starting MySQL...The server quit without updating PID file [FAILED]b/mysql/localhost.localdomain.pid).

根据以往我在搭建 Zabbix 各个版本的监控系统中碰到过的情况判断:
提示
connection to database 'zabbix' failed:
Access denied for user 'zabbix'@'localhost' (using password: YES)
database is down: reconnecting in 10 seconds
是和 Zabbix 的数据存储数据库没有关系的,因为提示password的状态为YES,和可能和Zabbix的配置文件有关。Zabbix的配置文件zabbix_server.conf中的修改,建议在 vim中进行手敲字符的方式进行修改,不要在Windows等GUI环境中粘贴,也不要给其中的变量值加上单引号 '' 或双引号 ""。至于深层原因是什么,不得而知,但在实践中以手敲字符的方式修改后,Zabbix是不回载报告这个故障的。个人猜想,可能和字符编码识别有关,因为Unix中的UTF-8字符和Windows中的UTF-8字符还是有所差异的,这种情况在shell脚本中也会碰到。

至于重启MySQL数据库后不能再次启动,则和MySQL进程有关,可能和MySQL僵尸进程进程有关,也可能和关闭数据库系统时没有正确断开连接有关。还有一种可能是数据库安装后未进行适当的初始化相应的数据库权限有关,这里很可能是和 zabbix 数据库 的初始化权限有关。因为安装MySQL数据库时,很可能进行首次进行安装初始化后边直接投入到了生产系统中使用,一旦重启或节点 故障后重启就会提示MySQL进程未更新或者被占用。

以下是我根据这伙计的描述在即重新再CentOS上部署 Zabbix 4.0 时的搭建过程和故障排查:

Nginx:1.14.2
PHP:7.2
MySQL:5.7.30
Zabbix:4.0.6
CentOS:6.5和71804
【注意:因为我判断zabbix上遇到的故障和MySQL具体版本无关,就没有再问伙计用的MySQL详细版本,但也因该是MySQL 5.7系列的,我直接用了MySQL官网现在提供的 5.7.30 版本】

[GoogleBigTable@localhost ~]$ su - root
Password:
[root@localhost ~]# sestatus
SELinux status: disabled
[root@localhost ~]# service iptables stop

编译安装Nginx
[root@localhost ~]# yum -y install gcc gcc-c++ pcre-devel zlib-devel openssl openssl-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    Package gcc-4.4.7-23.el6.x86_64 already installed and latest version
    Package gcc-c++-4.4.7-23.el6.x86_64 already installed and latest version
    Package zlib-devel-1.2.3-29.el6.x86_64 already installed and latest version
    Package openssl-1.0.1e-58.el6_10.x86_64 already installed and latest version
    Package openssl-devel-1.0.1e-58.el6_10.x86_64 already installed and latest version
    Resolving Dependencies
    --> Running transaction check
    ---> Package pcre-devel.x86_64 0:7.8-7.el6 will be installed
    --> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
Package Arch Version Repository Size

Installing:
pcre-devel x86_64 7.8-7.el6 base 320 k

Transaction Summary

Install 1 Package(s)

Total download size: 320 k
Installed size: 957 k
Downloading Packages:
pcre-devel-7.8-7.el6.x86_64.rpm | 320 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : pcre-devel-7.8-7.el6.x86_64 1/1
Verifying : pcre-devel-7.8-7.el6.x86_64 1/1

Installed:
pcre-devel.x86_64 0:7.8-7.el6

Complete!
[root@localhost ~]#
[root@localhost ~]# groupadd nginx
[root@localhost ~]# useradd -s /sbin/nologin -g nginx -M nginx
[root@localhost ~]#
[root@localhost ~]# wget http://nginx.org/download/nginx-1.14.2.tar.gz
--2020-06-03 08:56:50-- http://nginx.org/download/nginx-1.14.2.tar.gz
Resolving nginx.org... 95.211.80.227, 62.210.92.35, 2001:1af8:4060:a004:21::e3
Connecting to nginx.org|95.211.80.227|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://117.128.6.28/cache/nginx.org/download/nginx-1.14.2.tar.gz?ich_args2=470-03085913058637_5b6f2632bf91b3cdae35405cfb43338b_10001002_9c896d2dd6c7f4d8933a518939a83798_ff478ef610d500dd7f20fe13dd251d7b [following]
--2020-06-03 08:56:50-- http://117.128.6.28/cache/nginx.org/download/nginx-1.14.2.tar.gz?ich_args2=470-03085913058637_5b6f2632bf91b3cdae35405cfb43338b_10001002_9c896d2dd6c7f4d8933a518939a83798_ff478ef610d500dd7f20fe13dd251d7b
Connecting to 117.128.6.28:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1015384 (992K) [application/octet-stream]
Saving to: “nginx-1.14.2.tar.gz”

100%[===================================================================================================================>] 1,015,384 2.29M/s in 0.4s

2020-06-03 08:56:51 (2.29 MB/s) - “nginx-1.14.2.tar.gz” saved [1015384/1015384]

[root@localhost ~]# ls -F
anaconda-ks.cfg install.log install.log.syslog nginx-1.14.2.tar.gz
[root@localhost ~]# tar -xzvf nginx-1.14.2.tar.gz
nginx-1.14.2/
nginx-1.14.2/auto/
nginx-1.14.2/conf/
nginx-1.14.2/contrib/
nginx-1.14.2/src/
nginx-1.14.2/configure
nginx-1.14.2/LICENSE
nginx-1.14.2/README
nginx-1.14.2/html/
nginx-1.14.2/man/
nginx-1.14.2/CHANGES.ru
nginx-1.14.2/CHANGES
nginx-1.14.2/man/nginx.8
nginx-1.14.2/html/50x.html
nginx-1.14.2/html/index.html
nginx-1.14.2/src/core/
nginx-1.14.2/src/event/
nginx-1.14.2/src/http/
nginx-1.14.2/src/mail/
nginx-1.14.2/src/misc/
nginx-1.14.2/src/os/
nginx-1.14.2/src/stream/
nginx-1.14.2/src/stream/ngx_stream.c
nginx-1.14.2/src/stream/ngx_stream.h
nginx-1.14.2/src/stream/ngx_stream_access_module.c
nginx-1.14.2/src/stream/ngx_stream_core_module.c
nginx-1.14.2/src/stream/ngx_stream_geo_module.c
nginx-1.14.2/src/stream/ngx_stream_geoip_module.c
nginx-1.14.2/src/stream/ngx_stream_handler.c
nginx-1.14.2/src/stream/ngx_stream_limit_conn_module.c
nginx-1.14.2/src/stream/ngx_stream_log_module.c
nginx-1.14.2/src/stream/ngx_stream_map_module.c
nginx-1.14.2/src/stream/ngx_stream_proxy_module.c
nginx-1.14.2/src/stream/ngx_stream_realip_module.c
nginx-1.14.2/src/stream/ngx_stream_return_module.c
nginx-1.14.2/src/stream/ngx_stream_script.c
nginx-1.14.2/src/stream/ngx_stream_script.h
nginx-1.14.2/src/stream/ngx_stream_split_clients_module.c
nginx-1.14.2/src/stream/ngx_stream_ssl_module.c
nginx-1.14.2/src/stream/ngx_stream_ssl_module.h
nginx-1.14.2/src/stream/ngx_stream_ssl_preread_module.c
nginx-1.14.2/src/stream/ngx_stream_upstream.c
nginx-1.14.2/src/stream/ngx_stream_upstream.h
nginx-1.14.2/src/stream/ngx_stream_upstream_hash_module.c
nginx-1.14.2/src/stream/ngx_stream_upstream_least_conn_module.c
nginx-1.14.2/src/stream/ngx_stream_upstream_round_robin.c
nginx-1.14.2/src/stream/ngx_stream_upstream_round_robin.h
nginx-1.14.2/src/stream/ngx_stream_upstream_zone_module.c
nginx-1.14.2/src/stream/ngx_stream_variables.c
nginx-1.14.2/src/stream/ngx_stream_variables.h
nginx-1.14.2/src/stream/ngx_stream_write_filter_module.c
nginx-1.14.2/src/os/unix/
nginx-1.14.2/src/os/unix/ngx_alloc.c
nginx-1.14.2/src/os/unix/ngx_alloc.h
nginx-1.14.2/src/os/unix/ngx_atomic.h
nginx-1.14.2/src/os/unix/ngx_channel.c
nginx-1.14.2/src/os/unix/ngx_channel.h
nginx-1.14.2/src/os/unix/ngx_daemon.c
nginx-1.14.2/src/os/unix/ngx_darwin.h
nginx-1.14.2/src/os/unix/ngx_darwin_config.h
nginx-1.14.2/src/os/unix/ngx_darwin_init.c
nginx-1.14.2/src/os/unix/ngx_darwin_sendfile_chain.c
nginx-1.14.2/src/os/unix/ngx_dlopen.c
nginx-1.14.2/src/os/unix/ngx_dlopen.h
nginx-1.14.2/src/os/unix/ngx_errno.c
nginx-1.14.2/src/os/unix/ngx_errno.h
nginx-1.14.2/src/os/unix/ngx_file_aio_read.c
nginx-1.14.2/src/os/unix/ngx_files.c
nginx-1.14.2/src/os/unix/ngx_files.h
nginx-1.14.2/src/os/unix/ngx_freebsd.h
nginx-1.14.2/src/os/unix/ngx_freebsd_config.h
nginx-1.14.2/src/os/unix/ngx_linux.h
nginx-1.14.2/src/os/unix/ngx_freebsd_init.c
nginx-1.14.2/src/os/unix/ngx_freebsd_sendfile_chain.c
nginx-1.14.2/src/os/unix/ngx_gcc_atomic_amd64.h
nginx-1.14.2/src/os/unix/ngx_gcc_atomic_ppc.h
nginx-1.14.2/src/os/unix/ngx_gcc_atomic_sparc64.h
nginx-1.14.2/src/os/unix/ngx_gcc_atomic_x86.h
nginx-1.14.2/src/os/unix/ngx_linux_aio_read.c
nginx-1.14.2/src/os/unix/ngx_linux_config.h
nginx-1.14.2/src/os/unix/ngx_linux_init.c
nginx-1.14.2/src/os/unix/ngx_linux_sendfile_chain.c
nginx-1.14.2/src/os/unix/ngx_os.h
nginx-1.14.2/src/os/unix/ngx_posix_config.h
nginx-1.14.2/src/os/unix/ngx_posix_init.c
nginx-1.14.2/src/os/unix/ngx_process.c
nginx-1.14.2/src/os/unix/ngx_process.h
nginx-1.14.2/src/os/unix/ngx_process_cycle.c
nginx-1.14.2/src/os/unix/ngx_process_cycle.h
nginx-1.14.2/src/os/unix/ngx_readv_chain.c
nginx-1.14.2/src/os/unix/ngx_recv.c
nginx-1.14.2/src/os/unix/ngx_send.c
nginx-1.14.2/src/os/unix/ngx_setaffinity.c
nginx-1.14.2/src/os/unix/ngx_setaffinity.h
nginx-1.14.2/src/os/unix/ngx_setproctitle.c
nginx-1.14.2/src/os/unix/ngx_setproctitle.h
nginx-1.14.2/src/os/unix/ngx_shmem.c
nginx-1.14.2/src/os/unix/ngx_shmem.h
nginx-1.14.2/src/os/unix/ngx_socket.c
nginx-1.14.2/src/os/unix/ngx_socket.h
nginx-1.14.2/src/os/unix/ngx_solaris.h
nginx-1.14.2/src/os/unix/ngx_solaris_config.h
nginx-1.14.2/src/os/unix/ngx_solaris_init.c
nginx-1.14.2/src/os/unix/ngx_solaris_sendfilev_chain.c
nginx-1.14.2/src/os/unix/ngx_sunpro_amd64.il
nginx-1.14.2/src/os/unix/ngx_sunpro_atomic_sparc64.h
nginx-1.14.2/src/os/unix/ngx_sunpro_sparc64.il
nginx-1.14.2/src/os/unix/ngx_thread.h
nginx-1.14.2/src/os/unix/ngx_sunpro_x86.il
nginx-1.14.2/src/os/unix/ngx_thread_cond.c
nginx-1.14.2/src/os/unix/ngx_thread_id.c
nginx-1.14.2/src/os/unix/ngx_thread_mutex.c
nginx-1.14.2/src/os/unix/ngx_time.c
nginx-1.14.2/src/os/unix/ngx_time.h
nginx-1.14.2/src/os/unix/ngx_udp_recv.c
nginx-1.14.2/src/os/unix/ngx_udp_send.c
nginx-1.14.2/src/os/unix/ngx_udp_sendmsg_chain.c
nginx-1.14.2/src/os/unix/ngx_user.c
nginx-1.14.2/src/os/unix/ngx_user.h
nginx-1.14.2/src/os/unix/ngx_writev_chain.c
nginx-1.14.2/src/misc/ngx_cpp_test_module.cpp
nginx-1.14.2/src/misc/ngx_google_perftools_module.c
nginx-1.14.2/src/mail/ngx_mail.c
nginx-1.14.2/src/mail/ngx_mail.h
nginx-1.14.2/src/mail/ngx_mail_auth_http_module.c
nginx-1.14.2/src/mail/ngx_mail_core_module.c
nginx-1.14.2/src/mail/ngx_mail_handler.c
nginx-1.14.2/src/mail/ngx_mail_imap_handler.c
nginx-1.14.2/src/mail/ngx_mail_imap_module.c
nginx-1.14.2/src/mail/ngx_mail_imap_module.h
nginx-1.14.2/src/mail/ngx_mail_parse.c
nginx-1.14.2/src/mail/ngx_mail_pop3_handler.c
nginx-1.14.2/src/mail/ngx_mail_pop3_module.c
nginx-1.14.2/src/mail/ngx_mail_pop3_module.h
nginx-1.14.2/src/mail/ngx_mail_proxy_module.c
nginx-1.14.2/src/mail/ngx_mail_smtp_handler.c
nginx-1.14.2/src/mail/ngx_mail_smtp_module.c
nginx-1.14.2/src/mail/ngx_mail_smtp_module.h
nginx-1.14.2/src/mail/ngx_mail_ssl_module.c
nginx-1.14.2/src/mail/ngx_mail_ssl_module.h
nginx-1.14.2/src/http/modules/
nginx-1.14.2/src/http/ngx_http.c
nginx-1.14.2/src/http/ngx_http.h
nginx-1.14.2/src/http/ngx_http_cache.h
nginx-1.14.2/src/http/ngx_http_config.h
nginx-1.14.2/src/http/ngx_http_copy_filter_module.c
nginx-1.14.2/src/http/ngx_http_core_module.c
nginx-1.14.2/src/http/ngx_http_core_module.h
nginx-1.14.2/src/http/ngx_http_file_cache.c
nginx-1.14.2/src/http/ngx_http_header_filter_module.c
nginx-1.14.2/src/http/ngx_http_parse.c
nginx-1.14.2/src/http/ngx_http_postpone_filter_module.c
nginx-1.14.2/src/http/ngx_http_request.c
nginx-1.14.2/src/http/ngx_http_request.h
nginx-1.14.2/src/http/ngx_http_request_body.c
nginx-1.14.2/src/http/ngx_http_script.c
nginx-1.14.2/src/http/v2/
nginx-1.14.2/src/http/ngx_http_script.h
nginx-1.14.2/src/http/ngx_http_special_response.c
nginx-1.14.2/src/http/ngx_http_upstream.c
nginx-1.14.2/src/http/ngx_http_upstream.h
nginx-1.14.2/src/http/ngx_http_upstream_round_robin.c
nginx-1.14.2/src/http/ngx_http_upstream_round_robin.h
nginx-1.14.2/src/http/ngx_http_variables.c
nginx-1.14.2/src/http/ngx_http_variables.h
nginx-1.14.2/src/http/ngx_http_write_filter_module.c
nginx-1.14.2/src/http/v2/ngx_http_v2.c
nginx-1.14.2/src/http/v2/ngx_http_v2.h
nginx-1.14.2/src/http/v2/ngx_http_v2_encode.c
nginx-1.14.2/src/http/v2/ngx_http_v2_filter_module.c
nginx-1.14.2/src/http/v2/ngx_http_v2_huff_decode.c
nginx-1.14.2/src/http/v2/ngx_http_v2_huff_encode.c
nginx-1.14.2/src/http/v2/ngx_http_v2_module.c
nginx-1.14.2/src/http/v2/ngx_http_v2_module.h
nginx-1.14.2/src/http/v2/ngx_http_v2_table.c
nginx-1.14.2/src/http/modules/ngx_http_access_module.c
nginx-1.14.2/src/http/modules/ngx_http_addition_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_auth_basic_module.c
nginx-1.14.2/src/http/modules/ngx_http_auth_request_module.c
nginx-1.14.2/src/http/modules/ngx_http_autoindex_module.c
nginx-1.14.2/src/http/modules/ngx_http_browser_module.c
nginx-1.14.2/src/http/modules/ngx_http_charset_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_chunked_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_dav_module.c
nginx-1.14.2/src/http/modules/ngx_http_degradation_module.c
nginx-1.14.2/src/http/modules/ngx_http_empty_gif_module.c
nginx-1.14.2/src/http/modules/ngx_http_fastcgi_module.c
nginx-1.14.2/src/http/modules/perl/
nginx-1.14.2/src/http/modules/ngx_http_flv_module.c
nginx-1.14.2/src/http/modules/ngx_http_geo_module.c
nginx-1.14.2/src/http/modules/ngx_http_geoip_module.c
nginx-1.14.2/src/http/modules/ngx_http_grpc_module.c
nginx-1.14.2/src/http/modules/ngx_http_gunzip_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_gzip_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_gzip_static_module.c
nginx-1.14.2/src/http/modules/ngx_http_headers_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_image_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_index_module.c
nginx-1.14.2/src/http/modules/ngx_http_limit_conn_module.c
nginx-1.14.2/src/http/modules/ngx_http_limit_req_module.c
nginx-1.14.2/src/http/modules/ngx_http_log_module.c
nginx-1.14.2/src/http/modules/ngx_http_map_module.c
nginx-1.14.2/src/http/modules/ngx_http_memcached_module.c
nginx-1.14.2/src/http/modules/ngx_http_mirror_module.c
nginx-1.14.2/src/http/modules/ngx_http_mp4_module.c
nginx-1.14.2/src/http/modules/ngx_http_not_modified_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_proxy_module.c
nginx-1.14.2/src/http/modules/ngx_http_random_index_module.c
nginx-1.14.2/src/http/modules/ngx_http_range_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_realip_module.c
nginx-1.14.2/src/http/modules/ngx_http_referer_module.c
nginx-1.14.2/src/http/modules/ngx_http_rewrite_module.c
nginx-1.14.2/src/http/modules/ngx_http_scgi_module.c
nginx-1.14.2/src/http/modules/ngx_http_secure_link_module.c
nginx-1.14.2/src/http/modules/ngx_http_slice_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_split_clients_module.c
nginx-1.14.2/src/http/modules/ngx_http_ssi_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_ssi_filter_module.h
nginx-1.14.2/src/http/modules/ngx_http_ssl_module.c
nginx-1.14.2/src/http/modules/ngx_http_ssl_module.h
nginx-1.14.2/src/http/modules/ngx_http_static_module.c
nginx-1.14.2/src/http/modules/ngx_http_stub_status_module.c
nginx-1.14.2/src/http/modules/ngx_http_sub_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_try_files_module.c
nginx-1.14.2/src/http/modules/ngx_http_upstream_hash_module.c
nginx-1.14.2/src/http/modules/ngx_http_upstream_ip_hash_module.c
nginx-1.14.2/src/http/modules/ngx_http_upstream_keepalive_module.c
nginx-1.14.2/src/http/modules/ngx_http_upstream_zone_module.c
nginx-1.14.2/src/http/modules/ngx_http_upstream_least_conn_module.c
nginx-1.14.2/src/http/modules/ngx_http_userid_filter_module.c
nginx-1.14.2/src/http/modules/ngx_http_uwsgi_module.c
nginx-1.14.2/src/http/modules/ngx_http_xslt_filter_module.c
nginx-1.14.2/src/http/modules/perl/Makefile.PL
nginx-1.14.2/src/http/modules/perl/nginx.pm
nginx-1.14.2/src/http/modules/perl/nginx.xs
nginx-1.14.2/src/http/modules/perl/ngx_http_perl_module.c
nginx-1.14.2/src/http/modules/perl/ngx_http_perl_module.h
nginx-1.14.2/src/http/modules/perl/typemap
nginx-1.14.2/src/event/modules/
nginx-1.14.2/src/event/ngx_event.c
nginx-1.14.2/src/event/ngx_event.h
nginx-1.14.2/src/event/ngx_event_accept.c
nginx-1.14.2/src/event/ngx_event_connect.c
nginx-1.14.2/src/event/ngx_event_connect.h
nginx-1.14.2/src/event/ngx_event_openssl.c
nginx-1.14.2/src/event/ngx_event_openssl.h
nginx-1.14.2/src/event/ngx_event_openssl_stapling.c
nginx-1.14.2/src/event/ngx_event_pipe.c
nginx-1.14.2/src/event/ngx_event_pipe.h
nginx-1.14.2/src/event/ngx_event_posted.c
nginx-1.14.2/src/event/ngx_event_posted.h
nginx-1.14.2/src/event/ngx_event_timer.c
nginx-1.14.2/src/event/ngx_event_timer.h
nginx-1.14.2/src/event/modules/ngx_devpoll_module.c
nginx-1.14.2/src/event/modules/ngx_epoll_module.c
nginx-1.14.2/src/event/modules/ngx_eventport_module.c
nginx-1.14.2/src/event/modules/ngx_kqueue_module.c
nginx-1.14.2/src/event/modules/ngx_poll_module.c
nginx-1.14.2/src/event/modules/ngx_select_module.c
nginx-1.14.2/src/event/modules/ngx_win32_select_module.c
nginx-1.14.2/src/core/nginx.c
nginx-1.14.2/src/core/nginx.h
nginx-1.14.2/src/core/ngx_array.c
nginx-1.14.2/src/core/ngx_array.h
nginx-1.14.2/src/core/ngx_buf.c
nginx-1.14.2/src/core/ngx_buf.h
nginx-1.14.2/src/core/ngx_conf_file.c
nginx-1.14.2/src/core/ngx_conf_file.h
nginx-1.14.2/src/core/ngx_config.h
nginx-1.14.2/src/core/ngx_connection.c
nginx-1.14.2/src/core/ngx_connection.h
nginx-1.14.2/src/core/ngx_core.h
nginx-1.14.2/src/core/ngx_cpuinfo.c
nginx-1.14.2/src/core/ngx_crc.h
nginx-1.14.2/src/core/ngx_crc32.c
nginx-1.14.2/src/core/ngx_crc32.h
nginx-1.14.2/src/core/ngx_crypt.c
nginx-1.14.2/src/core/ngx_crypt.h
nginx-1.14.2/src/core/ngx_cycle.c
nginx-1.14.2/src/core/ngx_cycle.h
nginx-1.14.2/src/core/ngx_file.c
nginx-1.14.2/src/core/ngx_file.h
nginx-1.14.2/src/core/ngx_hash.c
nginx-1.14.2/src/core/ngx_hash.h
nginx-1.14.2/src/core/ngx_inet.c
nginx-1.14.2/src/core/ngx_inet.h
nginx-1.14.2/src/core/ngx_list.c
nginx-1.14.2/src/core/ngx_list.h
nginx-1.14.2/src/core/ngx_log.c
nginx-1.14.2/src/core/ngx_log.h
nginx-1.14.2/src/core/ngx_md5.c
nginx-1.14.2/src/core/ngx_md5.h
nginx-1.14.2/src/core/ngx_module.c
nginx-1.14.2/src/core/ngx_module.h
nginx-1.14.2/src/core/ngx_murmurhash.c
nginx-1.14.2/src/core/ngx_murmurhash.h
nginx-1.14.2/src/core/ngx_open_file_cache.c
nginx-1.14.2/src/core/ngx_open_file_cache.h
nginx-1.14.2/src/core/ngx_output_chain.c
nginx-1.14.2/src/core/ngx_palloc.c
nginx-1.14.2/src/core/ngx_palloc.h
nginx-1.14.2/src/core/ngx_parse.c
nginx-1.14.2/src/core/ngx_parse.h
nginx-1.14.2/src/core/ngx_parse_time.c
nginx-1.14.2/src/core/ngx_queue.c
nginx-1.14.2/src/core/ngx_parse_time.h
nginx-1.14.2/src/core/ngx_proxy_protocol.c
nginx-1.14.2/src/core/ngx_proxy_protocol.h
nginx-1.14.2/src/core/ngx_queue.h
nginx-1.14.2/src/core/ngx_radix_tree.c
nginx-1.14.2/src/core/ngx_radix_tree.h
nginx-1.14.2/src/core/ngx_rbtree.c
nginx-1.14.2/src/core/ngx_rbtree.h
nginx-1.14.2/src/core/ngx_regex.c
nginx-1.14.2/src/core/ngx_regex.h
nginx-1.14.2/src/core/ngx_resolver.c
nginx-1.14.2/src/core/ngx_resolver.h
nginx-1.14.2/src/core/ngx_rwlock.c
nginx-1.14.2/src/core/ngx_rwlock.h
nginx-1.14.2/src/core/ngx_sha1.c
nginx-1.14.2/src/core/ngx_sha1.h
nginx-1.14.2/src/core/ngx_shmtx.c
nginx-1.14.2/src/core/ngx_shmtx.h
nginx-1.14.2/src/core/ngx_slab.c
nginx-1.14.2/src/core/ngx_slab.h
nginx-1.14.2/src/core/ngx_spinlock.c
nginx-1.14.2/src/core/ngx_string.c
nginx-1.14.2/src/core/ngx_string.h
nginx-1.14.2/src/core/ngx_syslog.c
nginx-1.14.2/src/core/ngx_syslog.h
nginx-1.14.2/src/core/ngx_thread_pool.c
nginx-1.14.2/src/core/ngx_thread_pool.h
nginx-1.14.2/src/core/ngx_times.c
nginx-1.14.2/src/core/ngx_times.h
nginx-1.14.2/contrib/README
nginx-1.14.2/contrib/geo2nginx.pl
nginx-1.14.2/contrib/unicode2nginx/
nginx-1.14.2/contrib/vim/
nginx-1.14.2/contrib/vim/ftdetect/
nginx-1.14.2/contrib/vim/ftplugin/
nginx-1.14.2/contrib/vim/indent/
nginx-1.14.2/contrib/vim/syntax/
nginx-1.14.2/contrib/vim/syntax/nginx.vim
nginx-1.14.2/contrib/vim/indent/nginx.vim
nginx-1.14.2/contrib/vim/ftplugin/nginx.vim
nginx-1.14.2/contrib/vim/ftdetect/nginx.vim
nginx-1.14.2/contrib/unicode2nginx/koi-utf
nginx-1.14.2/contrib/unicode2nginx/unicode-to-nginx.pl
nginx-1.14.2/contrib/unicode2nginx/win-utf
nginx-1.14.2/conf/fastcgi.conf
nginx-1.14.2/conf/fastcgi_params
nginx-1.14.2/conf/koi-utf
nginx-1.14.2/conf/koi-win
nginx-1.14.2/conf/mime.types
nginx-1.14.2/conf/nginx.conf
nginx-1.14.2/conf/scgi_params
nginx-1.14.2/conf/uwsgi_params
nginx-1.14.2/conf/win-utf
nginx-1.14.2/auto/cc/
nginx-1.14.2/auto/define
nginx-1.14.2/auto/endianness
nginx-1.14.2/auto/feature
nginx-1.14.2/auto/have
nginx-1.14.2/auto/have_headers
nginx-1.14.2/auto/headers
nginx-1.14.2/auto/include
nginx-1.14.2/auto/init
nginx-1.14.2/auto/install
nginx-1.14.2/auto/lib/
nginx-1.14.2/auto/make
nginx-1.14.2/auto/module
nginx-1.14.2/auto/modules
nginx-1.14.2/auto/nohave
nginx-1.14.2/auto/options
nginx-1.14.2/auto/os/
nginx-1.14.2/auto/sources
nginx-1.14.2/auto/stubs
nginx-1.14.2/auto/summary
nginx-1.14.2/auto/threads
nginx-1.14.2/auto/types/
nginx-1.14.2/auto/unix
nginx-1.14.2/auto/types/sizeof
nginx-1.14.2/auto/types/typedef
nginx-1.14.2/auto/types/uintptr_t
nginx-1.14.2/auto/types/value
nginx-1.14.2/auto/os/conf
nginx-1.14.2/auto/os/darwin
nginx-1.14.2/auto/os/freebsd
nginx-1.14.2/auto/os/linux
nginx-1.14.2/auto/os/solaris
nginx-1.14.2/auto/os/win32
nginx-1.14.2/auto/lib/conf
nginx-1.14.2/auto/lib/geoip/
nginx-1.14.2/auto/lib/google-perftools/
nginx-1.14.2/auto/lib/libatomic/
nginx-1.14.2/auto/lib/libgd/
nginx-1.14.2/auto/lib/libxslt/
nginx-1.14.2/auto/lib/make
nginx-1.14.2/auto/lib/openssl/
nginx-1.14.2/auto/lib/pcre/
nginx-1.14.2/auto/lib/perl/
nginx-1.14.2/auto/lib/zlib/
nginx-1.14.2/auto/lib/zlib/conf
nginx-1.14.2/auto/lib/zlib/make
nginx-1.14.2/auto/lib/zlib/makefile.bcc
nginx-1.14.2/auto/lib/zlib/makefile.msvc
nginx-1.14.2/auto/lib/zlib/makefile.owc
nginx-1.14.2/auto/lib/perl/conf
nginx-1.14.2/auto/lib/perl/make
nginx-1.14.2/auto/lib/pcre/conf
nginx-1.14.2/auto/lib/pcre/make
nginx-1.14.2/auto/lib/pcre/makefile.bcc
nginx-1.14.2/auto/lib/pcre/makefile.msvc
nginx-1.14.2/auto/lib/pcre/makefile.owc
nginx-1.14.2/auto/lib/openssl/conf
nginx-1.14.2/auto/lib/openssl/make
nginx-1.14.2/auto/lib/openssl/makefile.bcc
nginx-1.14.2/auto/lib/openssl/makefile.msvc
nginx-1.14.2/auto/lib/libxslt/conf
nginx-1.14.2/auto/lib/libgd/conf
nginx-1.14.2/auto/lib/libatomic/conf
nginx-1.14.2/auto/lib/libatomic/make
nginx-1.14.2/auto/lib/google-perftools/conf
nginx-1.14.2/auto/lib/geoip/conf
nginx-1.14.2/auto/cc/acc
nginx-1.14.2/auto/cc/bcc
nginx-1.14.2/auto/cc/ccc
nginx-1.14.2/auto/cc/clang
nginx-1.14.2/auto/cc/conf
nginx-1.14.2/auto/cc/gcc
nginx-1.14.2/auto/cc/icc
nginx-1.14.2/auto/cc/msvc
nginx-1.14.2/auto/cc/name
nginx-1.14.2/auto/cc/owc
nginx-1.14.2/auto/cc/sunc
[root@localhost ~]# ls -F
anaconda-ks.cfg install.log install.log.syslog nginx-1.14.2/ nginx-1.14.2.tar.gz
[root@localhost ~]# cd nginx-1.14.2
nginx-1.14.2/ nginx-1.14.2.tar.gz
[root@localhost ~]# cd nginx-1.14.2/
[root@localhost nginx-1.14.2]# ls -F
auto/ CHANGES CHANGES.ru conf/ configure* contrib/ html/ LICENSE man/ README src/
[root@localhost nginx-1.14.2]#
[root@localhost nginx-1.14.2]# ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_gunzip_module --with-http_gzip_static_module --user=nginx --group=nginx
..............................................................................................................
Configuration summary

  • using system PCRE library
  • using system OpenSSL library
  • using system zlib library

    nginx path prefix: "/usr/local/nginx"
    nginx binary file: "/usr/local/nginx/sbin/nginx"
    nginx modules path: "/usr/local/nginx/modules"
    nginx configuration prefix: "/usr/local/nginx/conf"
    nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
    nginx pid file: "/usr/local/nginx/logs/nginx.pid"
    nginx error log file: "/usr/local/nginx/logs/error.log"
    nginx http access log file: "/usr/local/nginx/logs/access.log"
    nginx http client request body temporary files: "client_body_temp"
    nginx http proxy temporary files: "proxy_temp"
    nginx http fastcgi temporary files: "fastcgi_temp"
    nginx http uwsgi temporary files: "uwsgi_temp"
    nginx http scgi temporary files: "scgi_temp"

[root@localhost nginx-1.14.2]# make && make install
.............................................................................................................
make[1]: Leaving directory `/root/nginx-1.14.2'
[root@localhost nginx-1.14.2]# /usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@localhost nginx-1.14.2]# /usr/local/nginx/sbin/nginx
[root@localhost nginx-1.14.2]# /usr/local/nginx/sbin/nginx -s reload
[root@localhost nginx-1.14.2]#
[root@localhost nginx-1.14.2]# ps -ef | grep nginx
root 9644 1 0 09:06 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
nginx 9656 9644 0 09:06 ? 00:00:00 nginx: worker process
root 9897 5557 0 09:10 pts/1 00:00:00 grep nginx
[root@localhost nginx-1.14.2]# netstat -antp | grep :
tcp 0 0 0.0.0.0:80 0.0.0.0: LISTEN 9644/nginx
tcp 0 0 192.168.122.1:53 0.0.0.0:
 LISTEN 4125/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN 3776/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:
 LISTEN 3408/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0: LISTEN 3873/master
tcp 0 0 0.0.0.0:45989 0.0.0.0:
 LISTEN 3367/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0: LISTEN 3181/rpcbind
tcp 0 0 :::22 :::
 LISTEN 3776/sshd
tcp 0 0 ::1:631 ::: LISTEN 3408/cupsd
tcp 0 0 ::1:25 :::
 LISTEN 3873/master
tcp 0 0 :::45220 ::: LISTEN 3367/rpc.statd
tcp 0 0 :::111 :::
 LISTEN 3181/rpcbind
[root@localhost nginx-1.14.2]#
[root@localhost nginx-1.14.2]# /usr/local/nginx/sbin/nginx -v
nginx version: nginx/1.14.2
[root@localhost nginx-1.14.2]# ls -F /usr/local/nginx/
client_body_temp/ conf/ fastcgi_temp/ html/ logs/ proxy_temp/ sbin/ scgi_temp/ uwsgi_temp/
[root@localhost nginx-1.14.2]# curl localhost
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>;
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>;

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
[root@localhost nginx-1.14.2]#

编译安装PHP 7.2.17
[root@localhost nginx-1.14.2]# yum -y install gcc libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 bzip2-devel.x86_64 libXpm-devel gmp-devel icu libicu libicu-devel php-mcrypt libmcrypt libmcrypt-devel libxslt-devel libjpeg libjpeg-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    Package gcc-4.4.7-23.el6.x86_64 already installed and latest version
    Package libxml2-2.7.6-21.el6_8.1.x86_64 already installed and latest version
    Package libxml2-devel-2.7.6-21.el6_8.1.x86_64 already installed and latest version
    Package openssl-1.0.1e-58.el6_10.x86_64 already installed and latest version
    Package openssl-devel-1.0.1e-58.el6_10.x86_64 already installed and latest version
    Package libcurl-devel-7.19.7-54.el6_10.x86_64 already installed and latest version
    No package libjpeg.x86_64 available.
    Package 2:libpng-1.2.49-2.el6_7.x86_64 already installed and latest version
    Package freetype-2.3.11-19.el6_10.x86_64 already installed and latest version
    No package libjpeg-devel.x86_64 available.
    Package 2:libpng-devel-1.2.49-2.el6_7.x86_64 already installed and latest version
    Package freetype-devel-2.3.11-19.el6_10.x86_64 already installed and latest version
    Package bzip2-devel-1.0.5-7.el6_0.x86_64 already installed and latest version
    Package libicu-4.2.1-15.el6_10.x86_64 already installed and latest version
    Package libxslt-devel-1.1.26-2.el6_3.1.x86_64 already installed and latest version
    Package libjpeg-turbo-1.2.1-3.el6_5.x86_64 already installed and latest version
    Package libjpeg-turbo-devel-1.2.1-3.el6_5.x86_64 already installed and latest version
    Resolving Dependencies
    --> Running transaction check
    ---> Package gmp-devel.x86_64 0:4.3.1-13.el6 will be installed
    ---> Package icu.x86_64 0:4.2.1-15.el6_10 will be installed
    ---> Package libXpm-devel.x86_64 0:3.5.10-2.el6 will be installed
    ---> Package libicu-devel.x86_64 0:4.2.1-15.el6_10 will be installed
    ---> Package libmcrypt.x86_64 0:2.5.8-9.el6 will be installed
    ---> Package libmcrypt-devel.x86_64 0:2.5.8-9.el6 will be installed
    ---> Package php-mcrypt.x86_64 0:5.3.3-5.el6 will be installed
    --> Processing Dependency: php(api) = 20090626 for package: php-mcrypt-5.3.3-5.el6.x86_64
    --> Processing Dependency: php(zend-abi) = 20090626 for package: php-mcrypt-5.3.3-5.el6.x86_64
    --> Running transaction check
    ---> Package php-common.x86_64 0:5.3.3-50.el6_10 will be installed
    --> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
Package Arch Version Repository Size

Installing:
gmp-devel x86_64 4.3.1-13.el6 base 171 k
icu x86_64 4.2.1-15.el6_10 updates 167 k
libXpm-devel x86_64 3.5.10-2.el6 base 33 k
libicu-devel x86_64 4.2.1-15.el6_10 updates 617 k
libmcrypt x86_64 2.5.8-9.el6 epel 96 k
libmcrypt-devel x86_64 2.5.8-9.el6 epel 12 k
php-mcrypt x86_64 5.3.3-5.el6 epel 19 k
Installing for dependencies:
php-common x86_64 5.3.3-50.el6_10 updates 530 k

Transaction Summary

Install 8 Package(s)

Total download size: 1.6 M
Installed size: 7.3 M
Downloading Packages:
(1/8): gmp-devel-4.3.1-13.el6.x86_64.rpm | 171 kB 00:00
(2/8): icu-4.2.1-15.el6_10.x86_64.rpm | 167 kB 00:00
(3/8): libXpm-devel-3.5.10-2.el6.x86_64.rpm | 33 kB 00:00
(4/8): libicu-devel-4.2.1-15.el6_10.x86_64.rpm | 617 kB 00:00
(5/8): libmcrypt-2.5.8-9.el6.x86_64.rpm | 96 kB 00:00
(6/8): libmcrypt-devel-2.5.8-9.el6.x86_64.rpm | 12 kB 00:00
(7/8): php-common-5.3.3-50.el6_10.x86_64.rpm | 530 kB 00:00
(8/8): php-mcrypt-5.3.3-5.el6.x86_64.rpm | 19 kB 00:00

Total 688 kB/s | 1.6 MB 00:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libmcrypt-2.5.8-9.el6.x86_64 1/8
Installing : php-common-5.3.3-50.el6_10.x86_64 2/8
Installing : php-mcrypt-5.3.3-5.el6.x86_64 3/8
Installing : libmcrypt-devel-2.5.8-9.el6.x86_64 4/8
Installing : libicu-devel-4.2.1-15.el6_10.x86_64 5/8
Installing : gmp-devel-4.3.1-13.el6.x86_64 6/8
Installing : libXpm-devel-3.5.10-2.el6.x86_64 7/8
Installing : icu-4.2.1-15.el6_10.x86_64 8/8
Verifying : icu-4.2.1-15.el6_10.x86_64 1/8
Verifying : libXpm-devel-3.5.10-2.el6.x86_64 2/8
Verifying : gmp-devel-4.3.1-13.el6.x86_64 3/8
Verifying : php-mcrypt-5.3.3-5.el6.x86_64 4/8
Verifying : libmcrypt-devel-2.5.8-9.el6.x86_64 5/8
Verifying : libicu-devel-4.2.1-15.el6_10.x86_64 6/8
Verifying : php-common-5.3.3-50.el6_10.x86_64 7/8
Verifying : libmcrypt-2.5.8-9.el6.x86_64 8/8

Installed:
gmp-devel.x86_64 0:4.3.1-13.el6 icu.x86_64 0:4.2.1-15.el6_10 libXpm-devel.x86_64 0:3.5.10-2.el6 libicu-devel.x86_64 0:4.2.1-15.el6_10
libmcrypt.x86_64 0:2.5.8-9.el6 libmcrypt-devel.x86_64 0:2.5.8-9.el6 php-mcrypt.x86_64 0:5.3.3-5.el6

Dependency Installed:
php-common.x86_64 0:5.3.3-50.el6_10

Complete!
[root@localhost nginx-1.14.2]#
[root@localhost nginx-1.14.2]# cd ~
[root@localhost ~]# ls -F
anaconda-ks.cfg install.log install.log.syslog nginx-1.14.2/ nginx-1.14.2.tar.gz
[root@localhost ~]# wget https://www.php.net/distributions/php-7.2.17.tar.bz2
--2020-06-03 09:37:42-- https://www.php.net/distributions/php-7.2.17.tar.bz2
Resolving www.php.net... 185.85.0.29, 2a02:cb40:200::1ad
Connecting to www.php.net|185.85.0.29|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15060211 (14M) [application/octet-stream]
Saving to: “php-7.2.17.tar.bz2”

100%[===================================================================================================================>] 15,060,211 165K/s in 1m 55s

2020-06-03 09:39:38 (128 KB/s) - “php-7.2.17.tar.bz2” saved [15060211/15060211]

[root@localhost ~]#
[root@localhost ~]# tar -xjvf php-7.2.17.tar.bz2
.......................................................................................
php-7.2.17/scripts/dev/generate-phpt/src/testcase/gtBasicTestCaseFunction.php
[root@localhost ~]# cd php-7.2.17
php-7.2.17/ php-7.2.17.tar.bz2
[root@localhost ~]# cd php-7.2.17/
[root@localhost php-7.2.17]# ls -F
acinclude.m4 CREDITS makedist README.EXT_SKEL README.TESTING travis/
aclocal.m4 ext/ Makefile.frag README.GIT-RULES README.TESTING2 TSRM/
appveyor/ EXTENSIONS Makefile.gcov README.input_filter README.UNIX-BUILD-SYSTEM UPGRADING
build/ footer Makefile.global README.MAILINGLIST_RULES README.WIN32-BUILD-SYSTEM UPGRADING.INTERNALS
buildconf
 generated_lists missing README.md run-tests.php vcsclean
buildconf.bat genfiles mkinstalldirs README.NEW-OUTPUT-API sapi/ win32/
CODING_STANDARDS header NEWS README.PARAMETER_PARSING_API scripts/ Zend/
config.guess INSTALL pear/ README.REDIST.BINS server-tests-config.php

config.sub install-sh php7.spec.in README.RELEASE_PROCESS server-tests.php
configure LICENSE php.gif README.SELF-CONTAINED-EXTENSIONS snapshot*
configure.ac ltmain.sh php.ini-development README.STREAMS stamp-h.in
CONTRIBUTING.md main/ php.ini-production README.SUBMITTING_PATCH tests/
[root@localhost php-7.2.17]#
[root@localhost php-7.2.17]# ./configure --prefix=/usr/local/php --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-gd --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --without-pear --with-pcre-regex --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --with-openssl --with-fpm-user=nginx --with-fpm-group=nginx --with-libdir=/lib/x86_64-linux-gnu/--enable-ftp --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm --with-iconv --with-xpm-dir=/usr
.....................................................................................................................
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+

Thank you for using PHP.

config.status: creating php7.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/fpm/php-fpm.conf
config.status: creating sapi/fpm/www.conf
config.status: creating sapi/fpm/init.d.php-fpm
config.status: creating sapi/fpm/php-fpm.service
config.status: creating sapi/fpm/php-fpm.8
config.status: creating sapi/fpm/status.html
config.status: creating sapi/phpdbg/phpdbg.1
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
[root@localhost php-7.2.17]# make && make install
.....................................................................................................
Installing man pages: /usr/local/php/php/man/man1/
page: phpize.1
page: php-config.1
/root/php-7.2.17/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin
ln -s -f phar.phar /usr/local/php/bin/phar
Installing PDO headers: /usr/local/php/include/php/ext/pdo/
[root@localhost php-7.2.17]#
[root@localhost php-7.2.17]# cp php.ini-development /usr/local/php/lib/php.ini
[root@localhost php-7.2.17]# gedit /etc/profile

(gedit:97589): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.0BYHL0': No such file or directory

(gedit:97589): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:97589): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.A9FML0': No such file or directory

(gedit:97589): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:97589): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.W9GNL0': No such file or directory

(gedit:97589): Gtk-WARNING *: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
[root@localhost php-7.2.17]# source /etc/profile
[root@localhost php-7.2.17]# cat -n /etc/profile
1 # /etc/profile
2
3 # System wide environment and startup programs, for login setup
4 # Functions and aliases go in /etc/bashrc
5
6 # It's NOT a good idea to change this file unless you know what you
7 # are doing. It's much better to create a custom.sh shell script in
8 # /etc/profile.d/ to make custom changes to your environment, as this
9 # will prevent the need for merging in future updates.
10
11 pathmunge () {
12 case ":${PATH}:" in
13 
:"$1":)
14 ;;
15 
)
16 if [ "$2" = "after" ] ; then
17 PATH=$PATH:$1
18 else
19 PATH=$1:$PATH
20 fi
21 esac
22 }
23
24
25 if [ -x /usr/bin/id ]; then
26 if [ -z "$EUID" ]; then
27 # ksh workaround
28 EUID=/usr/bin/id -u
29 UID=/usr/bin/id -ru
30 fi
31 USER="/usr/bin/id -un"
32 LOGNAME=$USER
33 MAIL="/var/spool/mail/$USER"
34 fi
35
36 # Path manipulation
37 if [ "$EUID" = "0" ]; then
38 pathmunge /sbin
39 pathmunge /usr/sbin
40 pathmunge /usr/local/sbin
41 else
42 pathmunge /usr/local/sbin after
43 pathmunge /usr/sbin after
44 pathmunge /sbin after
45 fi
46
47 HOSTNAME=/bin/hostname 2&gt;/dev/null
48 HISTSIZE=1000
49 if [ "$HISTCONTROL" = "ignorespace" ] ; then
50 export HISTCONTROL=ignoreboth
51 else
52 export HISTCONTROL=ignoredups
53 fi
54
55 export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
56
57 # By default, we want umask to get set. This sets it for login shell
58 # Current threshold for system reserved uid/gids is 200
59 # You could check uidgid reservation validity in
60 # /usr/share/doc/setup-/uidgid file
61 if [ $UID -gt 199 ] && [ "/usr/bin/id -gn" = "/usr/bin/id -un" ]; then
62 umask 002
63 else
64 umask 022
65 fi
66
67 for i in /etc/profile.d/
.sh ; do
68 if [ -r "$i" ]; then
69 if [ "${-#i}" != "$-" ]; then
70 . "$i"
71 else
72 . "$i" >/dev/null 2>&1
73 fi
74 fi
75 done
76
77 unset i
78 unset -f pathmunge
79
80 PATH=$PATH:/usr/local/php/bin
81
82 export PATH
[root@localhost php-7.2.17]#
[root@localhost php-7.2.17]# ls -F
acinclude.m4 configure
 install-sh Makefile.objects README.GIT-RULES README.TESTING2 TSRM/
aclocal.m4 configure.ac libs/ missing README.input_filter README.UNIX-BUILD-SYSTEM UPGRADING
appveyor/ CONTRIBUTING.md libtool mkinstalldirs README.MAILINGLIST_RULES README.WIN32-BUILD-SYSTEM UPGRADING.INTERNALS
build/ CREDITS LICENSE modules/ README.md run-tests.php
 vcsclean
buildconf ext/ ltmain.sh NEWS README.NEW-OUTPUT-API sapi/ win32/
buildconf.bat EXTENSIONS main/ pear/ README.PARAMETER_PARSING_API scripts/ Zend/
CODING_STANDARDS footer makedist php7.spec README.REDIST.BINS server-tests-config.php
config.guess generated_lists Makefile php7.spec.in README.RELEASE_PROCESS server-tests.php
config.log genfiles Makefile.frag php.gif README.SELF-CONTAINED-EXTENSIONS snapshot
config.nice header Makefile.fragments php.ini-development README.STREAMS stamp-h.in
config.status include/ Makefile.gcov php.ini-production README.SUBMITTING_PATCH tests/
config.sub INSTALL Makefile.global README.EXT_SKEL README.TESTING travis/
[root@localhost php-7.2.17]# cd sapi/
[root@localhost sapi]# ls -F
apache2handler/ cgi/ cli/ embed/ fpm/ litespeed/ phpdbg/ tests/
[root@localhost sapi]# cd fpm/
[root@localhost fpm]# ls -F
config.m4 fpm/ init.d.php-fpm.in Makefile.frag php-fpm.8 php-fpm.conf php-fpm.service status.html tests/ www.conf.in
CREDITS init.d.php-fpm LICENSE php-fpm
 php-fpm.8.in php-fpm.conf.in php-fpm.service.in status.html.in www.conf
[root@localhost fpm]# pwd -P
/root/php-7.2.17/sapi/fpm
[root@localhost fpm]# cp init.d.php-fpm /etc/init.d/php-fpm
[root@localhost fpm]# chmod +x /etc/init.d/php-fpm
[root@localhost fpm]# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
[root@localhost fpm]# service php-fpm start
Starting php-fpm [03-Jun-2020 10:31:00] WARNING: Nothing matches the include pattern '/usr/local/php/etc/php-fpm.d/*.conf' from /usr/local/php/etc/php-fpm.conf at line 125.
[03-Jun-2020 10:31:00] ERROR: No pool defined. at least one pool section must be specified in config file
[03-Jun-2020 10:31:00] ERROR: failed to post process the configuration
[03-Jun-2020 10:31:00] ERROR: FPM initialization failed
failed
[root@localhost fpm]#
[root@localhost fpm]# cd /usr/local/php/etc/php-fpm.d/
[root@localhost php-fpm.d]# ls -F
www.conf.default
[root@localhost php-fpm.d]# cp www.conf.default www.conf
[root@localhost php-fpm.d]# /usr/local/php/sbin/php-fpm -t
[03-Jun-2020 10:37:12] NOTICE: configuration file /usr/local/php/etc/php-fpm.conf test is successful

[root@localhost php-fpm.d]# service php-fpm start
Starting php-fpm done
[root@localhost php-fpm.d]# php -v
PHP 7.2.17 (cli) (built: Jun 3 2020 10:23:53) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
[root@localhost php-fpm.d]#

安装MySQL
[root@localhost ~]# wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz
--2020-06-03 11:19:53-- https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz
Resolving cdn.mysql.com... 104.74.21.42
Connecting to cdn.mysql.com|104.74.21.42|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 660017902 (629M) [application/x-tar-gz]
Saving to: “mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz”

100%[===================================================================================================================>] 660,017,902 1.05M/s in 10m 36s

2020-06-03 11:30:30 (1014 KB/s) - “mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz” saved [660017902/660017902]

[root@localhost ~]# rpm -qa | grep mysql
mysql-5.1.73-8.el6_8.x86_64
mysql-libs-5.1.73-8.el6_8.x86_64
mysql-devel-5.1.73-8.el6_8.x86_64
[root@localhost ~]# rpm -qa | grep mari
[root@localhost ~]# rpm -e --nodeps mysql-5.1.73-8.el6_8.x86_64
[root@localhost ~]# rpm -qa | grep mysql
mysql-libs-5.1.73-8.el6_8.x86_64
mysql-devel-5.1.73-8.el6_8.x86_64
[root@localhost ~]# rpm -e --nodeps mysql-libs-5.1.73-8.el6_8.x86_64
[root@localhost ~]# rpm -e --nodeps mysql-devel-5.1.73-8.el6_8.x86_64
[root@localhost ~]# rpm -qa | grep mysql
[root@localhost ~]# cat -n /etc/my.cnf
cat: /etc/my.cnf: No such file or directory
[root@localhost ~]#
[root@localhost ~]# tar -xzvf mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz -C /usr/local/
mysql-5.7.30-linux-glibc2.12-x86_64/bin/myisam_ftdump
mysql-5.7.30-linux-glibc2.12-x86_64/bin/myisamchk
mysql-5.7.30-linux-glibc2.12-x86_64/bin/myisamlog
mysql-5.7.30-linux-glibc2.12-x86_64/bin/myisampack
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysql
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysql_client_test_embedded
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysql_config_editor
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysql_embedded
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysql_install_db
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysql_plugin
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysql_secure_installation
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysql_ssl_rsa_setup
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysql_tzinfo_to_sql
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysql_upgrade
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqladmin
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqlbinlog
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqlcheck
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqldump
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqlimport
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqlpump
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqlshow
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqlslap
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqltest_embedded
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqlxtest
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqld-debug
mysql-5.7.30-linux-glibc2.12-x86_64/lib/libmysqld-debug.a
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysqlx_ername.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysqlx_error.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysqlx_version.h
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysql_config
mysql-5.7.30-linux-glibc2.12-x86_64/include/big_endian.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/binary_log_types.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/byte_order_generic.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/byte_order_generic_x86.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/decimal.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/errmsg.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/keycache.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/little_endian.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/m_ctype.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/m_string.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_alloc.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_byteorder.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_command.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_compiler.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_config.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_dbug.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_dir.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_getopt.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_global.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_list.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_sys.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_thread.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_thread_local.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/my_xml.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/client_authentication.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/client_plugin.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/client_plugin.h.pp
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/com_data.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/get_password.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/group_replication_priv.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/innodb_priv.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/mysql_lex_string.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_audit.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_audit.h.pp
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_auth.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_auth.h.pp
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_auth_common.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_ftparser.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_ftparser.h.pp
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_group_replication.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_keyring.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_keyring.h.pp
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_trace.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/plugin_validate_password.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_file.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_idle.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_mdl.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_memory.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_ps.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_socket.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_sp.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_stage.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_statement.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_table.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_thread.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/mysql_transaction.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/psi.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/psi_base.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/psi/psi_memory.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_command.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_locking.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_my_plugin_log.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_my_snprintf.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_mysql_alloc.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_mysql_keyring.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_mysql_password_policy.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_mysql_string.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_parser.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_rpl_transaction_ctx.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_rpl_transaction_write_set.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_rules_table.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_security_context.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_srv_session.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_srv_session_info.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_ssl_wrapper.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_thd_alloc.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_thd_engine_lock.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_thd_wait.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/service_thread_scheduler.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/services.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/services.h.pp
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/thread_pool_priv.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql/thread_type.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql_com.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql_com_server.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql_embed.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql_time.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysql_version.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysqld_ername.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/mysqld_error.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/plugin.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/plugin_audit.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/plugin_ftparser.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/plugin_group_replication.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/plugin_keyring.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/plugin_validate_password.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/sql_common.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/sql_state.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/sslopt-case.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/sslopt-longopts.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/sslopt-vars.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/thr_cond.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/thr_mutex.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/thr_rwlock.h
mysql-5.7.30-linux-glibc2.12-x86_64/include/typelib.h
mysql-5.7.30-linux-glibc2.12-x86_64/lib/libmysqlclient.a
mysql-5.7.30-linux-glibc2.12-x86_64/lib/libmysqlservices.a
mysql-5.7.30-linux-glibc2.12-x86_64/lib/pkgconfig/mysqlclient.pc
mysql-5.7.30-linux-glibc2.12-x86_64/share/aclocal/mysql.m4
mysql-5.7.30-linux-glibc2.12-x86_64/docs/ChangeLog
mysql-5.7.30-linux-glibc2.12-x86_64/docs/INFO_SRC
mysql-5.7.30-linux-glibc2.12-x86_64/lib/libmysqld.a
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/comp_err.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/innochecksum.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/lz4_decompress.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/my_print_defaults.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/myisam_ftdump.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/myisamchk.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/myisamlog.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/myisampack.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysql.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysql.server.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysql_config.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysql_config_editor.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysql_install_db.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysql_plugin.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysql_secure_installation.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysql_ssl_rsa_setup.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysql_tzinfo_to_sql.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysql_upgrade.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqladmin.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqlbinlog.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqlcheck.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqld_multi.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqld_safe.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqldump.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqldumpslow.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqlimport.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqlman.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqlpump.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqlshow.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/mysqlslap.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/perror.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/replace.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/resolve_stack_dump.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/resolveip.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man1/zlib_decompress.1
mysql-5.7.30-linux-glibc2.12-x86_64/man/man8/mysqld.8
mysql-5.7.30-linux-glibc2.12-x86_64/LICENSE
mysql-5.7.30-linux-glibc2.12-x86_64/README
mysql-5.7.30-linux-glibc2.12-x86_64/bin/innochecksum
mysql-5.7.30-linux-glibc2.12-x86_64/bin/lz4_decompress
mysql-5.7.30-linux-glibc2.12-x86_64/bin/my_print_defaults
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqld
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqld_multi
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqld_safe
mysql-5.7.30-linux-glibc2.12-x86_64/bin/mysqldumpslow
mysql-5.7.30-linux-glibc2.12-x86_64/bin/perror
mysql-5.7.30-linux-glibc2.12-x86_64/bin/replace
mysql-5.7.30-linux-glibc2.12-x86_64/bin/resolve_stack_dump
mysql-5.7.30-linux-glibc2.12-x86_64/bin/resolveip
mysql-5.7.30-linux-glibc2.12-x86_64/bin/zlib_decompress
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/char.bin
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/dicrc
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/left-id.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/matrix.bin
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/pos-id.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/rewrite.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/right-id.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/sys.dic
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_euc-jp/unk.dic
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/char.bin
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/dicrc
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/left-id.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/matrix.bin
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/pos-id.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/rewrite.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/right-id.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/sys.dic
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_sjis/unk.dic
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/char.bin
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/dicrc
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/left-id.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/matrix.bin
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/pos-id.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/rewrite.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/right-id.def
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/sys.dic
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/dic/ipadic_utf-8/unk.dic
mysql-5.7.30-linux-glibc2.12-x86_64/lib/mecab/etc/mecabrc
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/adt_null.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/auth_socket.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/authentication_ldap_sasl_client.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/connection_control.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/adt_null.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/auth_socket.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/authentication_ldap_sasl_client.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/connection_control.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/group_replication.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/ha_example.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/innodb_engine.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/keyring_file.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/keyring_udf.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libmemcached.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libpluginmecab.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_framework.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_services.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_services_threaded.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_session_detach.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_session_in_thd.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_session_info.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_2_sessions.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_all_col_types.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_cmds_1.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_commit.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_complex.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_errors.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_lock.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_processlist.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_replication.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_shutdown.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_sqlmode.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_stored_procedures_functions.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_sql_views_triggers.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_x_sessions_deinit.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/libtest_x_sessions_init.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/locking_service.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/mypluglib.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/mysql_no_login.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/mysqlx.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/rewrite_example.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/rewriter.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/semisync_master.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/semisync_slave.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/test_security_context.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/test_udf_services.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/validate_password.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/debug/version_token.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/group_replication.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/ha_example.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/innodb_engine.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/keyring_file.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/keyring_udf.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libmemcached.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libpluginmecab.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_framework.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_services.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_services_threaded.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_session_detach.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_session_in_thd.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_session_info.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_2_sessions.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_all_col_types.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_cmds_1.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_commit.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_complex.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_errors.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_lock.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_processlist.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_replication.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_shutdown.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_sqlmode.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_stored_procedures_functions.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_sql_views_triggers.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_x_sessions_deinit.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/libtest_x_sessions_init.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/locking_service.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/mypluglib.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/mysql_no_login.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/mysqlx.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/rewrite_example.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/rewriter.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/semisync_master.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/semisync_slave.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/test_security_context.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/test_udf_services.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/validate_password.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/plugin/version_token.so
mysql-5.7.30-linux-glibc2.12-x86_64/share/bulgarian/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/Index.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/README
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/armscii8.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/ascii.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/cp1250.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/cp1251.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/cp1256.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/cp1257.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/cp850.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/cp852.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/cp866.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/dec8.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/geostd8.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/greek.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/hebrew.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/hp8.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/keybcs2.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/koi8r.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/koi8u.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/latin1.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/latin2.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/latin5.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/latin7.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/macce.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/macroman.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/charsets/swe7.xml
mysql-5.7.30-linux-glibc2.12-x86_64/share/czech/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/danish/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/dictionary.txt
mysql-5.7.30-linux-glibc2.12-x86_64/share/dutch/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/english/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/errmsg-utf8.txt
mysql-5.7.30-linux-glibc2.12-x86_64/share/estonian/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/fill_help_tables.sql
mysql-5.7.30-linux-glibc2.12-x86_64/share/french/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/german/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/greek/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/hungarian/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/innodb_memcached_config.sql
mysql-5.7.30-linux-glibc2.12-x86_64/share/italian/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/japanese/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/korean/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/mysql_security_commands.sql
mysql-5.7.30-linux-glibc2.12-x86_64/share/mysql_sys_schema.sql
mysql-5.7.30-linux-glibc2.12-x86_64/share/mysql_system_tables.sql
mysql-5.7.30-linux-glibc2.12-x86_64/share/mysql_system_tables_data.sql
mysql-5.7.30-linux-glibc2.12-x86_64/share/mysql_test_data_timezone.sql
mysql-5.7.30-linux-glibc2.12-x86_64/share/norwegian-ny/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/norwegian/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/polish/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/portuguese/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/romanian/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/russian/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/serbian/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/slovak/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/spanish/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/swedish/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/share/ukrainian/errmsg.sys
mysql-5.7.30-linux-glibc2.12-x86_64/support-files/mysql-log-rotate
mysql-5.7.30-linux-glibc2.12-x86_64/support-files/mysqld_multi.server
mysql-5.7.30-linux-glibc2.12-x86_64/lib/libmysqlclient.so
mysql-5.7.30-linux-glibc2.12-x86_64/lib/libmysqlclient.so.20
mysql-5.7.30-linux-glibc2.12-x86_64/lib/libmysqlclient.so.20.3.17
mysql-5.7.30-linux-glibc2.12-x86_64/share/install_rewriter.sql
mysql-5.7.30-linux-glibc2.12-x86_64/share/uninstall_rewriter.sql
mysql-5.7.30-linux-glibc2.12-x86_64/support-files/magic
mysql-5.7.30-linux-glibc2.12-x86_64/support-files/mysql.server
mysql-5.7.30-linux-glibc2.12-x86_64/docs/INFO_BIN
mysql-5.7.30-linux-glibc2.12-x86_64/docs/INFO_SRC
[root@localhost ~]#

[root@localhost ~]# cd /usr/local/
[root@localhost local]# ls -F
bin/ etc/ games/ include/ lib/ lib64/ libexec/ mysql-5.7.30-linux-glibc2.12-x86_64/ nginx/ php/ sbin/ share/ src/
[root@localhost local]# mv mysql-5.7.30-linux-glibc2.12-x86_64/ mysql
[root@localhost local]# ls -F
bin/ etc/ games/ include/ lib/ lib64/ libexec/ mysql/ nginx/ php/ sbin/ share/ src/
[root@localhost local]# id mysql
id: mysql: No such user
[root@localhost local]# groupadd mysql
[root@localhost local]# useradd -r -s /sbin/nologin -g mysql mysql -d /usr/local/mysql
[root@localhost local]# id mysql
uid=494(mysql) gid=502(mysql) groups=502(mysql)
[root@localhost local]# chown -R mysql mysql/
[root@localhost local]# chgrp -R mysql mysql/
[root@localhost local]# cd mysql/
[root@localhost mysql]# ls -F
bin/ docs/ include/ lib/ LICENSE man/ README share/ support-files/
[root@localhost mysql]# mkdir data
[root@localhost mysql]# chown -R mysql:mysql data
[root@localhost mysql]# ls -F
bin/ data/ docs/ include/ lib/ LICENSE man/ README share/ support-files/
[root@localhost mysql]# pwd -P
/usr/local/mysql
[root@localhost mysql]# gedit my.conf

(gedit:112657): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.CI5TL0': No such file or directory

(gedit:112657): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:112657): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.TCZGL0': No such file or directory

(gedit:112657): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:112657): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.W87OL0': No such file or directory

(gedit:112657): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
[root@localhost mysql]# ls -F
bin/ data/ docs/ include/ lib/ LICENSE man/ my.conf README share/ support-files/
[root@localhost mysql]# cat -n my.conf
1 [mysql]
2 socket=/var/lib/mysql/mysql.sock
3
4 default-character-set=utf8
5
6 [mysqld]
7 socket=/var/lib/mysql/mysql.sock
8
9 port = 3306
10
11 basedir=/usr/local/mysql
12
13 datadir=/usr/local/mysql/data
14
15 max_connections=200
16
17 character-set-server=utf8
18
19 default-storage-engine=INNODB
20 lower_case_table_names=1
21 max_allowed_packet=16M
22 explicit_defaults_for_timestamp=true
23
24 [mysql.server]
25 user=mysql
26 basedir=/usr/local/mysql
[root@localhost mysql]# pwd -P
/usr/local/mysql
[root@localhost mysql]# ls -F
bin/ data/ docs/ include/ lib/ LICENSE man/ my.conf README share/ support-files/
[root@localhost mysql]#
[root@localhost mysql]# bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/
2020-06-03 14:44:23 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2020-06-03 14:44:27 [WARNING] The bootstrap log isn't empty:
2020-06-03 14:44:27 [WARNING] 2020-06-03T06:44:23.608995Z 0 [Warning] --bootstrap is deprecated. Please consider using --initialize instead
2020-06-03T06:44:23.609373Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2020-06-03T06:44:23.609377Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)

[root@localhost mysql]# cp ./support-files/mysql.server /etc/init.d/mysqld
[root@localhost mysql]# chown 777 my.conf
[root@localhost mysql]# ll
total 312
drwxr-xr-x 2 mysql mysql 4096 Jun 3 14:22 bin
drwxr-xr-x 5 mysql mysql 4096 Jun 3 14:44 data
drwxr-xr-x 2 mysql mysql 4096 Jun 3 14:22 docs
drwxr-xr-x 3 mysql mysql 4096 Jun 3 14:22 include
drwxr-xr-x 5 mysql mysql 4096 Jun 3 14:22 lib
-rw-r--r-- 1 mysql mysql 275235 Mar 24 01:35 LICENSE
drwxr-xr-x 4 mysql mysql 4096 Jun 3 14:22 man
-rw-r--r-- 1 777 root 398 Jun 3 14:39 my.conf
-rw-r--r-- 1 mysql mysql 587 Mar 24 01:35 README
drwxr-xr-x 28 mysql mysql 4096 Jun 3 14:22 share
drwxr-xr-x 2 mysql mysql 4096 Jun 3 14:22 support-files
[root@localhost mysql]# chmod +x /etc/init.d/mysqld
[root@localhost mysql]# /etc/init.d/mysqld start
Starting MySQL.Logging to '/usr/local/mysql/data/localhost.localdomain.err'.
[ OK ]
[root@localhost mysql]# ps -aux | grep mysql
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 113165 0.0 0.0 106248 1432 pts/1 S 14:46 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/localhost.localdomain.pid
mysql 113250 2.6 4.6 1170160 180788 pts/1 Sl 14:46 0:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=localhost.localdomain.err --pid-file=/usr/local/mysql/data/localhost.localdomain.pid
root 113285 0.0 0.0 103324 860 pts/1 S+ 14:47 0:00 grep mysql
[root@localhost mysql]# /etc/init.d/mysqld restart
Shutting down MySQL.. [ OK ]
Starting MySQL. [ OK ]
[root@localhost mysql]# chkconfig mysqld on
[root@localhost mysql]# chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost mysql]# ps -aux | grep mysql
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 113351 0.0 0.0 106248 1436 pts/1 S 14:47 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/localhost.localdomain.pid
mysql 113438 0.5 4.6 1170160 183328 pts/1 Sl 14:47 0:00 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=localhost.localdomain.err --pid-file=/usr/local/mysql/data/localhost.localdomain.pid
root 113527 0.0 0.0 103324 864 pts/1 S+ 14:48 0:00 grep mysql
[root@localhost mysql]# service mysqld status
MySQL running (113438) [ OK ]
[root@localhost mysql]# cat /root/.mysql_secret

Password set for user 'root@localhost' at 2020-06-03 14:44:23

Dp83L,;uuHoE
[root@localhost mysql]# ln -s /usr/local/mysql/bin/mysql /usr/bin/
[root@localhost mysql]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.30

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> set password=password('1qaz@WSX');
Query OK, 0 rows affected, 1 warning (0.00 sec)
【此处可以有三种方式,需要根据不同的MySQL版本进行尝试:set password=password('密码');update user set authentication_string = password('密码') where user='root';alter user 'root'@'localhost' identified by '密码';】
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit;
Bye
[root@localhost mysql]# mysql -uroot -p
Enter password: 【输入密码1qaz@WSX】
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.30 MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select user,host from user;
+---------------+-----------+
| user | host |
+---------------+-----------+
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+---------------+-----------+
3 rows in set (0.00 sec)

mysql> grant all privileges on . to 'root'@'%' identified by '1qaz@WSX' with grant option;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE USER 'mysql'@'localhost' IDENTIFIED BY '3edc$RFV';
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on . to 'mysql'@'%' identified by '3edc$RFV' with grant option;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select user,host from user;
+---------------+-----------+
| user | host |
+---------------+-----------+
| mysql | % |
| root | % |
| mysql | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+---------------+-----------+
6 rows in set (0.00 sec)

mysql> quit;
Bye
[root@localhost mysql]#

安装Zabbix server和agent
[root@localhost ~]# groupadd zabbix
[root@localhost ~]# useradd zabbix -g zabbix
[root@localhost ~]# id zabbix
uid=502(zabbix) gid=503(zabbix) groups=503(zabbix)
[root@localhost ~]# yum -y install gcc libxml2-devel net-snmp net-snmp-devel curl curl-devel php-bcmath php-mbstring libcurl-devel php-gd php-xml php-mysql libevent libevent-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
..................................................................................................
Installed:
libevent-devel.x86_64 0:1.4.13-4.el6 net-snmp-devel.x86_64 1:5.5-60.el6_10.1 php-bcmath.x86_64 0:5.3.3-50.el6_10 php-gd.x86_64 0:5.3.3-50.el6_10
php-mbstring.x86_64 0:5.3.3-50.el6_10 php-mysql.x86_64 0:5.3.3-50.el6_10 php-xml.x86_64 0:5.3.3-50.el6_10

Dependency Installed:
file-devel.x86_64 0:5.04-30.el6 libevent-doc.noarch 0:1.4.13-4.el6 libevent-headers.noarch 0:1.4.13-4.el6 lm_sensors-devel.x86_64 0:3.1.1-17.el6
mysql-libs.x86_64 0:5.1.73-8.el6_8 php-pdo.x86_64 0:5.3.3-50.el6_10 rpm-devel.x86_64 0:4.8.0-59.el6 tcp_wrappers-devel.x86_64 0:7.6-58.el6

Complete!
[root@localhost ~]#
[root@localhost ~]# wget wget https://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/4.0.6/zabbix-4.0.6.tar.gz
.......................................................................................................
Saving to: “zabbix-4.0.6.tar.gz”

100%[++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=====>] 17,162,202 14.1K/s in 79s

2020-06-03 16:29:46 (9.85 KB/s) - “zabbix-4.0.6.tar.gz” saved [17162202/17162202]

FINISHED --2020-06-03 16:29:46--
Downloaded: 1 files, 16M in 38m 28s (7.26 KB/s)
[root@localhost ~]# ls -F
anaconda-ks.cfg install.log.syslog nginx-1.14.2/ php-7.2.17/ zabbix-4.0.6.tar.gz
install.log mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz nginx-1.14.2.tar.gz php-7.2.17.tar.bz2
[root@localhost ~]#
[root@localhost ~]# tar -xzvf zabbix-4.0.6.tar.gz
................................................................................................
zabbix-4.0.6/misc/snmptrap/
zabbix-4.0.6/misc/snmptrap/zabbix_trap_receiver.pl
zabbix-4.0.6/misc/snmptrap/snmptrap.sh
[root@localhost ~]# ls -F
anaconda-ks.cfg install.log.syslog nginx-1.14.2/ php-7.2.17/ zabbix-4.0.6/
install.log mysql-5.7.30-linux-glibc2.12-x86_64.tar.gz nginx-1.14.2.tar.gz php-7.2.17.tar.bz2 zabbix-4.0.6.tar.gz
[root@localhost ~]# cd zabbix-4.0.6
[root@localhost zabbix-4.0.6]# ls -F
aclocal.m4 build/ conf/ configure database/ include/ m4/ man/ NEWS src/
AUTHORS ChangeLog config.guess
 configure.ac depcomp INSTALL Makefile.am misc/ README
bin/ compile
 config.sub COPYING frontends/ install-sh Makefile.in missing* sass/
[root@localhost zabbix-4.0.6]# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-net-snmp --with-libcurl --with-mysql=/usr/local/bin/mysql_config
...................................................................................................
checking for mysql_config... /usr/local/bin/mysql_config
configure: error: MySQL library not found
【报错未找到/usr/bin/mysql_config而终止了编译环境检查,去MySQL的安装目录中查找文件mysql_config】
[root@localhost zabbix-4.0.6]# find /usr/local/mysql/ -name mysql_config
/usr/local/mysql/bin/mysql_config
[root@localhost zabbix-4.0.6]#
【再次执行编译环境检查命令】
[root@localhost zabbix-4.0.6]# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-net-snmp --with-libcurl --with-mysql=/usr/local/mysql/bin/mysql_config
..........................................................................................................


[root@localhost zabbix-4.0.6]# make install
..............................................................................................
make[2]: Leaving directory /root/zabbix-4.0.6'<br/>make[1]: Leaving directory/root/zabbix-4.0.6'
[root@localhost zabbix-4.0.6]#

[root@localhost zabbix-4.0.6]# grep -Ev "^$|^[#;]" /usr/local/zabbix/etc/zabbix_server.conf
LogFile=/tmp/zabbix_server.log
DBName=zabbix
DBUser=zabbix
Timeout=4
LogSlowQueries=3000
[root@localhost zabbix-4.0.6]# cp /usr/local/zabbix/etc/zabbix_server.conf /usr/local/zabbix/etc/zabbix_server.conf.original
[root@localhost zabbix-4.0.6]# gedit /usr/local/zabbix/etc/zabbix_server.conf

(gedit:6088): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.S2WLL0': No such file or directory

(gedit:6088): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:6088): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.2UIVL0': No such file or directory

(gedit:6088): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:6088): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.ASDTL0': No such file or directory

(gedit:6088): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:6088): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.BKQRL0': No such file or directory

(gedit:6088): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:6088): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.OHLTL0': No such file or directory

(gedit:6088): Gtk-WARNING *: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
[root@localhost zabbix-4.0.6]# grep -Ev "^$|^[#;]" /usr/local/zabbix/etc/zabbix_server.conf
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
PidFile=/var/run/zabbix/zabbix_server.pid
DBName=zabbix
DBUser=zabbix
DBPassword=zabbixtest
SNMPTrapperFile=/var/log/snmptrap/zabbix_snmptrap.log
Timeout=4
AlertScriptsPath=/usr/lib/zabbix/alertscripts
ExternalScripts=/var/lib/zabbix/externalscripts
LogSlowQueries=3000
[root@localhost zabbix-4.0.6]# ls -F
aclocal.m4 build/ conf/ config.status
 configure.ac depcomp INSTALL Makefile man/ NEWS src/
AUTHORS ChangeLog config.guess
 config.sub COPYING frontends/ install-sh Makefile.am misc/ README
bin/ compile config.log configure database/ include/ m4/ Makefile.in missing sass/
[root@localhost zabbix-4.0.6]#
[root@localhost zabbix-4.0.6]# ls -F misc/init.d/
aix/ debian/ fedora/ freebsd/ gentoo/ README suse/ tru64/ ubuntu/
[root@localhost zabbix-4.0.6]# ls -F misc/init.d/fedora/core
core/ core5/
[root@localhost zabbix-4.0.6]# ls -F misc/init.d/fedora/core/zabbix_
zabbix_agentd zabbix_server
[root@localhost zabbix-4.0.6]# ls -F misc/init.d/fedora/core/
zabbix_agentd
 zabbix_server*
[root@localhost zabbix-4.0.6]# cp misc/init.d/fedora/core/zabbix_server /etc/init.d/
[root@localhost zabbix-4.0.6]# cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/
[root@localhost zabbix-4.0.6]# grep -Ev "^$|^[#;]" /etc/init.d/zabbix_server
. /etc/init.d/functions

Zabbix-Directory

BASEDIR=/usr/local
# Binary File
BINARY_NAME=zabbix_server
# Full Binary File Call
FULLPATH=$BASEDIR/sbin/$BINARY_NAME
# PID file
PIDFILE=/tmp/$BINARY_NAME.pid
# Establish args
ERROR=0
STOPPING=0

if [ -f $PIDFILE ] && [ -s $PIDFILE ]
then
PID=cat $PIDFILE

if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null && [ $BINARY_NAME == `ps -e | grep $PID | awk '{print $4}'` ]
then
    STATUS="$BINARY_NAME (pid `pidof $APP`) running.."
    RUNNING=1
else
    rm -f $PIDFILE
    STATUS="$BINARY_NAME (pid file existed ($PID) and now removed) not running.."
    RUNNING=0
fi

else
if [ ps -e | grep $BINARY_NAME | head -1 | awk '{ print $1 }' ]
then
STATUS="$BINARY_NAME (pid pidof $APP, but no pid file) running.."
else
STATUS="$BINARY_NAME (no pid file) not running"
fi
RUNNING=0
fi
start() {
if [ $RUNNING -eq 1 ]
then
echo "$0 $ARG: $BINARY_NAME (pid $PID) already running"
else
action $"Starting $BINARY_NAME: " $FULLPATH
touch /var/lock/subsys/$BINARY_NAME
fi
}
stop() {
echo -n $"Shutting down $BINARY_NAME: "
killproc $BINARY_NAME
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$BINARY_NAME
RUNNING=0
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $BINARY_NAME
;;
restart)
stop
sleep 10
start
;;
help|*)
echo $"Usage: $0 {start|stop|status|restart|help}"
cat <<EOF
start - start $BINARY_NAME
stop - stop $BINARY_NAME
status - show current status of $BINARY_NAME
restart - restart $BINARY_NAME if running by sending a SIGHUP or start if not running
help - this screen
EOF
exit 1
;;
esac
exit 0
[root@localhost zabbix-4.0.6]# gedit /etc/init.d/zabbix_server

(gedit:6485): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.I3CWL0': No such file or directory

(gedit:6485): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:6485): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.S3HJL0': No such file or directory

(gedit:6485): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:6485): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.ZUVQL0': No such file or directory

(gedit:6485): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:6485): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.KJKML0': No such file or directory

(gedit:6485): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
[root@localhost zabbix-4.0.6]# grep -Ev "^$|^[#;]" /etc/init.d/zabbix_server
. /etc/init.d/functions

Zabbix-Directory

BASEDIR=/usr/local/zabbix
# Binary File
BINARY_NAME=zabbix_server
# Full Binary File Call
FULLPATH=$BASEDIR/sbin/$BINARY_NAME
# PID file
PIDFILE=/tmp/$BINARY_NAME.pid
# Establish args
ERROR=0
STOPPING=0

if [ -f $PIDFILE ] && [ -s $PIDFILE ]
then
PID=cat $PIDFILE

if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null && [ $BINARY_NAME == `ps -e | grep $PID | awk '{print $4}'` ]
then
    STATUS="$BINARY_NAME (pid `pidof $APP`) running.."
    RUNNING=1
else
    rm -f $PIDFILE
    STATUS="$BINARY_NAME (pid file existed ($PID) and now removed) not running.."
    RUNNING=0
fi

else
if [ ps -e | grep $BINARY_NAME | head -1 | awk '{ print $1 }' ]
then
STATUS="$BINARY_NAME (pid pidof $APP, but no pid file) running.."
else
STATUS="$BINARY_NAME (no pid file) not running"
fi
RUNNING=0
fi
start() {
if [ $RUNNING -eq 1 ]
then
echo "$0 $ARG: $BINARY_NAME (pid $PID) already running"
else
action $"Starting $BINARY_NAME: " $FULLPATH
touch /var/lock/subsys/$BINARY_NAME
fi
}
stop() {
echo -n $"Shutting down $BINARY_NAME: "
killproc $BINARY_NAME
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$BINARY_NAME
RUNNING=0
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $BINARY_NAME
;;
restart)
stop
sleep 10
start
;;
help|*)
echo $"Usage: $0 {start|stop|status|restart|help}"
cat <<EOF
start - start $BINARY_NAME
stop - stop $BINARY_NAME
status - show current status of $BINARY_NAME
restart - restart $BINARY_NAME if running by sending a SIGHUP or start if not running
help - this screen
EOF
exit 1
;;
esac
exit 0
[root@localhost zabbix-4.0.6]#
[root@localhost zabbix-4.0.6]# grep -Ev "^$|^[#;]" /etc/init.d/zabbix_agentd
. /etc/init.d/functions

Zabbix-Directory

BASEDIR=/usr/local
# Binary File
BINARY_NAME=zabbix_agentd
# Full Binary File Call
FULLPATH=$BASEDIR/sbin/$BINARY_NAME
# PID file
PIDFILE=/tmp/$BINARY_NAME.pid
# Establish args
ERROR=0
STOPPING=0

if [ -f $PIDFILE ] && [ -s $PIDFILE ]
then
PID=cat $PIDFILE
if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null && [ $BINARY_NAME == ps -e | grep $PID | awk '{print $4}' ]
then
STATUS="$BINARY_NAME (pid pidof $APP) running.."
RUNNING=1
else
rm -f $PIDFILE
STATUS="$BINARY_NAME (pid file existed ($PID) and now removed) not running.."
RUNNING=0
fi
else
if [ ps -e | grep $BINARY_NAME | head -1 | awk '{ print $1 }' ]
then
STATUS="$BINARY_NAME (pid pidof $APP, but no pid file) running.."
else
STATUS="$BINARY_NAME (no pid file) not running"
fi
RUNNING=0
fi
start() {
if [ $RUNNING -eq 1 ]
then
echo "$0 $ARG: $BINARY_NAME (pid $PID) already running"
else
action $"Starting $BINARY_NAME: " $FULLPATH
touch /var/lock/subsys/$BINARY_NAME
fi
}
stop() {
echo -n $"Shutting down $BINARY_NAME: "
killproc $BINARY_NAME
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$BINARY_NAME
RUNNING=0
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $BINARY_NAME
;;
restart)
stop
sleep 10
start
;;
help|*)
echo $"Usage: $0 {start|stop|status|restart|help}"
cat <<EOF
start - start $BINARY_NAME
stop - stop $BINARY_NAME
status - show current status of $BINARY_NAME
restart - restart $BINARY_NAME if running by sending a SIGHUP or start if not running
help - this screen
EOF
exit 1
;;
esac
exit 0
[root@localhost zabbix-4.0.6]# gedit /etc/init.d/zabbix_agentd

(gedit:6625): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.1PFLL0': No such file or directory

(gedit:6625): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:6625): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.XJDIL0': No such file or directory

(gedit:6625): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:6625): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.0K6VL0': No such file or directory

(gedit:6625): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
[root@localhost zabbix-4.0.6]# grep -Ev "^$|^[#;]" /etc/init.d/zabbix_agentd
. /etc/init.d/functions

Zabbix-Directory

BASEDIR=/usr/local/zabbix
# Binary File
BINARY_NAME=zabbix_agentd
# Full Binary File Call
FULLPATH=$BASEDIR/sbin/$BINARY_NAME
# PID file
PIDFILE=/tmp/$BINARY_NAME.pid
# Establish args
ERROR=0
STOPPING=0

if [ -f $PIDFILE ] && [ -s $PIDFILE ]
then
PID=cat $PIDFILE
if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null && [ $BINARY_NAME == ps -e | grep $PID | awk '{print $4}' ]
then
STATUS="$BINARY_NAME (pid pidof $APP) running.."
RUNNING=1
else
rm -f $PIDFILE
STATUS="$BINARY_NAME (pid file existed ($PID) and now removed) not running.."
RUNNING=0
fi
else
if [ ps -e | grep $BINARY_NAME | head -1 | awk '{ print $1 }' ]
then
STATUS="$BINARY_NAME (pid pidof $APP, but no pid file) running.."
else
STATUS="$BINARY_NAME (no pid file) not running"
fi
RUNNING=0
fi
start() {
if [ $RUNNING -eq 1 ]
then
echo "$0 $ARG: $BINARY_NAME (pid $PID) already running"
else
action $"Starting $BINARY_NAME: " $FULLPATH
touch /var/lock/subsys/$BINARY_NAME
fi
}
stop() {
echo -n $"Shutting down $BINARY_NAME: "
killproc $BINARY_NAME
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$BINARY_NAME
RUNNING=0
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $BINARY_NAME
;;
restart)
stop
sleep 10
start
;;
help|*)
echo $"Usage: $0 {start|stop|status|restart|help}"
cat <<EOF
start - start $BINARY_NAME
stop - stop $BINARY_NAME
status - show current status of $BINARY_NAME
restart - restart $BINARY_NAME if running by sending a SIGHUP or start if not running
help - this screen
EOF
exit 1
;;
esac
exit 0
[root@localhost zabbix-4.0.6]#
[root@localhost zabbix-4.0.6]# chmod +x /etc/init.d/zabbix_server
[root@localhost zabbix-4.0.6]# chmod +x /etc/init.d/zabbix_agentd
[root@localhost zabbix-4.0.6]# mkdir -p /var/log/zabbix
[root@localhost zabbix-4.0.6]# touch /var/log/zabbix/zabbix_server.log
[root@localhost zabbix-4.0.6]# chmod 777 /var/log/zabbix/zabbix_server.log
[root@localhost zabbix-4.0.6]#
[root@localhost zabbix-4.0.6]# /etc/init.d/zabbix_server start
Starting zabbix_server: /usr/local/zabbix/sbin/zabbix_server: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory
[FAILED]
[root@localhost zabbix-4.0.6]# service zabbix_server start
Starting zabbix_server: /usr/local/zabbix/sbin/zabbix_server: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory
[FAILED]
[root@localhost zabbix-4.0.6]#
【出现这个报错是因为zabbix 启动加载没有找到libmysqlclient.so.20这个文件】
[root@localhost zabbix-4.0.6]# find /usr/local/mysql/ -name libmysqlclient.so.20
/usr/local/mysql/lib/libmysqlclient.so.20
[root@localhost zabbix-4.0.6]# ln -s /usr/local/mysql/lib/libmysqlclient.so.20 /usr/lib/
[root@localhost zabbix-4.0.6]# find /usr/lib/ -name libmysqlclient.so.20
/usr/lib/libmysqlclient.so.20
[root@localhost zabbix-4.0.6]# echo "/usr/local/mysql/lib" >> /etc/ld.so.conf
[root@localhost zabbix-4.0.6]# ldconfig
[root@localhost zabbix-4.0.6]# /etc/init.d/zabbix_server start
Starting zabbix_server: [ OK ]
[root@localhost zabbix-4.0.6]#
[root@localhost zabbix-4.0.6]# service zabbix_server status
zabbix_server dead but subsys locked
[root@localhost zabbix-4.0.6]# ps -ef | grep zabbix
root 8200 5557 0 17:22 pts/1 00:00:00 grep zabbix
[root@localhost zabbix-4.0.6]# service zabbix_server restart
Shutting down zabbix_server: [FAILED]
Starting zabbix_server: [ OK ]
[root@localhost zabbix-4.0.6]# ps -ef | grep zabbix
root 8283 5557 0 17:23 pts/1 00:00:00 grep zabbix
[root@localhost zabbix-4.0.6]# gedit /usr/local/zabbix/etc/zabbix_server.conf
[root@localhost zabbix-4.0.6]# grep -Ev "^$|^[#;]" /usr/local/zabbix/etc/zabbix_server.conf
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
ListenIP=0.0.0.0
PidFile=/var/run/zabbix/zabbix_server.pid
DBName=zabbix
DBUser=zabbix
DBPassword=zabbixtest
SNMPTrapperFile=/var/log/snmptrap/zabbix_snmptrap.log
Timeout=4
AlertScriptsPath=/usr/lib/zabbix/alertscripts
ExternalScripts=/var/lib/zabbix/externalscripts
LogSlowQueries=3000
[root@localhost zabbix-4.0.6]#
【根据service zabbix_server status的结果可知zabbix_server dead but subsys locked,查看日志文件/var/log/zabbix/zabbix_server.log中的提示】
[root@localhost zabbix-4.0.6]# tail -30 /var/log/zabbix/zabbix_server.log
zabbix_server [8123]: cannot create PID file [/var/run/zabbix/zabbix_server.pid]: [2] No such file or directory
zabbix_server [8259]: cannot create PID file [/var/run/zabbix/zabbix_server.pid]: [2] No such file or directory
zabbix_server [8552]: cannot create PID file [/var/run/zabbix/zabbix_server.pid]: [2] No such file or directory
[root@localhost zabbix-4.0.6]# ls -F /var/run/zabbix/
ls: cannot access /var/run/zabbix/: No such file or directory
[root@localhost zabbix-4.0.6]# ls -F /var/run/
abrt/ certmonger.pid gdm/ lvm/ pluto/ sepermit/ vmware/
abrtd.pid console/ gdm.pid mdadm/ plymouth/ setrans/ winbindd/
acpid.pid ConsoleKit/ gluster/ messagebus.pid pm-utils/ sm-notify.pid wpa_supplicant/
acpid.socket= console-kit-daemon.pid hald/ netreport/ portreserve/ spice-vdagentd/ wpa_supplicant.pid
atd.pid crond.pid haldaemon.pid net-snmp/ ppp/ sshd.pid xinetd.pid
auditd.pid cron.reboot ibacm.pid NetworkManager/ radvd/ syslogd.pid
autofs.fifo-misc| cups/ irqbalance.pid nm-dhclient-eth0.conf rpcbind.lock udev-configure-printer/
autofs.fifo-net| cupsd.pid ksmtune.pid pcscd.comm= rpcbind.pid udisks/
autofs.pid dbus/ libvirt/ pcscd.events/ rpcbind.sock= utmp
autofs-running dhclient-eth0.pid libvirtd.pid pcscd.pid rpc.statd.pid vmblock-fuse/
certmonger/ faillock/ lldpad.pid pcscd.pub saslauthd/ vmtoolsd.pid
[root@localhost zabbix-4.0.6]# touch /var/run/zabbix/zabbix_server.pid
touch: cannot touch `/var/run/zabbix/zabbix_server.pid': No such file or directory
[root@localhost zabbix-4.0.6]# mkdir -p /var/run/zabbix/
[root@localhost zabbix-4.0.6]# touch /var/run/zabbix/zabbix_server.pid
[root@localhost zabbix-4.0.6]# chmod 777 /var/run/zabbix/zabbix_server.pid
[root@localhost zabbix-4.0.6]# service zabbix_server restart
Shutting down zabbix_server: [FAILED]
Starting zabbix_server: [ OK ]
[root@localhost zabbix-4.0.6]# service zabbix_server status
zabbix_server (pid 9050) is running...
[root@localhost zabbix-4.0.6]# ps -ef | grep zabbix
zabbix 9050 1 0 17:35 ? 00:00:00 /usr/local/zabbix/sbin/zabbix_server
root 9082 5557 0 17:35 pts/1 00:00:00 grep zabbix
[root@localhost zabbix-4.0.6]# /usr/local/zabbix/sbin/zabbix_server -V
zabbix_server (Zabbix) 4.0.6
Revision 91685 28 March 2019, compilation time: Jun 3 2020 16:45:34
Copyright (C) 2019 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>;.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.
[root@localhost zabbix-4.0.6]#

配置Zabbix的Nginx Web应用程序
[root@localhost zabbix-4.0.6]# ls -F /usr/local/nginx/
client_body_temp/ conf/ fastcgi_temp/ html/ logs/ proxy_temp/ sbin/ scgi_temp/ uwsgi_temp/
[root@localhost zabbix-4.0.6]# ls -F /usr/local/nginx/html/
50x.html index.html
[root@localhost zabbix-4.0.6]# mkdir -p /usr/local/nginx/html/zabbix
[root@localhost zabbix-4.0.6]# ls -F /usr/local/nginx/html/
50x.html index.html zabbix/
[root@localhost zabbix-4.0.6]# ls -F
aclocal.m4 build/ conf/ config.status configure.ac depcomp INSTALL Makefile man/ NEWS src/
AUTHORS ChangeLog config.guess config.sub COPYING frontends/ install-sh Makefile.am misc/ README
bin/ compile
 config.log configure database/ include/ m4/ Makefile.in missing sass/
[root@localhost zabbix-4.0.6]# ls -F frontends/
php/
[root@localhost zabbix-4.0.6]# ls -F frontends/php/
actionconf.php audio/ discoveryconf.php image.php map.import.php slideconf.php
adm.gui.php auditacts.php disc_prototypes.php images/ map.php slides.php
adm.housekeeper.php auditlogs.php favicon.ico img/ overview.php srv_status.php
adm.iconmapping.php browserwarning.php fonts/ imgstore.php profile.php styles/
adm.images.php chart2.php graphs.php include/ queue.php sysmap.php
adm.macros.php chart3.php history.php index_http.php report2.php sysmaps.php
adm.other.php chart4.php host_discovery.php index.php report4.php templates.php
adm.regexps.php chart5.php hostgroups.php items.php robots.txt toptriggers.php
adm.triggerdisplayoptions.php chart6.php hostinventoriesoverview.php js/ screenconf.php tr_events.php
adm.triggerseverities.php chart7.php hostinventories.php jsLoader.php screenedit.php trigger_prototypes.php
adm.valuemapping.php chart.php host_prototypes.php jsrpc.php screen.import.php triggers.php
adm.workingtime.php charts.php host_screen.php latest.php screens.php usergrps.php
api_jsonrpc.php conf/ hosts.php local/ search.php users.php
app/ conf.import.php httpconf.php locale/ services.php zabbix.php
applications.php correlation.php httpdetails.php maintenance.php setup.php
[root@localhost zabbix-4.0.6]# cp -r frontends/php/* /usr/local/nginx/html/zabbix/
[root@localhost zabbix-4.0.6]# ls -F /usr/local/nginx/html/zabbix/
actionconf.php audio/ discoveryconf.php image.php map.import.php slideconf.php
adm.gui.php auditacts.php disc_prototypes.php images/ map.php slides.php
adm.housekeeper.php auditlogs.php favicon.ico img/ overview.php srv_status.php
adm.iconmapping.php browserwarning.php fonts/ imgstore.php profile.php styles/
adm.images.php chart2.php graphs.php include/ queue.php sysmap.php
adm.macros.php chart3.php history.php index_http.php report2.php sysmaps.php
adm.other.php chart4.php host_discovery.php index.php report4.php templates.php
adm.regexps.php chart5.php hostgroups.php items.php robots.txt toptriggers.php
adm.triggerdisplayoptions.php chart6.php hostinventoriesoverview.php js/ screenconf.php tr_events.php
adm.triggerseverities.php chart7.php hostinventories.php jsLoader.php screenedit.php trigger_prototypes.php
adm.valuemapping.php chart.php host_prototypes.php jsrpc.php screen.import.php triggers.php
adm.workingtime.php charts.php host_screen.php latest.php screens.php usergrps.php
api_jsonrpc.php conf/ hosts.php local/ search.php users.php
app/ conf.import.php httpconf.php locale/ services.php zabbix.php
applications.php correlation.php httpdetails.php maintenance.php setup.php
[root@localhost zabbix-4.0.6]# ls -F /usr/local/nginx/html/zabbix/co
conf/ conf.import.php correlation.php
[root@localhost zabbix-4.0.6]# ls -F /usr/local/nginx/html/zabbix/conf/
maintenance.inc.php zabbix.conf.php.example
[root@localhost zabbix-4.0.6]# cp /usr/local/nginx/html/zabbix/conf/zabbix.conf.php.example /usr/local/nginx/html/zabbix/conf/zabbix.conf.php
[root@localhost zabbix-4.0.6]# ls -F /usr/local/nginx/html/zabbix/conf/
maintenance.inc.php zabbix.conf.php zabbix.conf.php.example
[root@localhost zabbix-4.0.6]#
[root@localhost zabbix-4.0.6]# cat -n /usr/local/nginx/html/zabbix/conf/zabbix.conf.php
1 <?php
2 // Zabbix GUI configuration file.
3 global $DB, $HISTORY;
4
5 $DB['TYPE'] = 'MYSQL';
6 $DB['SERVER'] = 'localhost';
7 $DB['PORT'] = '0';
8 $DB['DATABASE'] = 'zabbix';
9 $DB['USER'] = 'zabbix';
10 $DB['PASSWORD'] = '';
11 // Schema name. Used for IBM DB2 and PostgreSQL.
12 $DB['SCHEMA'] = '';
13
14 $ZBX_SERVER = 'localhost';
15 $ZBX_SERVER_PORT = '10051';
16 $ZBX_SERVER_NAME = '';
17
18 $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
19
20 // Uncomment this block only if you are using Elasticsearch.
21 // Elasticsearch url (can be string if same url is used for all types).
22 //$HISTORY['url'] = [
23 // 'uint' => 'http://localhost:9200',
24 // 'text' => 'http://localhost:9200'
25 //];
26 // Value types stored in Elasticsearch.
27 //$HISTORY['types'] = ['uint', 'text'];
[root@localhost zabbix-4.0.6]# gedit /usr/local/nginx/html/zabbix/conf/zabbix.conf.php
[root@localhost zabbix-4.0.6]# cat -n /usr/local/nginx/html/zabbix/conf/zabbix.conf.php
1 <?php
2 // Zabbix GUI configuration file.
3 global $DB, $HISTORY;
4
5 $DB['TYPE'] = 'MYSQL';
6 $DB['SERVER'] = 'localhost';
7 $DB['PORT'] = '0';
8 $DB['DATABASE'] = 'zabbix';
9 $DB['USER'] = 'zabbix';
10 $DB['PASSWORD'] = 'zabbixtest';
11 // Schema name. Used for IBM DB2 and PostgreSQL.
12 $DB['SCHEMA'] = '';
13
14 $ZBX_SERVER = 'localhost';
15 $ZBX_SERVER_PORT = '10051';
16 $ZBX_SERVER_NAME = '';
17
18 $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
19
20 // Uncomment this block only if you are using Elasticsearch.
21 // Elasticsearch url (can be string if same url is used for all types).
22 //$HISTORY['url'] = [
23 // 'uint' => 'http://localhost:9200',
24 // 'text' => 'http://localhost:9200'
25 //];
26 // Value types stored in Elasticsearch.
27 //$HISTORY['types'] = ['uint', 'text'];
[root@localhost zabbix-4.0.6]#

[root@localhost zabbix-4.0.6]# mysql -uroot -p -e "grant all privileges on zabbix. to zabbix@localhost identified by 'zabbixtest';"
Enter password:
[root@localhost zabbix-4.0.6]# mysql -uroot -p -e "create database zabbix default character set utf8 collate utf8_bin;"
Enter password:
[root@localhost zabbix-4.0.6]# mysql -uroot -p -e "grant all on zabbix.
 to 'zabbix'@'%' identified by 'zabbixtest';"
Enter password:
[root@localhost zabbix-4.0.6]# mysql -uroot -p -e "flush privileges;"
Enter password:
[root@localhost zabbix-4.0.6]# ls -F
aclocal.m4 build/ conf/ config.status configure.ac depcomp INSTALL Makefile man/ NEWS src/
AUTHORS ChangeLog config.guess config.sub COPYING frontends/ install-sh Makefile.am misc/ README
bin/ compile
 config.log configure database/ include/ m4/ Makefile.in missing sass/
[root@localhost zabbix-4.0.6]# ls -F database/
elasticsearch/ ibm_db2/ Makefile Makefile.am Makefile.in mysql/ oracle/ postgresql/ sqlite3/
[root@localhost zabbix-4.0.6]# ls -F database/mysql/
data.sql images.sql Makefile Makefile.am Makefile.in schema.sql
[root@localhost zabbix-4.0.6]# mysql -uzabbix -p zabbix < database/mysql/schema.sql
Enter password:
[root@localhost zabbix-4.0.6]# mysql -uzabbix -p zabbix < database/mysql/images.sql
Enter password:
[root@localhost zabbix-4.0.6]# mysql -uzabbix -p zabbix < database/mysql/data.sql
Enter password:
[root@localhost zabbix-4.0.6]#

[root@localhost zabbix-4.0.6]# ls -F /usr/local/nginx/conf/
fastcgi.conf fastcgi_params koi-utf mime.types nginx.conf scgi_params uwsgi_params win-utf
fastcgi.conf.default fastcgi_params.default koi-win mime.types.default nginx.conf.default scgi_params.default uwsgi_params.default
[root@localhost zabbix-4.0.6]# cat -n /usr/local/nginx/conf/nginx.conf
1
2 #user nobody;
3 worker_processes 1;
4
5 #error_log logs/error.log;
6 #error_log logs/error.log notice;
7 #error_log logs/error.log info;
8
9 #pid logs/nginx.pid;
10
11
12 events {
13 worker_connections 1024;
14 }
15
16
17 http {
18 include mime.types;
19 default_type application/octet-stream;
20
21 #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
22 # '$status $body_bytes_sent "$http_referer" '
23 # '"$http_user_agent" "$http_x_forwarded_for"';
24
25 #access_log logs/access.log main;
26
27 sendfile on;
28 #tcp_nopush on;
29
30 #keepalive_timeout 0;
31 keepalive_timeout 65;
32
33 #gzip on;
34
35 server {
36 listen 80;
37 server_name localhost;
38
39 #charset koi8-r;
40
41 #access_log logs/host.access.log main;
42
43 location / {
44 root html;
45 index index.html index.htm;
46 }
47
48 #error_page 404 /404.html;
49
50 # redirect server error pages to the static page /50x.html
51 #
52 error_page 500 502 503 504 /50x.html;
53 location = /50x.html {
54 root html;
55 }
56
57 # proxy the PHP scripts to Apache listening on 127.0.0.1:80
58 #
59 #location ~ .php$ {
60 # proxy_pass http://127.0.0.1;
61 #}
62
63 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
64 #
65 #location ~ .php$ {
66 # root html;
67 # fastcgi_pass 127.0.0.1:9000;
68 # fastcgi_index index.php;
69 # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
70 # include fastcgi_params;
71 #}
72
73 # deny access to .htaccess files, if Apache's document root
74 # concurs with nginx's one
75 #
76 #location ~ /.ht {
77 # deny all;
78 #}
79 }
80
81
82 # another virtual host using mix of IP-, name-, and port-based configuration
83 #
84 #server {
85 # listen 8000;
86 # listen somename:8080;
87 # server_name somename alias another.alias;
88
89 # location / {
90 # root html;
91 # index index.html index.htm;
92 # }
93 #}
94
95
96 # HTTPS server
97 #
98 #server {
99 # listen 443 ssl;
100 # server_name localhost;
101
102 # ssl_certificate cert.pem;
103 # ssl_certificate_key cert.key;
104
105 # ssl_session_cache shared:SSL:1m;
106 # ssl_session_timeout 5m;
107
108 # ssl_ciphers HIGH:!aNULL:!MD5;
109 # ssl_prefer_server_ciphers on;
110
111 # location / {
112 # root html;
113 # index index.html index.htm;
114 # }
115 #}
116
117 }
[root@localhost zabbix-4.0.6]#
[root@localhost zabbix-4.0.6]# gedit /usr/local/nginx/conf/nginx.conf
[root@localhost zabbix-4.0.6]# cat -n /usr/local/nginx/conf/nginx.conf
1
2 #user nobody;
3 worker_processes 1;
4
5 #error_log logs/error.log;
6 #error_log logs/error.log notice;
7 #error_log logs/error.log info;
8
9 #pid logs/nginx.pid;
10
11
12 events {
13 worker_connections 1024;
14 }
15
16
17 http {
18 include mime.types;
19 default_type application/octet-stream;
20
21 #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
22 # '$status $body_bytes_sent "$http_referer" '
23 # '"$http_user_agent" "$http_x_forwarded_for"';
24
25 #access_log logs/access.log main;
26
27 sendfile on;
28 #tcp_nopush on;
29
30 #keepalive_timeout 0;
31 keepalive_timeout 65;
32
33 #gzip on;
34
35 server {
36 listen 80;
37 server_name localhost;
38
39 #charset koi8-r;
40
41 #access_log logs/host.access.log main;
42
43 location / {
44 root html;
45 index index.html index.htm;
46 }
47
48 #error_page 404 /404.html;
49
50 # redirect server error pages to the static page /50x.html
51 #
52 error_page 500 502 503 504 /50x.html;
53 location = /50x.html {
54 root html;
55 }
56
57 # proxy the PHP scripts to Apache listening on 127.0.0.1:80
58 #
59 #location ~ .php$ {
60 # proxy_pass http://127.0.0.1;
61 #}
62
63 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
64 #
65 location ~ .php$ {
66 root html;
67 fastcgi_pass 127.0.0.1:9000;
68 fastcgi_index index.php;
69 fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
70 include fastcgi_params;
71 }
72
73 # deny access to .htaccess files, if Apache's document root
74 # concurs with nginx's one
75 #
76 #location ~ /.ht {
77 # deny all;
78 #}
79 }
80
81
82 # another virtual host using mix of IP-, name-, and port-based configuration
83 #
84 #server {
85 # listen 8000;
86 # listen somename:8080;
87 # server_name somename alias another.alias;
88
89 # location / {
90 # root html;
91 # index index.html index.htm;
92 # }
93 #}
94
95
96 # HTTPS server
97 #
98 #server {
99 # listen 443 ssl;
100 # server_name localhost;
101
102 # ssl_certificate cert.pem;
103 # ssl_certificate_key cert.key;
104
105 # ssl_session_cache shared:SSL:1m;
106 # ssl_session_timeout 5m;
107
108 # ssl_ciphers HIGH:!aNULL:!MD5;
109 # ssl_prefer_server_ciphers on;
110
111 # location / {
112 # root html;
113 # index index.html index.htm;
114 # }
115 #}
116
117 }
[root@localhost zabbix-4.0.6]#
[root@localhost zabbix-4.0.6]# ls -F /usr/local/php/lib/
php/ php.ini
[root@localhost zabbix-4.0.6]# cp /usr/local/php/lib/php.ini /usr/local/php/lib/php.ini.original
[root@localhost zabbix-4.0.6]# ls -F /usr/local/php/lib/
php/ php.ini php.ini.original
[root@localhost zabbix-4.0.6]# gedit /usr/local/php/lib/php.ini

(gedit:11684): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.AB4KL0': No such file or directory

(gedit:11684): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:11684): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.DQILL0': No such file or directory

(gedit:11684): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:11684): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.LWCHL0': No such file or directory

(gedit:11684): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
[root@localhost zabbix-4.0.6]# /usr/local/nginx/sbin/nginx -s reload
[root@localhost zabbix-4.0.6]# /etc/init.d/php-fpm restart
Gracefully shutting down php-fpm . done
Starting php-fpm done
[root@localhost zabbix-4.0.6]#

孟伯,20200603

交流联系:微信 1807479153 ,QQ 1807479153

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值