日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長(zhǎng)提供免費(fèi)收錄網(wǎng)站服務(wù),提交前請(qǐng)做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點(diǎn)擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會(huì)員:747

1、系統(tǒng)初始化

# 關(guān)閉防火墻

systemctl stop firewalld

systemctl disable firewalld

 

# 關(guān)閉selinux

sed -i 's/enforcing/disabled/' /etc/selinux/config #永久

setenforce 0 # 臨時(shí)

 

# 關(guān)閉THP

echo never > /sys/kernel/mm/transparent_hugepage/enabled

echo never > /sys/kernel/mm/transparent_hugepage/defrag

 

# 時(shí)間同步

yum install ntpdate -y

ntpdate time.windows.com

echo "*/5 * * * * /usr/sbin/ntpdate ntp.api.bz >/dev/null 2 >&1" >> /var/spool/cron/root

 

2、安裝JAVA環(huán)境

tar -xzf jdk-11.0.9_linux-x64_bin.tar.gz -C /usr/local/

cd /usr/local/

mv jdk-11.0.9 java

 

啟用環(huán)境變量:

cat << EOF >> /etc/profile

JAVA_HOME=/usr/local/java

JAVA_BIN=$JAVA_HOME/bin

PATH=$PATH:$JAVA_BIN

CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export JAVA_HOME JAVA_BIN PATH CLASSPATH

EOF

然后source 使其生效

ln -vs /usr/local/java/bin/java /usr/bin/java

source /etc/profile

java -version

3、安裝并配置MySQL

wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar

rpm -qa | grep mariadb

rpm -e mariadb-libs-5.5.60-1.el7_5.x86_64 --nodeps

tar -xvf mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar

rpm -ivh mysql-community-common-8.0.28-1.el7.x86_64.rpm --nodeps --force

rpm -ivh mysql-community-libs-8.0.28-1.el7.x86_64.rpm --nodeps --force

rpm -ivh mysql-community-client-8.0.28-1.el7.x86_64.rpm --nodeps --force

rpm -ivh mysql-community-server-8.0.28-1.el7.x86_64.rpm --nodeps --force

 

rpm -qa | grep mysql

mysqld --initialize

chown mysql:mysql /var/lib/mysql -R

mkdir /data

mv /var/lib/mysql /data/

 

cat /etc/my.cnf

[client]

port = 3306

socket = /tmp/mysql.sock

#skip-name-resolve

max_allowed_packet = 500M

default-character-set = UTF8MB4

 

[mysqld]

port = 3306

socket = /tmp/mysql.sock

datadir = /data/mysql

default-storage-engine = Innodb

character-set-server = UTF8MB4

collation-server=utf8mb4_general_ci

init_connect='SET NAMES utf8mb4'

performance_schema=ON

default_authentication_plugin=mysql_native_password

default-time_zone='+8:00'

 

skip_name_resolve = ON

myisam-recover-options

#skip-grant-tables

connect_timeout = 300

key_buffer_size = 768M

max_allowed_packet = 64M

table_open_cache = 400000

join_buffer_size = 128M

sort_buffer_size = 1M

read_buffer_size = 4M

read_rnd_buffer_size = 64M

net_buffer_length = 64K

myisam_sort_buffer_size = 2M

myisam_max_sort_file_size = 256M

#myisam_repair_threads = 1

max_connections = 1000

max_connect_errors = 30000

max_heap_table_size = 256M

wait_timeout = 7200

interactive_timeout = 7200

thread_cache_size = 128

thread_stack = 512k

tmp_table_size = 384M

#back_log = 500

#binlog-cache-size = 4M

binlog_format = Mixed

#binlog_format = ROW

binlog_expire_logs_seconds = 259200

bulk_insert_buffer_size = 256M

long_query_time = 2

slow_query_log = 1

#log-queries-not-using-indexes

#slow_query_log_file = /data/logs/mysql.slow.txt

log_bin = mysql-bin

log_replica_updates = ON

binlog_cache_size = 67108864 #binlog緩存大小 64M

sync_binlog = 100

binlog_stmt_cache_size = 67108864

#innodb_dedicated_server=ON

relay_log=mysql-relay-bin

#auto_increment_increment=1 #步進(jìn)值,主節(jié)點(diǎn)數(shù)量

#auto_increment_offset=1 #起始值,一般填寫第n臺(tái)主機(jī)mysql,第二臺(tái)填寫2

replica_parallel_workers=100

replica_parallel_type=LOGICAL_CLOCK

replica_preserve_commit_order=on

#log_bin_trust_function_creators

open_files_limit = 65000

log-error = /data/mysql/mysql.error

#general_log = ON

innodb_file_per_table = ON

innodb_data_home_dir = /data/mysql

innodb_data_file_path = ibdata1:12M:autoextend

innodb_buffer_pool_size = 5G

innodb_log_file_size = 1024M

innodb_log_buffer_size = 1024M

innodb_flush_log_at_trx_commit = 1

innodb_lock_wait_timeout = 50

innodb_io_capacity = 1000

innodb_io_capacity_max = 4000

innodb_write_io_threads = 8

innodb_read_io_threads = 8

innodb_purge_threads = 4

innodb_open_files = 60000

innodb_rollback_on_timeout = ON

innodb_print_all_deadlocks = ON

innodb_online_alter_log_max_size = 1G

innodb_buffer_pool_load_at_startup = ON

innodb_buffer_pool_dump_at_shutdown = ON

sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'

 

server-id = 1

net_read_timeout = 300

net_write_timeout = 300

#slave-skip-errors = 1032,1062,2013

#read-only = 1

#relay_log_recovery = 1

 

[mysqldump]

quick

max_allowed_packet = 64M

 

[mysql]

no-auto-rehash

default-character-set = utf8

 

[myisamchk]

key_buffer_size = 2M

sort_buffer_size = 2M

read_buffer = 4M

write_buffer = 4M

 

[mysqlhotcopy]

interactive-timeout

 

systemctl restart mysqld.service

systemctl enable mysqld

 

cat /var/log/mysqld.log | grep password #查看數(shù)據(jù)庫(kù)的密碼

mysql -uroot -p',jlmMKj49wAP'

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

use mysql;

update user set host='%' where user ='root';

alter user 'root'@'%' identified with mysql_native_password by '123456';

flush privileges;

4、安裝并配置Maven

wget https://dlcdn.Apache.org/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz --no-check-certificate

tar -xzf apache-maven-3.8.4-bin.tar.gz -C /usr/local/

cd /usr/local/

mv apache-maven-3.8.4 maven

vim /etc/profile

export MAVNE_HOME=/usr/local/maven

export PATH=$PATH:$JAVA_HOME/bin:$MAVNE_HOME/bin

source /etc/profile

# 檢查maven安裝

mvn -version

5、配置apollo數(shù)據(jù)庫(kù)

wget https://raw.githubusercontent.com/ctripcorp/apollo/master/scripts/sql/apolloconfigdb.sql

wget https://raw.githubusercontent.com/ctripcorp/apollo/master/scripts/sql/apolloportaldb.sql

mysql -uroot -p123456

source /root/apolloconfigdb.sql;

source /root/apolloportaldb.sql;

6、配置并啟動(dòng)apollo

wget https://github.com/ctripcorp/apollo/releases/download/v1.9.1/apollo-adminservice-1.9.1-github.zip

wget https://github.com/ctripcorp/apollo/releases/download/v1.9.1/apollo-configservice-1.9.1-github.zip

wget https://github.com/ctripcorp/apollo/releases/download/v1.9.1/apollo-portal-1.9.1-github.zip

 

unzip apollo-adminservice-1.9.1-github.zip -d /data/apollo/apollo-adminservice

unzip apollo-configservice-1.9.1-github.zip -d /data/apollo/apollo-configservice

unzip apollo-portal-1.9.1-github.zip -d /data/apollo/apollo-portal

 

修改配置

vi /data/apollo/apollo-adminservice/config/Application-github.properties

# DataSource

spring.datasource.url = jdbc:mysql://192.168.52.20:3306/ApolloConfigDB?characterEncoding=utf8

spring.datasource.username = root

spring.datasource.password = 123456

 

vi /data/apollo/apollo-configservice/config/application-github.properties

# DataSource

spring.datasource.url = jdbc:mysql://192.168.52.20:3306/ApolloConfigDB?characterEncoding=utf8

spring.datasource.username = root

spring.datasource.password = 123456

 

vi /data/apollo/apollo-portal/config/application-github.properties

# DataSource

spring.datasource.url = jdbc:mysql://192.168.52.20:3306/ApolloPortalDB?characterEncoding=utf8

spring.datasource.username = root

spring.datasource.password = 123456

 

修改端口啟動(dòng)和日志路徑

vi /data/apollo/apollo-adminservice/scripts/startup.sh

LOG_DIR=/data/logs/apollo-adminservice

export JAVA_OPTS="-Xms2048m -Xmx2048m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:NewSize=256m -XX:MaxNewSize=1024m -XX:SurvivorRatio=8"

 

vi /data/apollo/apollo-configservice/scripts/startup.sh

LOG_DIR=/data/logs/apollo-configservice

export JAVA_OPTS="-Xms2048m -Xmx2048m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:NewSize=256m -XX:MaxNewSize=1024m -XX:SurvivorRatio=8"

 

vi /data/apollo/apollo-portal/scripts/startup.sh

LOG_DIR=/data/logs/apollo-portal

export JAVA_OPTS="-Xms2048m -Xmx2048m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:NewSize=256m -XX:MaxNewSize=1024m -XX:SurvivorRatio=8"

修改protal組件的apollo-env.properties

vi /data/apollo/apollo-portal/config/apollo-env.properties

local.meta=http://localhost:8080

dev.meta=http://localhost:8080

fat.meta=http://fill-in-fat-meta-server:8080

uat.meta=http://fill-in-uat-meta-server:8080

lpt.meta=${lpt_meta}

pro.meta=http://fill-in-pro-meta-server:8080

#啟動(dòng)腳本

cat apollo-start.sh

/data/apollo/apollo-configservice/scripts/startup.sh

/data/apollo/apollo-adminservice/scripts/startup.sh

/data/apollo/apollo-portal/scripts/startup.sh

 

#停止腳本

cat apollo-shutdown.sh

data/apollo/apollo-configservice/scripts/shutdown.sh

/data/apollo/apollo-adminservice/scripts/shutdown.sh

/data/apollo/apollo-portal/scripts/shutdown.sh

 

瀏覽器訪問(wèn)

鏈接:http://192.168.52.20:8070 用戶名密碼:apollo/admin

7、配置 apollo測(cè)試樣例

1、maven 生成 jar 包

vi /usr/local/maven/conf/settings.xml

### 修改為國(guó)內(nèi)源 ###

<mirror>

<id>alimaven</id>

<name>aliyun maven</name>

<url>https://maven.aliyun.com/repository/public/</url>

<mirrorOf>*</mirrorOf>

</mirror>

tar xf springboot-apollo-demo.tar.gz -C /data/

cd /data/springboot-apollo-demo/

cat src/main/resources/application.yaml

server:

port: 7070

spring:

application:

name: apollo-demo

app:

id: apollo-demo # 應(yīng)用ID 對(duì)應(yīng) apollo 項(xiàng)目中的AppId

apollo:

cacheDir: /opt/data/ # 配置本地配置緩存目錄

meta: http://localhost:8080 # 配置中心地址


autoUpdateInjectedSpringProperties: true # 是否開啟 Spring 參數(shù)自動(dòng)更新

bootstrap:

enabled: true # 是否開啟 Apollo

eagerLoad:

enabled: false # 將Apollo加載提到初始化日志系統(tǒng)之前

mvn clean package

cd target/

java -jar apollo-demo-0.0.1.jar

  1. 通過(guò) apollo 為程序添加變量
apollo配置中心搭建,值得收藏

 


apollo配置中心搭建,值得收藏

 


apollo配置中心搭建,值得收藏

 


apollo配置中心搭建,值得收藏

 

發(fā)布成功后,通過(guò)瀏覽器訪問(wèn):
http://192.168.52.20:7070/test

apollo配置中心搭建,值得收藏

 

分享到:
標(biāo)簽:apollo
用戶無(wú)頭像

網(wǎng)友整理

注冊(cè)時(shí)間:

網(wǎng)站:5 個(gè)   小程序:0 個(gè)  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會(huì)員

趕快注冊(cè)賬號(hào),推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨(dú)大挑戰(zhàn)2018-06-03

數(shù)獨(dú)一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過(guò)答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫(kù),初中,高中,大學(xué)四六

運(yùn)動(dòng)步數(shù)有氧達(dá)人2018-06-03

記錄運(yùn)動(dòng)步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績(jī)?cè)u(píng)定2018-06-03

通用課目體育訓(xùn)練成績(jī)?cè)u(píng)定