mysql> UPDATE mysql.user set password = PASSWORD('gechong') WHERE user = 'root';
mysql> DROP USER ''@localhost;
mysql> FLUSH PRIVILEGES;
3、安装niginx
tar -xzvf nginx-1.7.11.tar.gz
tar -xzvf pcre-8.35.tar.gz
tar -xzvf zlib-1.2.8.tar.gz
tar -xzvf openssl-1.0.2a.tar.gz
tar -xzvf openssl-1.0.2a.tar.gz
yum install gcc mhash zlib-devel
cd zlib-1.2.8
./configure && make && make install
cd ../openssl-1.0.2a
./config && make && make install
yum install -y gcc gcc-c++
cd ../pcre-8.35
./configure && make && make install
groupadd nginx
useradd -g nginx nginx
cd ../nginx.nginx-1.7.11
./configure --prefix=/usr/local/nginx/ --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-openssl=../openssl-1.0.2a --with-zlib=../zlib-1.2.8 --with-pcre=../pcre-8.35 --user=nginx --group=nginx
make && make install
cd /usr/local/nginx/conf
cp nginx.conf nginx.confback
nginx 配置==
location ~ \.php$ {
root /usr/local/nginx/web;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
include fastcgi.conf;
}
# ./configure --prefix=/usr/local/zabbix/ --enable-agent
# make
# make install # vim /usr/local/zabbix/etc/zabbix_agentd.conf Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=Zabbix server
其中Server和ServerActive都指定zabbixserver的IP地址,不同的是,前者是被动后者是主动。也就是说Server这个配置是用来允许127.0.0.1这个ip来我这取数据。而serverActive的127.0.0.1的意思是,客户端主动提交数据给他