标签:bz2 查看 name 服务 支持 soc art localhost build
tar -zxvf pcre-8.41.tar.gz cd pcre-8.41 ./configure --prefix=/home/pcre make make install
tar -zxvf apr-1.6.5.tar.gz cd apr-1.6.5 ./configure --prefix=/home/apr make make install
tar -zxvf expat-2.1.0.tar.gz cd expat-2.1.0 ./configure --prefix=/home/expat make make install
tar -zxvf apr-util-1.6.1.tar.gz cd apr-util-1.6.1 ./configure --prefix=/home/apr-util --with-apr=/home/apr/--with-expat=/home/expat/ make make install
tar -zxvf httpd-2.4.34.tar.gz cd httpd-2.4.34 ./configure --prefix=/home/httpd --with-pcre=/home/pcre/--with-apr=/home/apr --with-apr-util=/home/apr-util/--enable-so make make install
vi /home/httpd/conf/httpd.conf 修改 Server Name,去掉注释 # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn‘t have a registered DNS name, enter its IP address here. # #ServerName www.example.com:80 ServerName localhost:80
cp /home/httpd/bin/apachectl /etc/init.d/httpd chkconfig httpd on # centos7 用systemctl enable httpd
service httpd start
tar -zxvf mysql-5.7.23-linux-glibc2.12-x86_64.tar.gz mv mysql-5.7.23-linux-glibc2.12-x86_64 /home/mysql mkdir /home/mysql/data groupadd mysql useradd mysql -g mysql
/home/mysql/bin/mysql_install_db --user=mysql --basedir=/home/mysql/--datadir=/home/mysql/data/ 删除原配置文件 rm -rf /etc/my.cnf 修改配置文件 vi /home/mysql/support-files/mysql.server # Set some defaults mysqld_pid_file_path= if test -z "$basedir" then basedir=/usr/local/mysql bindir=/usr/local/mysql/bin if test -z "$datadir" then datadir=/usr/local/mysql/data fi sbindir=/usr/local/mysql/bin libexecdir=/usr/local/mysql/bin 修改为: then basedir=/home/mysql bindir=/home/mysql/bin if test -z "$datadir" then datadir=/home/mysql/data fi sbindir=/home/mysql/bin libexecdir=/home/mysql/bin 复制启动脚本: cp /home/mysql/support-files/mysql.server /etc/init.d/mysql
chkconfig mysql on
service mysql start
ln -s /home/mysql/bin/mysql /usr/bin/ 查看原始密码 cat /root/.mysql_secret 登录并修改密码 mysql -uroot -p set password for‘root‘@localhost=password(‘123456‘);
tar -zxvf perl-5.28.0.tar.gz cd perl-5.28.0 ./configure.gnu -des -Dprefix=/home/perl -Dusethreads -Uversiononly make make install 修改apxs vi /home/httpd/bin/apxs /replace/with/path/to/perl/interpreter修改为-->/home/perl/bin/perl
tar -zxvf libxml2-2.9.6.tar.gz cd libxml2-2.9.6 ./configure --prefix=/home/libxml2 make make install
tar -zxvf zlib-1.2.11.tar.gz cd zlib-1.2.11 ./configure make make install
tar -zxvf bzip2-1.0.6.tar.gz cd bzip2-1.0.6 make -f Makefile-libbz2_so make make install
tar -xvf curl-7.61.1.tar.gz cd curl-7.61.1 ./configure --prefix=/home/curl make make install
tar -zxvf db-4.7.25.tar.gz cd db-4.7.25/build_unix ../dist/configure --prefix=/home/berkeleyDB make make install
tar -zxvf jpegsrc.v9c.tar.gz cd jpeg-9c/ ./configure --prefix=/home/jpeg --enable-shared --enable-static make make install
tar -zxvf libpng-1.6.35.tar.gz cd libpng-1.6.35 cp scripts/makefile.linux makefile vi makefile 修改: prefix=/home/png ZLIBLIB=/home/zlib/lib ZLIBINC=/home/zlib/include 保存 make make install
tar -xvf freetype-2.5.3.tar.gz cd freetype-2.5.3 ./configure --prefix=/home/freetype make make install
exportCPPFLAGS="-I/home/berkeleyDB/include -D_GNU_SOURCE" exportLDFLAGS="-L/home/berkeleyDB/lib" exportLD_LIBRARY_PATH="/home/berkeleyDB/lib" tar -zxvf openldap-2.4.46.tgz cd openldap-2.4.46 ./configure --prefix=/home/openldap make depend make make install
tar -zxvf php-7.1.22.tar.gz cd php-7.1.22 ./configure --prefix=/home/php --enable-fpm --with-config-file-path=/home/php/etc/--with-pdo_mysql --with-bz2 --with-iconv-dir --with-zlib-dir --enable-soap --enable-mbstring --enable-exif --enable-sockets --enable-pcntl --disable-debug --with-db4=/home/berkeleyDB/--with-gd --with-curl=/home/curl/--enable-gd-native-ttf --enable-zip --enable-bcmath --with-gettext --with-apxs2=/home/httpd/bin/apxs --with-png-dir=/home/png/--with-jpeg-dir=/home/jpeg/--with-freetype-dir=/home/freetype/--enable-shared --with-ldap=/home/openldap/--with-mysqli --enable-static--with-libxml-dir=/home/libxml2/ make make install
cp sapi/fpm/php-fpm.conf /home/php/etc/ cp php.ini-production /home/php/etc/php.ini cp /home/php/etc/php-fpm.d/www.conf.default/home/php/etc/php-fpm.d/www.conf cp sapi/fpm/init.d.php-fpm /etc/init.d/php 设置启动脚本并启动 chmod +x /etc/init.d/php chkconfig php on service php start
vi /home/httpd/conf/httpd.conf 在 AddType application/x-compress .Z AddType application/x-gzip .gz .tgz 后面添加 AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps 在 DirectoryIndex index.html Indexphp 重启apache service httpd restart
tar -zxvf m4-1.4.18.tar.gz cd m4-1.4.18 ./configure make make install
tar -zxvf autoconf-2.65.tar.gz cd autoconf-2.65 ./configure make make install
tar -xvf automake-1.15.tar.xz cd automake-1.15 ./configure make make install
tar -zxvf unixODBC-2.3.7.tar.gz cd unixODBC-2.3.7 ./configure --prefix=/home/unixODBC make make install
tar -zxvf libevent-2.1.8-stable.tar.gz cd libevent-2.1.8-stable ./configure --prefix=/home/libevent make make install
tar -zxvf zabbix-3.4.14.tar.gz cd zabbix-3.4.14 ./configure --prefix=/home/zabbix --enable-server --enable-agent --with-mysql=/home/mysql/bin/mysql_config --with-libcurl=/home/curl/bin/curl-config --with-libxml2=/home/libxml2/bin/xml2-config --with-unixodbc=/home/unixODBC/bin/odbc_config --with-libevent=/home/libevent/--with-libpcre=/home/pcre/ make make install
groupadd zabbix
useradd -g zabbix zabbix -s /sbin/nologin
mysql -uroot -p create database zabbix character set utf8 collate utf8_bin; grant all privileges on zabbix.* to zabbix@‘%‘ identified by ‘zabbix‘; grant all privileges on zabbix.* to zabbix@‘%‘ identified by ‘zabbix‘; grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix‘; grant all privileges on zabbix.* to zabbix@localhost.localdomain identified by ‘zabbix‘; flush privileges;
cd /home/install/zabbix-3.4.14/database/mysql/ mysql -uzabbix -pzabbix zabbix < schema.sql mysql -uzabbix -pzabbix zabbix < images.sql mysql -uzabbix -pzabbix zabbix < data.sql
vi /home/zabbix/etc/zabbix_server.conf 修改: DBHost=127.0.0.1 DBName=zabbix DBUser=zabbix DBPassword=zabbix LogFile=/home/zabbix/logs/zabbix_server.log
cp /home/install/zabbix-3.4.14/misc/init.d/tru64/zabbix_server /etc/init.d/ chmod +x /etc/init.d/zabbix_server vi /etc/init.d/zabbix_server 修改: DAEMON=/home/zabbix/sbin/zabbix_server chkconfig zabbix_server on ln -s /home/mysql/lib/libmysqlclient.so.20/usr/lib64/ ln -s /home/unixODBC/lib/libodbc.so.2/usr/lib64/ ln -s /home/libevent/lib/libevent-2.1.so.6/usr/lib64/ chown -R zabbix /home/zabbix/logs/ chmod +x /home/zabbix/logs/ service zabbix_server start
cp -r /home/install/zabbix-3.4.14/frontends/php//home/httpd/htdocs/zabbix chown -R zabbix.zabbix /home/httpd/htdocs/ cp /home/httpd/htdocs/zabbix/conf/zabbix.conf.php.example /home/httpd/htdocs/zabbix/conf/zabbix.conf.php vi /home/httpd/htdocs/zabbix/conf/zabbix.conf.php 修改 // Zabbix GUI configuration file. global $DB, $HISTORY; $DB[‘TYPE‘]=‘MYSQL‘; $DB[‘SERVER‘]=‘localhost‘; $DB[‘PORT‘]=‘0‘; $DB[‘DATABASE‘]=‘zabbix‘; $DB[‘USER‘]=‘zabbix‘; $DB[‘PASSWORD‘]=‘zabbix‘;
vi /home/php/etc/php.ini 修改: date.timezone= Asia/Shanghai max_execution_time =300 post_max_size =32M memory_limit =128M mbstring.func_overload =1 max_input_time =300 重启PHP和apache
unzip gcc4.8.5.zip cd gcc4.8.5\ 7.2/ rpm -Uvh *.rpm --nodeps --force
tar -zxvf pcre-8.41.tar.gz cd pcre-8.41 ./configure --prefix=/home/pcre make make install
tar -zxvf zabbix-3.4.14.tar.gz cd zabbix-3.4.14/ ./configure --prefix=/home/zabbix --enable-agent --with-libpcre=/home/pcre/ make make install
cp misc/init.d/tru64/zabbix_agentd /etc/init.d/ chmod +x /etc/init.d/zabbix_agentd vi /etc/init.d/zabbix_agentd 修改下面这项 DAEMON=/home/zabbix/sbin/zabbix_agentd
vi /home/zabbix/etc/zabbix_agentd.conf LogFile=/home/zabbix/logs/zabbix_agentd.log Server=192.168.x.x #服务端ip ServerActive=192.168.x.x #服务端ip Hostname=fwqxx EnableRemoteCommands=1 UnsafeUserParameters=1 Include=/home/zabbix/etc/zabbix_agentd.conf.d/*.conf Timeout=10
service zabbix_agentd start
标签:bz2 查看 name 服务 支持 soc art localhost build
原文地址:https://www.cnblogs.com/wufj/p/13269180.html