Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
upgrade php7.4 on directadmin

==== upgrade PHP7.4
cd /usr/local/directadmin/custombuild
./build update
./build set php1_release 7.4
./build set php1_mode php-fpm

./build php n
./build rewrite_confs

===If found error
Libjpeg not found

==fixed by install libjpeg-devel on centos
yum install libjpeg-devel
yum -y install krb5-devel

==fixed by install libjpeg-devel on Debian
apt install libjpeg-dev
apt install krb5-dev

==fixed by install on freebsd [checking whether to build with LIBXML support... yes
checking for libxml-2.0 >= 2.7.6... no
configure: error: in `/usr/local/directadmin/custombuild/php-7.4.2':
configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.]
=> fixed by
pkg install pkgconf krb5

===If found error
checking for icu-uc >= 50.1 icu-io icu-i18n… no
configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:
Requested 'icu-uc >= 50.1' but version of icu-uc is 4.8.1.1

===fixed by re-build icu
./build update
./build icu
==start compile php again.
./build php n

==or build only 7.4
./build php_expert 7.4 php-fpm
72
เจอ error #1264 Out of range value adjusted for column 'ID' at row 1 ID บน board smf
แก้ไขโดย
alter table smf_ads change HITS HITS BIGINT NOT NULL default '0';
73
===== send syslog to sensor node.  [normally syslog send to master node only]
https://docs.securityonion.net/en/2.3/firewall.html?highlight=syslog#allow-hosts-to-send-syslog-to-a-sensor-node

==step1 run on master
so-firewall addhostgroup syslogtosensor1

==step2 run on master
so-firewall includehost syslogtosensor1 ipของsyslog-ngที่จะส่งไปsensor

==step3 run on master “sensor_heavynode.sls” => /opt/so/saltstack/local/pillar/minions/<HOSTNAME>_<ROLE>.sls
/opt/so/saltstack/local/pillar/minions/sensor_heavynode.sls
firewall:
  assigned_hostgroups:
    chain:
      DOCKER-USER:
        hostgroups:
          syslogtosensor1:
            portgroups:
              - portgroups.syslog

==step4 run on master salt <HOSTNAME>_<ROLE> state.apply firewall
salt sensor_heavynode state.apply firewall

==step5 : run on sensor node
==check and view see connection establish for source_log send to sensor_ip
netstat -na | grep 514
74
Mail issue , problem , configuration / Re: config logrotate + syslog-ng + ntp support mail.log on debian
« Last post by golfreeze on สิงหาคม 31, 2021, 01:29:41 PM »
ในกรณีเจอเครื่อง centos ไม่ให้ใช้งาน port อื่นนอกจาก 514 เพื่อรับ log สามารถตรวจเชคได้ ติด selinux หรือเปล่านะครับ

semanage port --list | grep syslog
syslogd_port_t                 tcp      601, 20514
syslogd_port_t                 udp      514, 601, 20514

ถ้าขึ้นมาเป็น 20514 สามารถใช้ตัวนี้ได้นะครับผม
75
all application on unix knowledges by golfreeze / pacemaker crm manual command
« Last post by golfreeze on สิงหาคม 16, 2021, 11:39:50 AM »
=====CRM manual  Putting cluster in maintenance mode for a maintenance activity on the SAP servers.
Many times there will be a need to do some kind of maintenance of a SAP server like OS patching, kernel upgrade, SID stacking etc.

In cases like these you might need to restart the servers but if the servers/nodes are in the cluster then the pacemaker will start migrating the services which can create a setback for the administrators. To avoid such scenarios we can simply put the cluster or a particular node in maintenance mode to avoid unwanted resource migrations.

There are three ways to achieve this depending on the situation.

Put the cluster in maintenance mode
crm configure property maintenance-mode="true"
Put the node in maintenance mode
crm node maintenance <node>
Put the node in standby mode
crm node standby <node>

==Once the activity is completed move the cluster or node out of maintenance using below commands.

Move the cluster out of maintenance
crm configure property maintenance-mode="false"
Move the node out of maintenance
crm node ready <node>
Move the node out of standby
crm node online <node>

====Most Important Commands for managing a pacemaker cluster

CRM monitoring commands-

-> crm status : Check the status of the cluster and its services.
-> crm_mon    : Live nonitoring of the cluster

CRM Node Commands

-> crm node show                : list the nodes in the cluster.
-> crm node standby <node name> : put a node on standby
-> crm node fence <node name>   : fence a particular node. (Restart)
-> crm node online <node name>  : bring a node online after standby.
-> crm node clearstate <node>   : clear a nodes state. (if in error)
-> crm node maintenance <node>  : put the node in maintenance mode. Will not affect the cluster services or resources
-> crm node ready <node>        : put the node out of maintenance

CRM Cluster Commands

-> crm cluster health           : Check the health of the cluster.
-> crm cluster start            : Start cluster services on the node.
-> crm cluster stop             : Stop cluster services on the node.
-> crm cluster restart          : Restart cluster services on the node.
-> crm cluster status           : Show cluster services on this node.

CRM Resource Commands

-> crm resource status <name>   : Check status of the resource
-> crm resource start <name>    : Start the resource.
-> crm resource stop  <name>    : Stop the resource.
-> crm resource cleanup <name>  : Cleanup the resource.(if in error)
-> crm resource migrate <name> <node> : Migrate the resource from this node to another.

==special thank you
https://www.linkedin.com/pulse/everything-you-need-know-sap-pacemaker-cluster-testing-robin-singh/
76
all application on unix knowledges by golfreeze / run perl script via proxy in linux
« Last post by somying som on สิงหาคม 11, 2021, 03:45:05 PM »
#!usr/bin/perl
use LWP::UserAgent;

# override HTTPS setting in LWP to work with a proxy
$ENV{PERL_NET_HTTPS_SSL_SOCKET_CLASS} = "Net::SSL";
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
$ENV{HTTPS_PROXY}               = 'http-proxy.yourcompany.com:80';
$ENV{HTTPS_PROXY_USERNAME}      = 'username';
$ENV{HTTPS_PROXY_PASSWORD}      = 'password';

$ua = new LWP::UserAgent;

# make a https request
my $req = HTTP::Request->new(GET => 'https://mail.google.com/');
my $res = $ua->request($req);
print $res->as_string;

กำถั่ว
77
If your server requires a new server IP due to server move, or network restructuring, follow the following steps to update your license and system.

1) Contact DirectAdmin ahead of the move to notify them of the new IP address.  Include the old IP, and license ID.  Note that if you have an internal license, you must be the datacenter to make this request.  If you cannot view your license from your clients section then you do not have authority to issue the request.   Note that DirectAdmin will continue to run even after we change the IP.  You just can't update the license or DA at this time.  Also ensure you have enough time before the license expires (eg: more than a day).

2) Boot the server with the new server ip.  Do this the same way you did originally for the old server IP.  This should be done in your system's network settings and not in DirectAdmin (yet).  Do not add the IP to DA through the IP Manager.

DirectAdmin will not be running, as the license file will be invalid.

Assuming we got your email and processed the request in step 1), you should now be able to get the new license file:

รูเล็ต
79
Mail issue , problem , configuration / [directadmin] add dmarc record automatic for all new domain
« Last post by Black windo on สิงหาคม 05, 2021, 10:18:56 PM »
I wish to automate new DMARC records for all new domains
https://help.directadmin.com/item.php?id=596

If you like the above setup, and you want to automate it's addition to all new dns zones, you can run the following:
cd /usr/local/directadmin/data/templates/custom
cp ../dns_txt.conf .

and then add the record you want to the bottom of the custom/dns_txt.conf by running this command:
echo '_dmarc="v=DMARC1; p=none; sp=none; rua=mailto:spam-reports@|DOMAIN|"' >> dns_txt.conf

keeping in mind that this assumes you've got a spam-reports account created already.
sa gaming
80
all application on unix knowledges by golfreeze / Apache redirect code error403
« Last post by Black windo on สิงหาคม 03, 2021, 11:30:07 PM »
###Redirect code on apache to file "index.php"
<meta http-equiv="refresh" content="0;
URL=http://www.redirect.com">
<meta name="keywords" content="automatic redirection">

###Ask index.html
GET /index.html HTTP/1.0

หวยรัฐบาล
Pages: 1 ... 6 7 [8] 9 10