ubuntu 14 编译安装apache traffic server 7.x

wget http://apache.parentingamerica.com/trafficserver/trafficserver-7.1.0.tar.bz2
tar xvf trafficserver-7.1.0.tar.bz2
apt-get install libssl1.0.0 libssl-dev libsslcommon2 tcl-dev

wget https://ftp.pcre.org/pub/pcre/pcre-8.40.tar.gz
./configure
make && make install

./configure –prefix=/usr/local/ats –with-pcre=/opt/trafficserver-7.1.0/pcre-8.40/
make && make install

ubuntu 14.04 安装 zabbix server 3.2

安装基础依赖环境
apt-get update
apt-get upgrade
apt-get install apache2 mysql-server php5 php5-cli php5-common php5-mysql
修改php时区
vim /etc/php5/apache2/php.ini
[Date]
; http://php.net/date.timezone
date.timezone = 'Asia/Shanghai'
安装zabbix
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+trusty_all.deb
dpkg -i zabbix-release_3.2-1+trusty_all.deb
apt-get update
apt-get install zabbix-server-mysql zabbix-frontend-php
创建基础数据库
mysql -u root -p
mysql> CREATE DATABASE zabbix;
mysql> GRANT ALL on zabbix.* to [email protected] IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
修改zabbix server配置文件
vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=password
导入基础数据库
cd /usr/share/doc/zabbix-server-mysql
zcat create.sql.gz | mysql -u root -p zabbix
重启apache2、zabbix server
service apache2 restart
service zabbix-server restart
访问http://server_ip/zabbix/ 进行初始安装

解决Mysql无法启动

Mysql有的时候,会莫名丢失sock文件,造成无法启动,查阅了大量的资料,记录一下,方便以后查阅。

mysql.sock丢失

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

首先查看mysql的日志,如果没有开启,去/etc/my.cnf开启

expire_logs_days = 10
log_error = /var/log/mysql/error.log

然后重启mysql,这时候错误日志已经生成了,查看日志一般都可以解决。

一般情况下去 /etc/mysql/ 删除my.cnf 重启就可以了