安裝平臺 centos 6.8 2.6.32-642.el6.x86_64
成都創(chuàng)新互聯(lián)公司是一家集網(wǎng)站建設(shè)、成都網(wǎng)站建設(shè)、網(wǎng)站頁面設(shè)計、網(wǎng)站優(yōu)化SEO優(yōu)化為一體的專業(yè)網(wǎng)站制作公司,已為成都等多地近百家企業(yè)提供網(wǎng)站建設(shè)服務(wù)。追求良好的瀏覽體驗,以探求精品塑造與理念升華,設(shè)計最適合用戶的網(wǎng)站頁面。 合作只是第一步,服務(wù)才是根本,我們始終堅持講誠信,負責(zé)任的原則,為您進行細心、貼心、認真的服務(wù),與眾多客戶在蓬勃發(fā)展的市場環(huán)境中,互促共生。
關(guān)閉防火墻和selinux
軟件版本 apr-1.5.2 apr-util-1.5.4 pcre-8.39 httpd-2.4.23 php-7.0.11 percona-5.6.26 zabbix-3.2.1
安裝依賴關(guān)系 yum install -y gcc libtool libtool-ltdl libtool-ltdl-devel lynx gcc-c++ make zlib zlib-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers recode-devel php-mbstring php-bcmath lib curl-devel php-MySQL tree autoconf httpd-manual mod_ssl mod_perl mod_auth_mysql php-gd php-xml php-ldap php-xmlrpc mysql-connector-odbc libdbi-dbd-mysql net-snmp net-snmp-devel
LAMP環(huán)境編譯安裝
mysql
安裝平臺:centos 6.8 2.6.32-642.el6.x86_64
Percina版本: Percona-Server-5.6.26-74.0-r32f8dfd-el6-x86_64-bundle.tar
獲取地址:https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.33-79.0/binary/redhat/6/x86_64/Percona-Server-5.6.33-79.0-r2084bdb-el6-x86_64-bundle.tar
安裝 epel-release-6-8.noarch.rpm libaio-0.3.107-10.el6.x86_64.rpm
安裝依賴關(guān)系 yum install -y gcc gcc-c++ make cmake automake autoconf libxml2 libxml2-devel zlib zlib-devel ncurses ncurses-devel
然后yum jemalloc //tokuDB內(nèi)存分配需要jemalloc支持
Percona-Server-5.6.26-74.0-r32f8dfd-el6-x86_64-bundle.tar 解壓后的安裝順序是:
tar xvf Percona-Server-5.6.26-74.0-r32f8dfd-el6-x86_64-bundle.tar
rpm -ivh Percona-Server-shared-56-5.6.26-rel74.0.el6.x86_64.rpm
rpm -ivh Percona-Server-devel-56-5.6.26-rel74.0.el6.x86_64.rpm
rpm -ivh Percona-Server-client-56-5.6.26-rel74.0.el6.x86_64.rpm
rpm -ivh Percona-Server-server-56-5.6.26-rel74.0.el6.x86_64.rpm
rpm -ivh Percona-Server-tokudb-56-5.6.26-rel74.0.el6.x86_64.rpm
修改系統(tǒng)參數(shù)
echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
建議寫到 /etc/rc.local 中,重啟后也可生效
啟動服務(wù):/etc/init.d/mysql start
修改mysql配置文件 vim /etc/my.cnf
添加 default-storage-engine=TokuDB
重啟服務(wù):/etc/init.d/mysql restart
輸入:ps_tokudb_admin --enable -uroot -p 密碼默認沒有設(shè)置為空
進入mysql,驗證:
apache
httpd依賴于apr, apr-util pcre-devel apr全稱為apache portable runtime,能實現(xiàn)httpd跨平臺運行 httpd-2.4 依賴于1.4+及以上版本的apr。
apache MPM event is not supported on this platform. 是因為apr和apr-util的版本較低,需要升級到1.5.0以上,所以重新選擇apr-1.5.2和apr-util-1.5.4的tar包進行再編譯。
pcre(Perl Compatible Regular Expressions)是一個Perl庫,包括 perl 兼容的正則表達式庫
tar xf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure && make && make install
vim
/etc/ld
.so.conf.d
/local
.conf
# 編輯庫文件
/usr/local/lib
# 添加該行
:wq
# 保存退出
ldconfig -
v
tar xf apr-1.5.2.tar.gz
cd apr-1.5.2
./configure --prefix=/usr/local/apr
make && make install
//當(dāng)出現(xiàn)rm: cannot remove `libtoolT': No such file or directory錯誤時修改configure文件,RM='$RM' ==> RM='$RM -f'在29605行左右。
tar xf apr-util-1.5.4.tar.gz
cd apr-util-1.5.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install
tar xf pcre-8.39.tar.gz
cd pcre-8.39
./configure --prefix=/usr/local/pcre
make && make install
tar xf httpd-2.4.23.tar.gz
cd httpd-2.4.23
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-nonportable-atomics=yes --with-crypto --enable-mods-shared=few --enable-so --enable-macro --enable-data --enable-http --with-libxml2 --enable-request --enable-include --enable-deflate --enable-logio --enable-expires --enable-usertrack --enable-ssl --enable-info --enable-cgid --enable-rewrite --enable-negotiation --enable-sed --enable-vhost-alias --enable-ratelimit --enable-allowmethods --enable-authn-db --enable-dbd --enable-charset-lite --enable-cache --enable-cache-disk --enable-cache-socache --enable-authnz-ldap --enable-ldap --enable-dav --enable-dav-fs --enable-dav-lock --with-ldap --enable-authnz-ldap --with-included-apr --enable-deflate
make && make install
cd /usr/local/apache/bin
ln -s /usr/local/apache/bin/apachectl /etc/init.d/httpd
vim /usr/local/apache/conf/httpd/conf
servername 127.0.0.1:80
/etc/init.d/httpd start
httpd -l
//提示錯誤:Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.時,將apr 和apr-util的解壓目錄cp 到 ./srclib/ 目錄下, 再進行編譯。
cp -rf /root/apr-1.5.2 ./httpd-2.4.23/srclib/apr
cp -rf /root/apr-util-1.5.4 ./httpd-2.4.23/srclib/apr-util
php
tar xf php-7.0.11.tar.gz
cd php-7.0.11
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-bz2 --with-curl --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-iconv-dir=/usr/local/lib/libconv --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local --with-zlib --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --enable-dom --enable-xml --enable-fpm --with-libdir=lib64 --enable-bcmath --enable-zip --enable-pcntl --enable-exif --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-opcache --enable-session --enable-mbregex --with-fpm-user=vagrant --with-fpm-group=nogroup --enable-wddx --with-mcrypt --enable-gd-native-ttf --enable-gd-jis-conv --with-openssl --with-zlib=/usr --with-recode=/usr --with-xmlrpc --enable-inline-optimization --disable-debug --disable-rpath --with-apxs2=/usr/local/apache/bin/apxs
make
make test
make install
vim /usr/local/apache/conf/httpd.conf
找到
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
修改成
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
找到
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
在后面加一行
AddType application/x-httpd-php .php
[root@localhost bin]# /usr/local/apache/bin/apachectl -t
Syntax OK
測試ok,在pkill httpd
最后重啟apache.
[root@localhost bin]# /usr/local/apache/bin/apachectl start
[root@localhost htdocs]#mv index.html index.php
[root@localhost htdocs]# cat index.php #修改成如下內(nèi)容
<?php
phpinfo();
?>
至此,LAMP環(huán)境編譯安裝完成。
zabbix
groupadd -g 201 zabbix
useradd -g zabbix -u 201 -s /sbin/nologin zabbix
tar zxvf zabbix-3.2.1.tar.gz
cd zabbix-3.2.1
./configure --prefix=/usr/local/zabbix --enable-server --enable-proxy --enable-agent --with-mysql=/usr/bin/mysql_config --with-net-snmp --with-libcurl
make && make install
mysql -e "create database zabbix default charset utf8;"
mysql -e "grant all on zabbix.* to zabbix@localhost identified by 'zabbix';"
mysql -uzabbix -pzabbix zabbix<./database/mysql/schema.sql
mysql -uzabbix -pzabbix zabbix<./database/mysql/p_w_picpaths.sql
mysql -uzabbix -pzabbix zabbix<./database/mysql/data.sql
mkdir /var/log/zabbix
chown -R zabbix.zabbix /var/log/zabbix
ln -s /usr/local/zabbix/etc/ /etc/zabbix
ln -s /usr/local/zabbix/bin/* /usr/bin/
ln -s /usr/local/zabbix/sbin/* /usr/sbin/
cp /root/zabbix-3.2.1/misc/init.d/fedora/core/zabbix_* /etc/init.d
chmod 755 /etc/init.d/zabbix_*
sed -i "s@BASEDIR=/usr/local@BASEDIR=/usr/local/zabbix@g" /etc/init.d/zabbix_server
sed -i "s@BASEDIR=/usr/local@BASEDIR=/usr/local/zabbix@g" /etc/init.d/zabbix_agentd
sed -i "s@DBUser=root@DBUser=zabbix@g" /etc/zabbix/zabbix_server.conf
sed -i "s@#DBPassword=@DBPassword=zabbix@g" /etc/zabbix/zabbix_server.conf
sed -i "s@# DBPassword=@DBPassword=zabbix@g" /etc/zabbix/zabbix_server.conf
sed -i "s@Server=127.0.0.1@Server=127.0.0.1,192.168.10.119@g" /etc/zabbix/zabbix_agentd.conf
sed -i "s@ServerActive=127.0.0.1@ServerActive=$IP:10051@g" /etc/zabbix/zabbix_agentd.conf
sed -i "s@BASEDIR=/usr/local@BASEDIR=/usr/local/zabbix@g" /etc/init.d/zabbix_agentd
sed -i "s@tmp/zabbix_agentd.log@var/log/zabbix/zabbix_agentd.log@g" /etc/zabbix/zabbix_agentd.conf
sed -i "s@^# UnsafeUserParameters=0@UnsafeUserParameters=1\n@g" /etc/zabbix/zabbix_agentd.conf
cp -r /root/zabbix-3.2.1/frontends/php/ /usr/local/apache/htdocs/zabbix/
chown -R apache.apache /usr/local/apache/htdocs/zabbix/
chkconfig zabbix_server on
chkconfig zabbix_agentd on
service zabbix_server start
service zabbix_agentd start
網(wǎng)頁題目:zabbix3.2編譯安裝
網(wǎng)址分享:http://www.rwnh.cn/article20/jiphjo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站排名、網(wǎng)站設(shè)計、營銷型網(wǎng)站建設(shè)、網(wǎng)站收錄、電子商務(wù)、網(wǎng)站改版
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)