• We've added extra Spam Protection. if you get problem with account registration / registration rejected. please contact us

Centminmod Centmin Mod + Redis Server Installation

Nginx

Senior Management
Staff member
Joined
Feb 27, 2018
Messages
73
Reaction score
202
Points
33
Age
20
Centmin Mod 123.09beta01 doesn't install Redis server by default. You can either use manual Redis server YUM install instructions here which can apply to CentOS 6 and CentOS 7. Or use redis-install.sh script instructions below for CentOS 7 64bit OSes only.

cd /svr-setup
wget -O redis-install.sh https://github.com/centminmod/centminmod-redis/raw/master/redis-install.sh
chmod +x redis-install.sh
./redis-install.sh install

Example redis-install.sh run

Code:
./redis-install.sh install
install redis server...
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 16 kB 00:00:00 * base: mirror.keystealth.org * epel: pubmirror1.math.uh.edu * extras: mirrors.xtom.com * remi: mirrors.mediatemple.net * rpmforge: mirror.us.leaseweb.net * updates: mirror.us.oneandone.net
base | 3.6 kB 00:00:00
centos-sclo-rh | 3.0 kB 00:00:00
centos-sclo-sclo | 2.9 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 3.4 kB 00:00:00
mariadb | 2.9 kB 00:00:00
nginx-amplify | 2.9 kB 00:00:00
remi | 3.0 kB 00:00:00
rpmforge | 1.9 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/2): epel/x86_64/updateinfo | 955 kB 00:00:00
(2/2): epel/x86_64/primary_db | 6.6 MB 00:00:00
Excluding 5 updates due to versionlock (use "yum versionlock status" to show them)
Resolving Dependencies
--> Running transaction check
---> Package redis.x86_64 0:5.0.3-1.el7.remi will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================================================================================================================================== Package Arch Version Repository Size
==========================================================================================================================================================================================================================================================
Installing: redis x86_64 5.0.3-1.el7.remi remi 919 k
Transaction Summary
==========================================================================================================================================================================================================================================================
Install 1 Package
Total download size: 919 k
Installed size: 3.0 M
Downloading packages:
redis-5.0.3-1.el7.remi.x86_64.rpm | 919 kB 00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction Installing : redis-5.0.3-1.el7.remi.x86_64 1/1 Verifying : redis-5.0.3-1.el7.remi.x86_64 1/1
Installed: redis.x86_64 0:5.0.3-1.el7.remi
Complete!
Created symlink from /etc/systemd/system/multi-user.target.wants/disable-thp.service to /etc/systemd/system/disable-thp.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/redis.service to /usr/lib/systemd/system/redis.service.
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
sysctl: permission denied on key 'vm.overcommit_memory'
redis server installled
If you're using OpenVZ VPS, your install output may contain the below permission denied message - you can ignore than as OpenVZ VPS doesn't allow you to do TCP/Kernel settings changes like you can with Xen/KVM VPS or dedicated servers.

sysctl: permission denied on key 'vm.overcommit_memory'

If you check redis server logs at /var/log/redis/redis.log and are on OpenVZ VPS, you again will get a message like below - this is again due to OpenVZ VPS not allowing TCP/Kernel setting changes like you can with Xen/KVM VPS or dedicated servers.

Code:
WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect
For optimal server setups as outlined on Centmin Mod install page, use KVM VPS or dedicated servers and avoid OpenVZ VPS as they can't do TCP/Kernel level optimisations.

First time you view redis service status after initial install you may see a 'Failed to add dependency on rc.local, ignoring: Invalid argument' message, you can remove the file at
/etc/systemd/system/redis.service.d/after-rc-local.conf and do a redis server restart to clear that up

Code:
service redis status | sed -e "s|$(hostname)|hostname|g"
Redirecting to /bin/systemctl status redis.service
* redis.service - Redis persistent key-value database Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/redis.service.d `-after-rc-local.conf, limit.conf Active: active (running) since Tue 2019-02-05 05:49:46 UTC; 3min 32s ago Main PID: 2169 (redis-server) CGroup: /system.slice/redis.service `-2169 /usr/bin/redis-server 127.0.0.1:6379
Feb 05 05:49:46 hostname systemd[1]: Starting Redis persistent key-value database...
Feb 05 05:49:46 hostname systemd[1]: Started Redis persistent key-value database.
Feb 05 05:49:46 hostname systemd[1]: [/etc/systemd/system/redis.service.d/after-rc-local.conf:2] Failed to add dependency on rc.local, ignoring: Invalid argument
Code:
rm /etc/systemd/system/redis.service.d/after-rc-local.conf
service redis restart
service redis status | sed -e "s|$(hostname)|hostname|g"
Redirecting to /bin/systemctl status redis.service
* redis.service - Redis persistent key-value database Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/redis.service.d `-after-rc-local.conf, limit.conf Active: active (running) since Tue 2019-02-05 05:54:06 UTC; 15s ago Process: 2925 ExecStop=/usr/libexec/redis-shutdown (code=exited, status=0/SUCCESS) Main PID: 2941 (redis-server) CGroup: /system.slice/redis.service `-2941 /usr/bin/redis-server 127.0.0.1:6379
Feb 05 05:54:06 hostname systemd[1]: Starting Redis persistent key-value database...
Feb 05 05:54:06 hostname systemd[1]: Started Redis persistent key-value database.
Code:
redis-cli --version
redis-cli 5.0.3
Redis server info via redis-cli info command

