MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Tips and Tricks => Topic started by: zenkul on 2013-02-28, 11:52:55

Title: Maintenence Command
Post by: zenkul on 2013-02-28, 11:52:55
There is some example maintenence command ........

to know the configuration of the installed
Code: [Select]
sh /script/sysinforestarting all services
Code: [Select]
sh /script/restart-services
sh /script/restart-all
example restarting per-item
Code: [Select]
/etc/init.d/named restart
/etc/init.d/httpd restart
/etc/init.d/nginx restart
/etc/init.d/php-fpm restart
/etc/init.d/mysqld restart
/etc/init.d/kloxo restart
example fix
Code: [Select]
sh /script/fixweb
sh /script/fixphp
sh /script/fixdns
sh /script/fixwebmail
sh /script/fixmail
sh /script/fixvpop
# for all
sh /script/fix-all
Clean-Up for affected software, especially after updating kloxo-mr
Code: [Select]
sh /script/cleanupmanual alternative fix permission & ownership at kloxo-mr menu
Code: [Select]
sh /script/fix-chownchmodexample command for optimize & repair mysql database
Code: [Select]
sh /script/mysql-optimize --select=repair
sh /script/mysql-optimize --select=optimize
Clear Cache (*not work in OpenVz VPS)
Code: [Select]
sh /script/clearcache --select=1Manual alternative apache optimize
Code: [Select]
### for mod_php select optimeze
sh /script/apache-optimize --select=optimize
### for suphp/fcgid/php-fpm
sh /script/apache-optimize --select=default
Reset mysql root password
Code: [Select]
sh /script/reset-mysql-root-password <newpassword>Reset Kloxo admin password login:
Code: [Select]
sh /script/resetpassword master <newpassword>another way to convert database storage engine (myisam or innodb)
Code: [Select]
sh /script/mysql-convert --engine=MyISAM
sh /script/mysql-convert --engine=InnoDB
### MariaDB only convert to aria
sh /script/mysql-convert --engine=aria
RkHunter Check (security)
Code: [Select]
rkhunter --checkcheck memory
Code: [Select]
free -m
any other  :?:
Title: Re: Maintenence Command
Post by: MRatWork on 2013-02-28, 15:03:45
Add also for fixwebmail, fixmail and fixvpop. Also resetpassword and reset-mysql-root-password.

And don't forget 'sh /script/apache-optimize --select=optimize' (for using mod_php) or  'sh /script/apache-optimize --select=default' (for suphp/fcgid/php-fpm).
Title: Re: Maintenence Command
Post by: lupetalo on 2013-03-02, 00:45:05
Code: [Select]
### backup
/script/backup --class=client --name=admin
### restore
/script/restore --restore --accounts=all <backup-file-path>

Have anyone actually succeeded in restore like this. I never did, even on completly new system and even on old Kloxo.
Title: Re: Maintenence Command
Post by: zenkul on 2013-03-02, 03:15:10
Quote from: "lupetalo"
Code: [Select]
### backup
/script/backup --class=client --name=admin
### restore
/script/restore --restore --accounts=all <backup-file-path>

Have anyone actually succeeded in restore like this. I never did, even on completly new system and even on old Kloxo.

not work
 :D  so i deleted this item above, to reduce confuse
maybe coming soon ..............
Title: Re: Maintenence Command
Post by: lupetalo on 2013-03-02, 05:50:24
I could be very cool feature backup with command line, maybe Mustafa could look into it when he have time?
Title: Re: Maintenence Command
Post by: zenkul on 2013-03-03, 10:44:55
at stuck command line, is automatic replace old file, it nice for cron job scheduled back-up, ... :roll: but sadly not work
just backup/restore at menu kloxo or other method
never mind, kloxo-mr so far so good

hope MR always healthy
Title: Re: Maintenence Command
Post by: GentZu on 2014-05-11, 06:00:09
how to switch fmpt-event event suphp?
Title: Re: Maintenence Command
Post by: noob on 2016-05-25, 03:59:18
can i use convert script "sh /script/mysql-convert --engine=InnoDB" only for selected database?
what the option command to do that?
Title: Re: Maintenence Command
Post by: noob on 2016-05-25, 04:07:41
eh nevermind, i saw the script and got this option:
Code: [Select]
sh /script/mysql-convert --engine=InnoDB --database=<databasename>

thanks kloxo-mr ;)
Title: Re: Maintenence Command
Post by: MRatWork on 2016-05-26, 08:04:51
Most scripts will work with '--help'.
Title: Re: Maintenence Command
Post by: hendiana on 2016-05-27, 05:18:22
restart hiawatha failed

Code: [Select]
[root@hendiana ~]# /etc/init.d/hiawatha restart
Stopping Hiawatha web server:                              [FAILED]
Starting Hiawatha web server: Error binding 0.0.0.0:80
                                                           [FAILED]
[root@hendiana ~]#

gimana ya pak?
Title: Re: Maintenence Command
Post by: MRatWork on 2016-05-27, 05:23:23
Kalau restart, gunakan 'sh /script/restart-web y' daripada langsung restart. Jika pakai restart-web akan tahu mungkin ada webserver lain yang mengganggu. Begitu.
Title: Re: Maintenence Command
Post by: hendiana on 2016-05-27, 05:43:27
Code: [Select]
[root@hendiana ~]# sh /script/restart-web y
error reading information on service phpm-fpm: No such file or directory

*** Process for PHP-FPM service ***
  - Process: restart
Stopping php-fpm:                                          [FAILED]
Starting php-fpm: [26-May-2016 23:59:37] ERROR: Unable to globalize '/opt/configs/php-fpm/conf/php/*.conf' (ret=2) from /etc/php-fpm.conf at line 18.
[26-May-2016 23:59:37] ERROR: failed to load configuration file '/etc/php-fpm.conf'
[26-May-2016 23:59:37] ERROR: FPM initialization failed
                                                           [FAILED]
-------------------------------------------------------------------

*** Process for HIAWATHA service ***
  - Process: restart
Stopping Hiawatha web server:                              [FAILED]
Starting Hiawatha web server: Error binding 0.0.0.0:80
                                                           [FAILED]
-------------------------------------------------------------------

- For help, type '/script/restart-web [--help|-h]'
[root@hendiana ~]#
Title: Re: Maintenence Command
Post by: MRatWork on 2016-05-27, 06:19:32
Coba ulangi 'sh /script/cleanup'.