centos6.8编译安装lnmp环境

davie_2020 davie_2020     2022-10-05     142

关键词:

Centos 6.8编译安装LNMP环境

参考资料:

http://www.jb51.net/article/107429.htm

https://phperzh.com/articles/1360

准备工作

 

环境介绍:

 

OSCentos 6.8 最小化安装

 

Nginxnginx-1.12.2.tar.gz

 

mysqlmysql-boost-5.7.20.tar.gz

 

phpphp-7.2.0.tar.bz2

 

1.1、关闭SELINUX

# 修改配置文件,重启服务后永久生效。

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

# 命令行设置立即生效

setenforce 0

[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

[root@localhost ~]# setenforce 0

[root@localhost ~]# 

1.2、防火墙设置

 

cp /etc/sysconfig/iptables /root/iptables.bak
cat >/etc/sysconfig/iptables <<EOF 
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT DROP [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
EOF
# 重启
/etc/init.d/iptables  restart

 

1.3、修改主机名称

hostname webserver
sed -i 's/HOSTNAME=localhost.localdomain/HOSTNAME=webserver/g' /etc/sysconfig/network
sed -n '/HOSTNAME/p' /etc/sysconfig/network
[root@localhost ~]# hostname webserver
[root@localhost ~]# sed -i 's/HOSTNAME=localhost.localdomain/HOSTNAME=webserver/g' /etc/sysconfig/network
[root@localhost ~]# sed -n '/HOSTNAME/p' /etc/sysconfig/network
HOSTNAME=webserver
[root@localhost ~]# 

1.4、修改网卡ip信息

cat >/etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF
TYPE=Ethernet
BOOTPROTO=static
NAME=eth0
DEVICE=eth0
ONBOOT=yes
IPADDR=172.16.210.126
NETMASK=255.255.255.0
GATEWAY=172.16.210.250
EOF

#  重启网卡服务
/etc/init.d/network restart

1.5、修改dns

#  修改dns
cat >/etc/resolv.conf <<EOF
nameserver 172.16.110.11
nameserver 8.8.8.8
EOF

[root@webserver ~]# cat >/etc/resolv.conf <<EOF
> nameserver 172.16.110.11
> nameserver 8.8.8.8
> EOF
[root@webserver ~]# 

1.6Centos最小化安装推荐常用依赖包

#    Centos最小化安装推荐常用依赖包
yum  clean all
yum -y update
yum -y install gcc-c++ gd libxml2-devel libjpeg-devel libpng-devel net-snmp-devel wget telnet   
yum -y install curl-devel libxslt-devel pcre-devel libjpeg libpng libcurl4-openssl-dev 
yum -y install libcurl-devel libcurl freetype-config freetype freetype-devel unixODBC libxslt 
yum -y install gcc automake autoconf libtool openssl-devel bison vim gcc-g77
yum -y install perl-devel perl-ExtUtils-Embed libcurl-devel.x86_64 zip unzip
yum -y install cmake ncurses-devel.x86_64  openldap-devel.x86_64 lrzsz  openssh-clients    
yum -y install libmcrypt libmcrypt-devel mhash mhash-devel bzip2 bzip2-devel
yum -y install ntpdate rsync svn  patch  iptables iptables-services
yum -y install libevent libevent-devel  cyrus-sasl cyrus-sasl-devel libcurl.x86_64
yum -y install gd-devel libmemcached-devel memcached git libssl-devel libyaml-devel auto make
yum -y install gcc.x86_64 libxml2.x86_64 libxml2-devel.x86_64 openssl.x86_64 openssl-devel.x86_64   
yum -y install gd.x86_64 gd-devel.x86_64  gcc-c++.x86_64 readline.x86_64 readline-devel.x86_64 
yum -y groupinstall "Server Platform Development" "Development tools"
yum -y groupinstall "Development tools" 

1.7、时间同步服务

cat >/root/ntp.sh <<EOF
#!/bin/bash
# ntp.sh
#NTP服务器数组列表
ntpServer=(
[0]=1.cn.pool.ntp.org
[1]=2.cn.pool.ntp.org
[2]=3.cn.pool.ntp.org
[3]=0.cn.pool.ntp.org
)

#校验#
serverNum=`echo \${#ntpServer[*]}`
NUM=0
for ((i=0; i<=\$serverNum; i++)); do
    echo -n "正在和NTP服务器:\${ntpServer[\$NUM]}校验中..."
    /usr/sbin/ntpdate \${ntpServer[\$NUM]} >> /dev/null 2>&1
    if [ \$? -eq 0 ]; then
        echo -e "\e[1;32m\t[成功]\e[0m"
        echo -e "\e[1;32m同步成功,退出......\e[0m"
        break
    else
        echo -e "\e[1;31m\t[失败]\e[0m"
        echo -e "\e[1;31m继续同步下一个!!!!!\e[0m"
        let NUM++
    fi
    sleep 2
done
EOF
chmod +x /root/ntp.sh
sh /root/ntp.sh

二、安装Nginx

2.1、下载源码包

# 上Nginx官网,复制最新稳定版的下载地址过来,然后用wget下载
cd /usr/local/src
wget https://nginx.org/download/nginx-1.12.2.tar.gz
[root@webserver ~]# cd /usr/local/src
[root@webserver src]# wget https://nginx.org/download/nginx-1.12.2.tar.gz

2.2、编译安装

 

tar xvf nginx-1.12.2.tar.gz
cd /usr/local/src/nginx-1.12.2
./configure \
--prefix=/usr/local/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/home/log/nginx/error.log \
--http-log-path=/home/log/nginx/access.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \
--http-client-body-temp-path=/home/tmp/nginx/client \
--http-proxy-temp-path=/home/tmp/nginx/proxy \
--http-fastcgi-temp-path=/home/tmp/nginx/fcgi \
--http-uwsgi-temp-path=/home/tmp/nginx/uwsgi \
--http-scgi-temp-path=/home/tmp/nginx/scgi \
--user=nginx \
--group=nginx \
--with-pcre \
--with-http_v2_module \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_stub_status_module \
--with-http_auth_request_module \
--with-mail \
--with-mail_ssl_module \
--with-file-aio \
--with-http_v2_module \
--with-threads \
--with-stream \
--with-stream_ssl_module

 

#  完成后执行编译:
#  make && make install
make -j `grep processor /proc/cpuinfo | wc -l` 
make -j `grep processor /proc/cpuinfo | wc -l`  install

2.3、创建相应的目录

 

mkdir -p /home/tmp/nginx/client
mkdir -p /home/log/nginx
chmod 777 /home/tmp/
chmod 777 /home/log/
[root@webserver nginx-1.12.2]# mkdir -p /home/tmp/nginx/client
[root@webserver nginx-1.12.2]# mkdir -p /home/log/nginx
[root@webserver nginx-1.12.2]# chmod 777 /home/tmp/
[root@webserver nginx-1.12.2]# chmod 777 /home/log/

 

2.4、启动nginx服务

 

cd /root/
useradd -s /sbin/nologin -M nginx
/usr/sbin/nginx
ps -ef|grep nginx
curl http://172.16.210.126

[root@webserver ~]# cd /root/
[root@webserver ~]# useradd -s /sbin/nologin -M nginx
[root@webserver ~]# /usr/sbin/nginx
[root@webserver ~]# ps -ef|grep nginx
root     19206     1  0 15:41 ?        00:00:00 nginx: master process /usr/sbin/nginx
nginx    19207 19206  0 15:41 ?        00:00:00 nginx: worker process
root     19209  1625  0 15:41 pts/0    00:00:00 grep nginx
[root@webserver ~]# 
[root@webserver ~]# curl http://172.16.210.126
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
[root@webserver ~]# 

 

2.5、设置nginx快捷方式

 

alias nginx.start='/usr/sbin/nginx'
alias nginx.stop='/usr/sbin/nginx -s stop'
alias nginx.reload='/usr/sbin/nginx -s reload'
alias nginx.config_test='/usr/sbin/nginx -t'

cat >>/root/.bashrc <<EOF
alias nginx.start='/usr/sbin/nginx'
alias nginx.stop='/usr/sbin/nginx -s stop'
alias nginx.reload='/usr/sbin/nginx -s reload'
alias nginx.config_test='/usr/sbin/nginx -t'

EOF
cat /root/.bashrc
source  /root/.bash_profile 

[root@webserver ~]# alias nginx.start='/usr/sbin/nginx'
[root@webserver ~]# alias nginx.stop='/usr/sbin/nginx -s stop'
[root@webserver ~]# alias nginx.reload='/usr/sbin/nginx -s reload'
[root@webserver ~]# alias nginx.config_test='/usr/sbin/nginx -t'
[root@webserver ~]# cat /root/.bashrc 
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi
alias nginx.start='/usr/sbin/nginx'
alias nginx.stop='/usr/sbin/nginx -s stop'
alias nginx.reload='/usr/sbin/nginx -s reload'
alias nginx.config_test='/usr/sbin/nginx -t'
[root@webserver ~]#
[root@webserver ~]# source  /root/.bash_profile 

 

二、安装mysql

3.1、版本选择

在安装之前必须明白一件事情,mysql有很多种安装方式,每种不一样,不要弄混了。比如源码编译安装和二进制安装这里我们用源码自己编译安装。

3.2、数据库存放目录及权限修改

 

mkdir -p /home/data/mysql
groupadd -r mysql
useradd -r -g mysql -s /sbin/nologin mysql
id mysql
# 更改数据目录权限。
chown -R mysql:mysql /home/data/mysql

[root@webserver ~]# mkdir -p /home/data/mysql
[root@webserver ~]# groupadd -r mysql
[root@webserver ~]# useradd -r -g mysql -s /sbin/nologin mysql
[root@webserver ~]# id mysql
uid=497(mysql) gid=497(mysql) groups=497(mysql)
[root@webserver ~]# chown -R mysql:mysql /home/data/mysql

 

3.3、下载解压安装

下载并解压编译官网下载的稳定版的源码包。在下载的时候注意一下版本,下载对应的版本。我们源码编译,要下载长这样的安装包:同时在安装的时候我们需要boost库,5.7需要1.59版本的库;你可以下载boost库然后编译boost,或者像我一样,下载带有boost库的mysql版本,再开始解压编译。

 

################# 报错处理说明开始################
## 报错信息,原因是网络问题,导致无法下载boost_1_59_0.tar.gz,可以手工下载,
# 然后拷贝到对应的目录下,重新解压mysql,进入目录编译
#  -- Packaging as: mysql-5.7.20-Linux-x86_64
#  -- Downloading boost_1_59_0.tar.gz to /usr/local/mysql/boost/boost_1_59_0
#  -- Download failed, error: 22;"HTTP response code said error"
#  CMake Error at cmake/boost.cmake:194 (MESSAGE):
#    You can try downloading
#    http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz
#    manually using curl/wget or a similar tool
#  Call Stack (most recent call first):
#    CMakeLists.txt:491 (INCLUDE)
#  [root@php1 ~]# wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz
#  [root@php1 ~]# cp boost_1_59_0.tar.gz /usr/local/mysql/boost/boost_1_59_0/
#  [root@php1 ~]# ll /usr/local/mysql/boost/boost_1_59_0/
#  total 81756
#  drwx------ 8 mysql mysql     4096 Dec  8 10:04 boost_1_59_0
#  -rw-r--r-- 1 mysql mysql 83709983 Dec  8 10:04 boost_1_59_0.tar.gz
#  [root@php1 ~]# 
cd /usr/local/mysql/boost/boost_1_59_0/
wget http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz
# cp boost_1_59_0.tar.gz /usr/local/mysql/boost/boost_1_59_0 
cd /usr/local/src/
rm -rf mysql-5.7.20/
tar xvf mysql-boost-5.7.20.tar.gz -C /usr/local/src
cd /usr/local/src/mysql-5.7.20
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/home/data/mysql_3310  \
-DSYSCONFDIR=/etc \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DWITH_SSL=system \
-DWITH_ZLIB=system \
-DWITH_LIBWRAP=0 \
-DMYSQL_TCP_PORT=3310 \
-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysqld_3310.sock \
-DDEFAULT_CHARSET=utf8 \
-DWITH_EXTRA_CHARSETS=all \
-DDEFAULT_COLLATION=utf8_general_ci \
-DDOWNLOAD_BOOST=1 \
-DWITH_BOOST=/usr/local/mysql/boost/boost_1_59_0 

#  make && make install
make -j `grep processor /proc/cpuinfo | wc -l` &&
make -j `grep processor /proc/cpuinfo | wc -l`  install
#  参考资料: https://my.oschina.net/Kilar/blog/540856

################# 报错处理说明结束################

 

cd /usr/local/src/
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.20.tar.gz
tar xvf mysql-boost-5.7.20.tar.gz -C /usr/local/src
cd /usr/local/src/mysql-5.7.20
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/home/data/mysql \
-DSYSCONFDIR=/etc \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DWITH_SSL=system \
-DWITH_ZLIB=system \
-DWITH_LIBWRAP=0 \
-DMYSQL_TCP_PORT=3310 \
-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysqld_3310.sock \
-DDEFAULT_CHARSET=utf8 \
-DWITH_EXTRA_CHARSETS=all \
-DDEFAULT_COLLATION=utf8_general_ci \
-DDOWNLOAD_BOOST=1 \
-DWITH_BOOST=/usr/local/mysql/boost/boost_1_59_0 

#  make && make install
make -j `grep processor /proc/cpuinfo | wc -l` 
make -j `grep processor /proc/cpuinfo | wc -l`  install
#  参考资料: https://my.oschina.net/Kilar/blog/540856

3.4、修改目录权限

 

chown -R mysql:mysql /usr/local/mysql/
[root@webserver mysql-5.7.20]# chown -R mysql:mysql /usr/local/mysql/

 

3.5、创建my.cnf配置文件

 

# 排除干扰因素
if [ -f "/etc/my.cnf" ]; then
    mv /etc/my.cnf /etc/my.cnf.bak
fi

cat > /usr/local/mysql/my_3310.cnf <<EOF
[client]
port = 3310
socket=/usr/local/mysql/mysqld_3310.sock
#character_set_server = utf8
#default-character-set = utf8mb4
#default-character-set = utf8

[mysqld]
basedir=/usr/local/mysql
datadir=/home/data/mysql_3310/
socket=/usr/local/mysql/mysqld_3310.sock
user = mysql
port = 3310

#character_set_server = utf8mb4
#init-connect = 'SET NAMES utf8'
character_set_server = utf8
init-connect = 'SET NAMES utf8'

#skip-name-resolve
#skip-networking
back_log = 512

max_connections = 1000
max_connect_errors = 6000
open_files_limit = 65535
table_open_cache = 1024
max_allowed_packet = 32M
binlog_cache_size = 32M
max_heap_table_size = 32M
tmp_table_size = 32M
 
read_buffer_size = 8M
read_rnd_buffer_size =32M
sort_buffer_size = 16M
join_buffer_size = 16M
key_buffer_size = 16M
 
thread_cache_size = 256
 
query_cache_type = 0
query_cache_size = 0
#query_cache_limit = 2M
 
server_id = 1503310
log-bin = /home/data/mysql_3310/mysql-bin
log_bin_index = /home/data/mysql_3310/binlog.index
binlog_format = row
expire_logs_days = 60

lower_case_table_names = 1
#binlog_ignore_db = mysql
#replicate-do-db = mysql
sql_mode="NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES"

performance_schema = 0
explicit_defaults_for_timestamp=1

log_error = /home/data/mysql_3310/err_mysql_3310.log
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /home/data/mysql_3310/mysql-slow.log

default_storage_engine = InnoDB
innodb_file_per_table = 1
innodb_open_files = 1024
innodb_buffer_pool_size = 2G
innodb_write_io_threads = 16
innodb_read_io_threads = 16
innodb_thread_concurrency = 0
innodb_purge_threads = 1
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 2M
innodb_log_file_size = 32M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 60
innodb_lock_wait_timeout = 120
 
bulk_insert_buffer_size = 8M
myisam_sort_buffer_size = 8M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1
 
interactive_timeout = 28800
wait_timeout = 28800


[mysql.server]
character_set_server = utf8
socket=/usr/local/mysql/mysqld_3310.sock

[mysqld_safe]
log-error=/home/data/mysql_3310/err_mysql_3310.log
pid-file=/home/data/mysql_3310/mysql_3310.pid
character_set_server = utf8

[mysql]
socket=/usr/local/mysql/mysqld_3310.sock
default-character-set = utf8

[mysqldump]
socket=/usr/local/mysql/mysqld_3310.sock
default-character-set = utf8
[mysqladmin]
socket=/usr/local/mysql/mysqld_3310.sock
character_set_server = utf8" 
EOF

 

# 具体执行如下
[root@webserver mysql-5.7.20]# rm -rf /etc/my.cnf
[root@webserver mysql-5.7.20]# cat /usr/local/mysql/my_3310.cnf
[client]
port = 3310
socket=/usr/local/mysql/mysqld_3310.sock
#character_set_server = utf8
#default-character-set = utf8mb4
#default-character-set = utf8

[mysqld]
basedir=/usr/local/mysql
datadir=/home/data/mysql_3310/
socket=/usr/local/mysql/mysqld_3310.sock
user = mysql
port = 3310

#character_set_server = utf8mb4
#init-connect = 'SET NAMES utf8'
character_set_server = utf8
init-connect = 'SET NAMES utf8'

#skip-name-resolve
#skip-networking
back_log = 512

max_connections = 1000
max_connect_errors = 6000
open_files_limit = 65535
table_open_cache = 1024
max_allowed_packet = 32M
binlog_cache_size = 32M
max_heap_table_size = 32M
tmp_table_size = 32M
 
read_buffer_size = 8M
read_rnd_buffer_size =32M
sort_buffer_size = 16M
join_buffer_size = 16M
key_buffer_size = 16M
 
thread_cache_size = 256
 
query_cache_type = 0
query_cache_size = 0
#query_cache_limit = 2M
 
server_id = 1503310
log-bin = /home/data/mysql_3310/mysql-bin
log_bin_index = /home/data/mysql_3310/binlog.index
binlog_format = row
expire_logs_days = 60

lower_case_table_names = 1
#binlog_ignore_db = mysql
#replicate-do-db = mysql
sql_mode="NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES"

performance_schema = 0
explicit_defaults_for_timestamp=1

log_error = /home/data/mysql_3310/err_mysql_3310.log
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /home/data/mysql_3310/mysql-slow.log

default_storage_engine = InnoDB
innodb_file_per_table = 1
innodb_open_files = 1024
innodb_buffer_pool_size = 2G
innodb_write_io_threads = 16
innodb_read_io_threads = 16
innodb_thread_concurrency = 0
innodb_purge_threads = 1
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size = 2M
innodb_log_file_size = 32M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_

基于centos6.8平台最新源代码包编译安装lnmp环境搭建(nginx+mysql+php)

部署环境系统:CentOS6.8x86_64Nginx:1.11.3MySQL:5.7.14PHP:7.0.10pcre:8.39zlib:1.2.8openssl:1.0.1tfreetype:2.6.5libmcrypt:2.5.8boost:1.59.0cmake:3.6.1部署准备使用客户机浏览器访问freetype官网 https://www.freetype.org/&nbs 查看详情

使用编译搭建lnmp环境

...要逐一安装这几个包下面我们就逐一安装各种包安装环境centos6.8_64一、安装Nginx1.10.3卸载Linux自带的MySQL5.1.73、安装Nginx使用下面命令卸载yumremovemysql-y安装Nginx需要的依赖包yum-yinstallgccgcc-c++autoconfautomakezlibzlib- 查看详情

centos6.8下一键安装lamp环境

【下载地址】  https://lamp.sh/  https://lnmp.org/install.html【安装方法】  https://lamp.sh/install.html  执行脚本后,将会依次选择安装的软件包,选择完成后,按任意键运行脚本即可    https://lnmp.org/install.html  安装... 查看详情

centos6.8下一键安装lamp环境

【下载一键安装软件包】  百度云地址:https://pan.baidu.com/s/1TZqGKtE-46gxW96Ptfp4gA  网址:https://lnmp.org/【步骤】  通过第三方远程工具将软件包传入后,使用tar命令解压,进入解压后的文件夹,执行install.sh,如果是无人值守的请在... 查看详情

centos6.8安装lnmp

 一、配置CentOS第三方yum源(CentOS默认的标准源里没有nginx软件包) [[email protected]~]#yuminstallwget#安装下载工具wget[[email protected]~]#wgethttp://www.atomicorp.com/installers/atomic #下载atomicyum源[[em 查看详情

centos6.8源码编译安装zabbix3.4.1

...运行环境为Linux+PHP+Nginx+MySQL,以下为安装详细版本环境:Centos6.8+PHP7.1.8+Nginx1.10.0+MySQL5.7.17+Zabbix3.4.1其次,关闭防火墙和SELINUXserviceiptbalesstopsetenforce0二、安装配置Zabbix1)先安装Zabbix需要的插件yuminstalllibdbi 查看详情

centos6.8安装cacti

    cacti环境基于LAMP,本实验LAMP环境已编译安装成功。若直接yum安装cacti环境会把httpd,mysql,php也yum安装,与我们编译安装的LAMP环境造成冲突,所以本次实验只安装cacti,rrdtool,net-snmp.    安装rrdtoolyum&nb... 查看详情

centos6.8安装lnmp+zabbix3.0.2

系统:centos6.8Zabbix-server(服务端):192.168.137.36Zabbix-agent(客户端):192.168.137.35以下是zabbix-server服务端安装操作 yuminstalllrzsz-y 安装nginxrpm-ivhhttp://dl.fedoraproject.org/pub/epel/6/x86_64/epel-releas 查看详情

centos6.8编译grpc总结

参考技术A由于历史遗留问题,需要在Centos6.8这个过时的系统版本上编译grpc,总结一下几个遇到的问题。来源于InstallSkyWalkingPHPAgent然后参考https://gcc.gnu.org/wiki/InstallingGCC,安装:并且,stdlibc++的版本也不够新,那么在objdir目录下... 查看详情

源码编译安装lnmp架构环境

源码编译安装LNMP架构环境OS版本:2.6.32-431.el6.x86_64Nginx版本:nginx-1.6.1mariadb版本:mariadb-10.0.13php版本:php-5.4.261、安装编译安装所需系统环境~]#yumgroupinstall"DevelopmentTools""ServerPlatformDevelopment"-y2、编译安装nginx-1.6.1#yum 查看详情