Code:
redis-cli info
# Server
redis_version:5.0.3
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:5194991bde1f5722
redis_mode:standalone
os:Linux 2.6.32-042stab127.2 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:4.8.5
process_id:18517
run_id:fa105b40484d4f3b3153c8c743449c2ecc3c1acc
tcp_port:6379
uptime_in_seconds:1824
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:5894882
executable:/usr/bin/redis-server
config_file:/etc/redis.conf
# Clients
connected_clients:2
client_recent_max_input_buffer:2
client_recent_max_output_buffer:0
blocked_clients:0
# Memory
used_memory:1333192
used_memory_human:1.27M
used_memory_rss:4026368
used_memory_rss_human:3.84M
used_memory_peak:1707296
used_memory_peak_human:1.63M
used_memory_peak_perc:78.09%
used_memory_overhead:863152
used_memory_startup:792056
used_memory_dataset:470040
used_memory_dataset_perc:86.86%
allocator_allocated:1891536
allocator_active:2203648
allocator_resident:5111808
total_system_memory:2147483648
total_system_memory_human:2.00G
used_memory_lua:37888
used_memory_lua_human:37.00K
used_memory_scripts:0
used_memory_scripts_human:0B
number_of_cached_scripts:0
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:1.17
allocator_frag_bytes:312112
allocator_rss_ratio:2.32
allocator_rss_bytes:2908160
rss_overhead_ratio:0.79
rss_overhead_bytes:-1085440
mem_fragmentation_ratio:3.17
mem_fragmentation_bytes:2756080
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:66616
mem_aof_buffer:0
mem_allocator:jemalloc-5.1.0
active_defrag_running:0
lazyfree_pending_objects:0
# Persistence
loading:0
rdb_changes_since_last_save:4
rdb_bgsave_in_progress:0
rdb_last_save_time:1549398132
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:643072
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0
# Stats
total_connections_received:8
total_commands_processed:185
instantaneous_ops_per_sec:0
total_net_input_bytes:484436
total_net_output_bytes:1747311
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:2
expired_stale_perc:0.00
expired_time_cap_reached_count:0
evicted_keys:0
keyspace_hits:801
keyspace_misses:89
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:173
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
# Replication
role:master
connected_slaves:0
master_replid:cc1eb4d724d931b6b91e41ae8a14400e63a358e6
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0
# CPU
used_cpu_sys:0.486925
used_cpu_user:1.083835
used_cpu_sys_children:0.001999
used_cpu_user_children:0.003999
# Cluster
cluster_enabled:0
# Keyspace
db3:keys=44,expires=44,avg_ttl=2188105
db5:keys=4,expires=4,avg_ttl=9257037
db7:keys=4,expires=4,avg_ttl=1913233
Code:
redis-cli info commandstats
# Commandstats
cmdstat_mget:calls=31,usec=913,usec_per_call=29.45
cmdstat_setex:calls=61,usec=209,usec_per_call=3.43
cmdstat_select:calls=40,usec=59,usec_per_call=1.48
cmdstat_get:calls=53,usec=451,usec_per_call=8.51
cmdstat_info:calls=1,usec=22168,usec_per_call=22168.00
Redis server listens on 127.0.0.1 on default port 6379 with redis config file at
/etc/redis.conf

Multiple Redis Server Instances

If you want to have as separate Redis server instance for each Xenforo 2.1.0 cache context i.e. global, page cache and css cache, you will need to create more Redis server instances where each listen on their own port, have their own filesystem data directory and own service start/stop files and own config files. You can do this manually. I wrote a redis-generator.sh script for CentOS 7 and Centmin Mod only usage which can automate the entire process. No support provided by me, so use with your own discretion. read More
 

kingdomob

New Member
Joined
Jun 30, 2019
Messages
4
Reaction score
0
Points
1
Age
33
It works perfekt for me! All Settings working instant!
 
Top

AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock