How to Update and Upgrade Ubuntu
# apt-get update
# apt-get upgrade
Linux, Windows, Software Tips, Articles and Hacks
How to Update and Upgrade Ubuntu
# apt-get update
# apt-get upgrade
Getting an error when backing up a plesk domain?
Error: mailname "support"Unable to execute SQL: Unknown database 'horde'Warning: mysql "admin_domain"Failed to pack files 4_18_2015_2_admin_domain_1_1504180804 in /var/lib/psa/dumps/domains/domain.com/databases/admin_domain_1 [ 427932016640 bytes free of 489881954304 bytes total on mount point 0]Warning: mysql "admin_domain"mysqldump: Couldn't execute 'SHOW FUNCTION STATUS WHERE Db = 'admin_domain'': Cannot load from mysql.proc. The table is probably corrupted (1548)
Run
# mysql_upgrade
Plesk
# mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow`
http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F
Usually cpanel(WHM) compiles mod_rewrite by default. You can check with this:
root@server [~]# httpd -l|grep rewrite
So you must just activate it in your ‘.htaccess’ using:
RewriteEngine On
To check if mod_rewrite module is enabaled, create a new php file in your root folder of your WAMP server. Enter the following
phpinfo();
Access your created file from your browser.
Ctrl+F to open a search. Search for ‘mod_rewrite’. If it is enabled you see it as ‘Loaded Modules’
If not, open httpd.conf (Apache Config file) and look for the following line.
#LoadModule rewrite_module modules/mod_rewrite.so
remove the pound (‘#’) sign at the start and save the this file.
Restart your apache server.
Access the same php file in your browser.
search for ‘mod_rewrite’ again. You should be able to find it now.
For Plesk Servers
Log into your server via ssh as root.
Mod Rewrite is enabled by default on plesk servers. You can verify this with the following command:
# apachectl -M | grep rewrite
modify the vhost.conf file at /var/www/vhosts/example.com/conf/vhost.conf
# replace "AllowOverride None" with "AllowOverride all".
restart apache with the following command:
service httpd restart
Create a .htaccess containing the following and upload it to the root of your site:
RewriteEngine On RewriteRule ^google.html$ http://www.google.com/ [R=301]
Going to http://www.yoursite.com/google.html should redirect you to Google.com if you have mod rewrite enabled and your syntax is correct.
For more information on Mod rewrite see the following links.
http://httpd.apache.org/docs/current/mod/mod_rewrite.html
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
When using ftp to access the server, the following error logs:
# Error: The data connection could not be established: ETIMEDOUT - Connection attempt timed out
If you are on a plesk server, Plesk has an article here: https://docs.plesk.com/en-US/onyx/administrator-guide/server-administration/plesk-for-linux-configuring-passive-ftp-mode.74643/
To enable passive FTP mode in Plesk for Linux:
Log in to your server via SSH as the root user.
Create the /etc/proftpd.d/55-passive-ports.conf file, add the following lines to it, and then save the changes:
# nano /etc/proftpd.d/55-passive-ports.conf
PassivePorts 49152 65535
Run the following command:
# systemctl restart xinetd
Now your Plesk server accepts passive FTP connections. If you have installed the Plesk Firewall and switched on its default configuration, you need to add a firewall rule allowing passive FTP:
Save and connect via ftp to test.
Still having issues?
Check is firewalld is loaded but not enabled? Try to start and then and stop firewalld service.
Connect to your server via Remote Desktop
Click simultaneously on the Windows logo + R to open the “Run” dialog and execute the “cmd” command
Open the registry editor by typing the “regedit” command
Search for this registry subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber
Double-click or right-click on the “PortNumber” registry subkey, select the decimal base and type the port number of your choice (the default port is 3389, in this example, we selected port 3390). Click on “Ok” to save your selection.
IMPORTANT: Make sure that remote access to your server through the new port is authorized in your Windows firewall before executing the next step. Add a new Firewall Port Incoming rule allowing the port number.
Exit the registry editor
Restart your server
After the reboot, specify the Remote Desktop port number.
Resources:
http://www.techrepublic.com/blog/the-enterprise-cloud/changing-the-rdp-listening-port-on-windows-server/
Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7).
In the Connections pane, click Sites.
In Features View, select the site for which you want to enable trace logging.
In the Actions pane, under Configure, click Failed Request Tracing.
In the Edit Web Site Failed Request Tracing Settings dialog box, select Enable to enable logging for this site.
In the Directory text box, type the path where you want to store the log files or click the browse button (…) to find a location on the computer. The default is %SystemDrive%\inetpub\logs\FailedReqLogFiles.
noteNote
As a best practice, log files, such as log files for failed request tracing, should be stored in a directory other than systemroot.
In the Maximum number of trace files text box, type the maximum number of trace log files that you want to keep, and then click OK.
rogue scripts, with the following two websites being useful for this practice:
http://www.stopthehacker.com/
http://www.exploit-db.com/
The following two websites can also be highly useful as additional resources when experiencing a security compromise.
http://google.com/webmasters/hacked/
http://stopbadware.org/webmaster-help
Begin by opening the configuration file with your text editor as root:
# nano /etc/ssh/sshd_config
The first option that you may want to change is the port that SSH runs on. Find the line that looks like this:
#Port 22
Change this to a different port
#Port 2244
Reload ssh
# systemctl reload sshd.service
After saving, don’t exit until you’ve completed these steps.
By default, SELinux only allows port 22 for SSH. What you need to do is enable the newly created port through SELinux. To do that, run the commands below
# sudo semanage port -a -t ssh_port_t -p tcp 2244
If you run the commands above and get an error that semanage command not found, run the commands below to install it.
# sudo yum -y install policycoreutils-python
Then go and run the semange commend again to allow the new port through SELinux.
Note: CentOS8
In CentOS or RHEL Linux based distributions, install policycoreutils package and add the below rules to relax SELinux policy in order for the SSH daemon to bind on the new port.
# yum install policycoreutils # semanage port -a -t ssh_port_t -p tcp 34627 # semanage port -m -t ssh_port_t -p tcp 34627 # systemctl restart sshd # netstat -tlpn| grep ssh # ss -tlpn| grep ssh
After that, run the commands below to allow the new port through the firewall.
# sudo firewall-cmd --permanent --zone=public --add-port=2244/tcp
Reload the firewall configurations
# sudo firewall-cmd --reload
Restart SSH by running the commands below.
# sudo systemctl restart sshd.service