centos6.8编译安装git2.11.0

系统环境:CentOSrelease6.8(Final)默认Git:1.7.1需求git:2.11卸载centos自带的git:yumremovegit-y下载git-2.11.0.tar.gz上传至服务器,下载链接:http://distfiles.macports.org/git/解压安装git并添加git到环境变量cd /usr/local/src/tar zxvf&nb 查看详情

源码编译安装lnmp环境

一、源码编译安装步骤首先说明源码安装的好处  速度快,可自定义路径主要有三步:1.配置进入源码安装包 ./configure--prefix=/uer/local/nginx 可指定参数--prefix为安装路径2.编译相当于rpm包 make3.安装makeinstall如果安... 查看详情

lnmp环境编译安装(代码片段)

先安装nginx我的lnmp时编译安装的,下载Nginx安装包wgethttp://nginx.org/download/nginx-1.13.4.tar.gz关闭selinux和防火墙setenforce0serviceiptablesstop检查安装依赖项 (执行下面的命令安装nginx的依赖库)yum-yinstallgccpcrepcre-develzlibzlib-develo 查看详情

saltstack之编译安装lnmp环境

  使用saltstack编译安装LNMP环境  一,系统版本查看   二,安装salt-master和salt-minion  安装配置过程参考SaltStack概述及安装   三,修改配置文件   /etc/salt/master设置根的两个目录   四,设置Nginx安装... 查看详情

lnmp环境搭建

...1)创建用户(2)安装所需的依赖包(3)解压(4)配置编译程序(5)编译并安装php(6)修改配置文件(7)启动php4.安装Nginx(1)下载(2)解压nginx(3)配置编译参数(4)编译nginx(5)安装nginx(6)编写nginx启动 查看详情

lnmp环境编译安装

安装nginx[[email protected]src]#tar-xfnginx-1.6.2.tar.gz [[email protected]src]#lsnginx-1.6.2 nginx-1.6.2.tar.gz[[email protected]nginx-1.6.2]#[[email protected]nginx-1.6.2 查看详情

centos6.8源码安装部署zabbix3.4.5

本文档主要介绍CentOS6.8在lamp环境下安装以及部署Zabbix3.4.5(注:本文部署环境为php-5.6.23+mysql-5.6.24+httpd-2.2.15+CentOS6.8)基本流程:1.准备编译环境2.yum源配置并且安装php和Apche的所需包3.mysql服务的启动和创建zabbix账号4.下载zabbix3.4.5... 查看详情

centos6.8源码安装部署zabbix3.4.5

本文档主要介绍CentOS6.8在lamp环境下安装以及部署Zabbix3.4.5(注:本文部署环境为php-5.6.23+mysql-5.6.24+httpd-2.2.15+CentOS6.8)基本流程:1.准备编译环境2.国内阿里云yum源配置并且安装php和Apche的所需包3.mysql服务的启动和创建zabbix账号4.... 查看详情