Quantcast
Viewing all 47 articles
Browse latest View live

mysqldump > unknown table engine ‘PERFORMANCE_SCHEMA’

Lets simply force mysqldump to ignore all performance_schema tables.

# mysqldump -u <username> -p <password> --all-databases > /root/mysql.full.dump --ignore-table=performance_schema.cond_instances --ignore-table=performance_schema.events_waits_current --ignore-table=performance_schema.cond_instances --ignore-table=performance_schema.events_waits_history --ignore-table=performance_schema.events_waits_history_long  --ignore-table=performance_schema.events_waits_summary_by_instance --ignore-table=performance_schema.events_waits_summary_by_thread_by_event_name --ignore-table=performance_schema.events_waits_summary_global_by_event_name --ignore-table=performance_schema.file_instances --ignore-table=performance_schema.file_summary_by_event_name  --ignore-table=performance_schema.file_summary_by_instance  --ignore-table=performance_schema.mutex_instances --ignore-table=performance_schema.performance_timers  --ignore-table=performance_schema.rwlock_instances --ignore-table=performance_schema.setup_consumers --ignore-table=performance_schema.setup_instruments --ignore-table=performance_schema.setup_timers --ignore-table=performance_schema.threads

But remember!
An error is always an error!
This solution isn’t 100% recommended!


perl cgi with Apache2

How to reset MySQL root password

Step 1: Stop MySQL Service.

sudo stop mysql

Step 2: Kill all running mysqld.

sudo killall -9 mysqld

Step 3: Starting mysqld in Safe mode.

sudo mysqld_safe --skip-grant-tables --skip-networking &

Step 4: Start mysql client

mysql -u root

Step 5: After successful login, please execute this command to change any password.

FLUSH PRIVILEGES;

Step 6: You can update mysql root password .

UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';

Step 7: Please execute this command.

FLUSH PRIVILEGES;

Gently copied from http://askubuntu.com/questions/489098/unable-to-reset-root-password-of-mysql

Original solution from http://www.dbrnd.com/2015/08/reset-mysql-root-password-ubuntu/

Apr 29 03:09:02 sd-71796 postfix/master[43779]: fatal: bind 0.0.0.0 port 25: Address already in use

Apr 29 03:09:02 sd-71796 postfix/master[43779]: fatal: bind 0.0.0.0 port 25: Address already in use

So, looks like we have the port 25 in use!

This solved my issue…
service sendmail stop
service postfix restart
service sendmail start

After doing this the /var/mail/ had the user’s files!

Send a test email

mail -s "Test Subject" user@example.com < /dev/null

To set up an user you need to Configure Additional Email Addresses.

 

Solution found at http://askubuntu.com/questions/405058/postfix-start-error-port-25-address-already-in-use

 

How to install a mail server (postfix) supporting IMAP and POP3 (Ubuntu)

Ubuntu postfix+dovecot – Create default Inbox, Sent, and Trash folder per account

 

Open /etc/dovecot/conf.d/20-imap.conf

sudo nano /etc/dovecot/conf.d/20-imap.conf

Search for mail_plugins and make the following changes on that line

from
mail_plugins = $mail_plugins
to 
mail_plugins = $mail_plugins autocreate

Then add the following at the end of the file

plugin {
     autocreate = Trash
     autocreate2 = Junk
     autocreate3 = Drafts
     autocreate4 = Sent
     autosubscribe = Trash
     autosubscribe2 = Junk
     autosubscribe3 = Drafts
     autosubscribe4 = Sent
}

Restart dovecot

sudo service dovecot restart

 

More readings

 

dovecot: lda(root): Error: user root: Initialization failed: Namespace ”: stat(/root/Maildir) failed: Permission denied

 

Apr 29 14:37:45 sd-71796 dovecot: lda(root): Error: user root: Initialization failed: Namespace ”: stat(/root/Maildir) failed: Permission denied (euid=65534(nobody) egid=65534(nogroup) missing +x perm: /root, dir owned by 0:0 mode=0700)

OK!

I’v created an aliase…

Edit /etc/postfix/virtual

nano /etc/postfix/virtual

Add the entry

root@example.com    existing_user

Rebuild postmap

sudo postmap /etc/postfix/virtual

 

 

Sources

AH00686: cannot read directory for multi: /home/user/domain.com/

I was getting the following error @ apache error log…

AH00686: cannot read directory for multi: /home/user/domain.com/

I’v chmod’ed to 755 and start to work perfectly…


fatal: no matching comp found: client zlib server none,zlib@openssh.com

  May  4 00:04:35 sd-71796 sshd[20887]: fatal: no matching comp found: client zlib server none,zlib@openssh.com [preauth] You need to install zlib and libgcrypt11-dev and set compression to yes on /etc/ssh/sshd_config. sudo apt-get install libgcrypt11-dev zlib1g-dev Then sudo nano /etc/ssh/sshd_config And add Compression yes to it. Save and restart ssh. sudo service ssh restart In some cases you might … Continue reading fatal: no matching comp found: client zlib server none,zlib@openssh.com

Apache / PHP – End of script output before headers

 

[Thu May 12 03:14:41.562083 2016] [core:error] [pid 25726] [client 68.71.XXX.XXX:44611] End of script output before headers: manage.php
[Thu May 12 03:14:41.697026 2016] [:error] [pid 26855] [client 84.91.XXX.XXX:60222] SoftException in Application.cpp:256: File “/home/rocker/public_html/system/manage.php” is writeable by group

I had to set the file to 755.

As seen on http://stackoverflow.com/questions/17583341/error-500-premature-end-of-script-headers

Ubuntu wants OVH to bill 1e-2e per month for each VPS/PCI/PCC/SD

ST8, some printscreens

Ubuntu 16 LTS login

Image may be NSFW.
Clik here to view.
Captura-de-ecrã-2016-06-29,-às-21.21

RAID status
Image may be NSFW.
Clik here to view.
Captura de ecrã 2016-06-29, às 21.27.58s
Disk Free

Image may be NSFW.
Clik here to view.
Captura-de-ecrã-2016-06-29,-às-21.24.28

Ubuntu 16.04 LTS tutorials

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
How to secure an Ubuntu 16.04 LTS server

https://www.thefanclub.co.za/how-to/how-secure-ubuntu-1604-lts-server-part-1-basics

The Perfect Server – Ubuntu 16.04 (Xenial Xerus) with Apache, PHP, MySQL, PureFTPD, BIND, Postfix, Dovecot and ISPConfig 3.1

https://www.howtoforge.com/tutorial/perfect-server-ubuntu-16.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/

How To Protect WordPress with Fail2Ban on Ubuntu 14.04

https://www.digitalocean.com/community/tutorials/how-to-protect-wordpress-with-fail2ban-on-ubuntu-14-04

UFW Essentials: Common Firewall Rules and Commands

https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands

Other readings…

Potential ufw and fail2ban conflicts

http://askubuntu.com/questions/54771/potential-ufw-and-fail2ban-conflicts

 

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

This new server with Ubuntu 16.04 LTS cames with PHP 7.0.

The backup that I have from my client has some old WordPress blogs…

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

I need to downgrade PHP 7.0 to PHP 5.6, at least for now.

Before you procede with the tutorial on the following link, and if you are running a new Ubuntu 16 installation you might get upon the following error while following the tutorial.

root@sd-4XXXX:/home/httpd/html# sudo add-apt-repository ppa:ondrej/php
sudo: add-apt-repository: command not found

To install add-apt-repository you will need to run the following command

sudo apt-get install software-properties-common

Now the solution  How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04? [duplicate].

 

bad zipfile offset (local header sig)

While I was unzipping a 72Gb file I got the following errors…

bad zipfile offset (local header sig):

Image may be NSFW.
Clik here to view.
Captura de ecrã 2016-07-12, às 22.41.42

I had to install default-jdk and then use jar.

jar -xf filename.zip

References
http://stackoverflow.com/a/31084012/1987037

 


bad ownership or modes for chroot directory component

 

Jul 14 11:41:18 sd-47XXX systemd-logind[643]: New session 26596 of user wojcatie.
Jul 14 11:41:18 sd-47XXX systemd: pam_unix(systemd-user:session): session opened for user wojcatie by (uid=0)
Jul 14 11:41:18 sd-47XXX sshd[8455]: fatal: bad ownership or modes for chroot directory component "/home/httpd/html/domain.com/"
Jul 14 11:41:18 sd-47XXX sshd[8430]: pam_unix(sshd:session): session closed for user wojcatie
Jul 14 11:41:18 sd-47XXX systemd-logind[643]: Removed session 26596.

/home/httpd/html/domain.com/ has to be owned by root:root and chmod with 755.

sudo chown root:root /home/httpd/html/domain.com/
sudo chmod 755/home/httpd/html/domain.com/

 

Discourse – email and Job exception: Net::ReadTimeout

 

Email

For a Discourse instance to function properly Email must be set up. Use the SMTP_URL env var to set your SMTP address, see sample templates for an example. The Docker image does not contain postfix, exim or another MTA, it was omitted because it is very tricky to set up correctly.

Source: https://github.com/discourse/discourse_docker

Yah! Discourse doesn’t came with any MTA (mail transfer agent).
I had to install Postfix so that Discourse could send out emails.

My emails weren’t getting delivered…
I was getting the following error on discourse logs(/var/discourse/shared/standalone/log/rails/production.log)….

Job exception: Net::ReadTimeout

After a few tweaks… I got it working…
This is my app.yml excerpt….

## TODO: List of comma delimited emails that will be made admin and developer
 ## on initial signup example 'user1@example.com,user2@example.com'
 DISCOURSE_DEVELOPER_EMAILS: 'admin@domain.com'

## TODO: The SMTP mail server used to validate new accounts and send notifications
 DISCOURSE_SMTP_ADDRESS: mail.domain.com
 DISCOURSE_SMTP_PORT: 25
 DISCOURSE_SMTP_USER_NAME: admin@domain.com
 DISCOURSE_SMTP_PASSWORD: XXXXXXX
 DISCOURSE_SMTP_ENABLE_START_TLS: false
Readings

 

discourse & cloudflare – show real users IP address

Discourse has a recent (5month old?) template to handle with this.

Image may be NSFW.
Clik here to view.
Captura de ecrã 2016-07-24, às 14.51.40

Lets add   – “templates/cloudflare.template.yml” to our templates scheme…

nano containers/app.yml

Save it and rebuild the app! Image may be NSFW.
Clik here to view.
🙂

./launcher rebuild app

Image may be NSFW.
Clik here to view.
Captura de ecrã 2016-07-24, às 15.01.51

Et voilá!, my  ISP (portuguese) IP! Image may be NSFW.
Clik here to view.
🙂

Image may be NSFW.
Clik here to view.
Captura de ecrã 2016-07-24, às 15.09.51

More readings

fail2ban not *running*

I realized that fail2ban wasn’t banning SSH fail login attempts…

Image may be NSFW.
Clik here to view.
Captura-de-ecrã-2016-07-29,-às-01.32

My server’s time is different from the one being logged by rsyslog ’cause I had to change my timezones once…….. Image may be NSFW.
Clik here to view.
🙂

Lets restart rsyslog.

sudo service rsyslog restart
Image may be NSFW.
Clik here to view.
Captura-de-ecrã-2016-07-29,-às-01.45.31
Hooray!

Image may be NSFW.
Clik here to view.
Captura-de-ecrã-2016-07-29,-às-01.56.57

References

“SMTP Error: Could not authenticate”

I had to install WP-Mail-Bank in one of my WordPress pages/blogs/store, so it can send emails to *people* Image may be NSFW.
Clik here to view.
🙂

I was getting “SMTP Error: Could not authenticate”  on the test email tab.

I had to went to https://accounts.google.com/b/0/DisplayUnlockCaptcha and continue with this request. This gives us a 10min window to connect to Google in an *unsecure* way. Google detects the connection and allow it for the future.

Reference: http://stackoverflow.com/questions/3949824/smtp-error-could-not-authenticate-in-phpmailer

Viewing all 47 articles
Browse latest View live