一、安装Mariadb数据库
centos7上安装mariadb数据库yum install mariadb-server mariadb -y
systemctl start mariadb
systemctl enable mariadb
mariadb数据库[root@zbxserver ~]# mysql_secure_installation
Enter current password for root (enter for none): ##这里回车一次
Set root password? [Y/n] y ##这里输入y并回车一次
New password: ##这里输入一次root账号的密码,并回车一次。啰嗦,这里输入密码是不会显示的。
Re-enter new password: ##这里再输入一次root账号的密码,并回车一次。
Password updated successfully!
Reloading privilege tables..
... Success!
Remove anonymous users? [Y/n] y ##这里输入y并回车一次
... Success!
Disallow root login remotely? [Y/n] n ##这里输入n并回车一次
... skipping.
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] n ##这里输入n并回车一次
... skipping.
Reload privilege tables now? [Y/n] y ##这里输入y并回车一次
... Success!
Thanks for using MariaDB!
zabbix所需的数据库、用户MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> create user zabbix@localhost identified by '你的密码';
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost;
MariaDB [(none)]> exit
#在上面第三行中的“你的密码”写上用户zabbix的数据库密码,等会要用到
二、Zabbix5.0 server端的安装
systemctl stop firewalld
systemctl disable firewalld
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
hostnamectl set-hostname zbxserver
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
zabbix的yum源zabbix源rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
2-2.修改zabbix源地址为阿里云的zabbix镜像地址
vim /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/frontend
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-debuginfo]
name=Zabbix Official Repository debuginfo - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/debuginfo/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
gpgcheck=0
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/non-supported/rhel/7/x86_64/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=0
#将zabbix官方的地址替换为阿里云的zabbix地址
zabbix(可略)yum list | grep zabbix
zabbix主服务和agent程序yum install zabbix-server-mysql zabbix-agent -y
SCL组件yum install centos-release-scl -y
yum install zabbix-web-mysql-scl zabbix-apache-conf-scl -y
#如果提示没有php的话请安装
yum install rh-php72-php-mbstring rh-php72-php-bcmath rh-php72-php-gd rh-php72-php-mysqlnd rh-php72-php-xml rh-php72-php-ldap rh-php72-php-fpm rh-php72 -y
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
zabbix server的主配置文件、修改数据库密码cp /etc/zabbix/zabbix_server.conf{,.bak}
vim /etc/zabbix/zabbix_server.conf
#将【DBPassword=】 修改为 【DBPassword=你的密码】然后保存退出
#注释:这里的密码就是刚才设置的数据库用户zabbix的密码,要保持一致
zabbix的前端页面的php时区cp /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf{,.bak}
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
#将; php_value[date.timezone] = Europe/Riga 修改为 php_value[date.timezone] = Asia/Shanghai
#如果这行配置前面有#或者;,请删掉,然后保存退出即可
zabbix server 及相关服务,并设置为开机自启systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
zabbix是否安装成功[root@zbxserver ~]# netstat -ntlup |grep zabbix
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 10753/zabbix_agentd
tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 16598/zabbix_server
tcp6 0 0 :::10050 :::* LISTEN 10753/zabbix_agentd
tcp6 0 0 :::10051 :::* LISTEN 16598/zabbix_server
注释:zabbix server使用的端口是10051,zabbix agent的端口是10050,这非常重要。
如果发现没有10050或者10051端口,那么请检查zabbix的日志。从日志中你将能很快定位问题点
tail -f /var/log/zabbix/zabbix_server.log
还可以使用命令mysql -u zabbix -p检查数据库是否正确
zabbix server 的页面打开浏览器,输入地址【http://本机IP/zabbix】
大概是第一页是zabbix的前端检查各个组件是否ok,必须全部是绿色打钩的
然后输入数据库的密码,密码就是数据库用户zabbix的密码
我想为Heroku构建一个Rails3应用程序。他们使用Postgres作为他们的数据库,所以我通过MacPorts安装了postgres9.0。现在我需要一个postgresgem并且共识是出于性能原因你想要pggem。但是我对我得到的错误感到非常困惑当我尝试在rvm下通过geminstall安装pg时。我已经非常明确地指定了所有postgres目录的位置可以找到但仍然无法完成安装:$envARCHFLAGS='-archx86_64'geminstallpg--\--with-pg-config=/opt/local/var/db/postgresql90/defaultdb/po
我打算为ruby脚本创建一个安装程序,但我希望能够确保机器安装了RVM。有没有一种方法可以完全离线安装RVM并且不引人注目(通过不引人注目,就像创建一个可以做所有事情的脚本而不是要求用户向他们的bash_profile或bashrc添加一些东西)我不是要脚本本身,只是一个关于如何走这条路的快速指针(如果可能的话)。我们还研究了这个很有帮助的问题:RVM-isthereawayforsimpleofflineinstall?但有点误导,因为答案只向我们展示了如何离线在RVM中安装ruby。我们需要能够离线安装RVM本身,并查看脚本https://raw.github.com/wayn
我有一个奇怪的问题:我在rvm上安装了rubyonrails。一切正常,我可以创建项目。但是在我输入“railsnew”时重新启动后,我有“程序'rails'当前未安装。”。SystemUbuntu12.04ruby-v"1.9.3p194"gemlistactionmailer(3.2.5)actionpack(3.2.5)activemodel(3.2.5)activerecord(3.2.5)activeresource(3.2.5)activesupport(3.2.5)arel(3.0.2)builder(3.0.0)bundler(1.1.4)coffee-rails(
我刚刚为fedora安装了emacs。我想用emacs编写ruby。为ruby提供代码提示、代码完成类型功能所需的工具、扩展是什么? 最佳答案 ruby-mode已经包含在Emacs23之后的版本中。不过,它也可以通过ELPA获得。您可能感兴趣的其他一些事情是集成RVM、feature-mode(Cucumber)、rspec-mode、ruby-electric、inf-ruby、rinari(用于Rails)等。这是我当前用于Ruby开发的Emacs配置:https://github.com/citizen428/emacs
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我的最终目标是安装当前版本的RubyonRails。我在OSXMountainLion上运行。到目前为止,这是我的过程:已安装的RVM$\curl-Lhttps://get.rvm.io|bash-sstable检查已知(我假设已批准)安装$rvmlistknown我看到当前的稳定版本可用[ruby-]2.0.0[-p247]输入命令安装$rvminstall2.0.0-p247注意:我也试过这些安装命令$rvminstallruby-2.0.0-p247$rvminstallruby=2.0.0-p247我很快就无处可去了。结果:$rvminstall2.0.0-p247Search
我实际上是在尝试使用RVM在我的OSX10.7.5上更新ruby,并在输入以下命令后:rvminstallruby我得到了以下回复:Searchingforbinaryrubies,thismighttakesometime.Checkingrequirementsforosx.Installingrequirementsforosx.Updatingsystem.......Errorrunning'requirements_osx_brew_update_systemruby-2.0.0-p247',pleaseread/Users/username/.rvm/log/138121
由于fast-stemmer的问题,我很难安装我想要的任何rubygem。我把我得到的错误放在下面。Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingfast-stemmer:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/rubyextconf.rbcreatingMakefilemake"DESTDIR="cleanmake"DESTDIR=
我是Google云的新手,我正在尝试对其进行首次部署。我的第一个部署是RubyonRails项目。我基本上是在关注thisguideinthegoogleclouddocumentation.唯一的区别是我使用的是我自己的项目,而不是他们提供的“helloworld”项目。这是我的app.yaml文件runtime:customvm:trueentrypoint:bundleexecrackup-p8080-Eproductionconfig.ruresources:cpu:0.5memory_gb:1.3disk_size_gb:10当我转到我的项目目录并运行gcloudprevie
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub