wordpress error 500 & wordpress Path

simply because plugin crash I guess

go to the Path of wordpress

/opt/bitnami/apps/wordpress/htdocs

/opt/bitnami/apps/wordpress/htdocs/wp-content/plugins

find plugin folder, rename any plugin you think may cause error

go back to your website


change wordpress files deployed by bitnami on AWS

find the path of wordpress

/opt/bitnami/apps/wordpress/htdocs

exam file structure apt-get install tree

├── index.php
├── license.txt
├── readme.html
├── wp-activate.php
├── wp-admin
├── wp-blog-header.php
├── wp-comments-post.php
├── wp-config.php
├── wp-config-sample.php
├── wp-content
├── wp-cron.php
├── wp-includes
├── wp-links-opml.php
├── wp-load.php
├── wp-login.php
├── wp-mail.php
├── wp-settings.php
├── wp-signup.php
├── wp-trackback.php
└── xmlrpc.php

in folder wp-content, which contains themes that can be modified.


bitnami AWS server MySQL config

if you launch a bitnami worldpress server on AWS,

it’s mysql, apache, php-fpm are stored in different locations compares to installed via apt-get

they are monitored and managed by bitnami.

so, go to

/opt/bitnami

./ctlscript.sh 

./ctlscript.sh status

if you want to restart mysql

./ctlscript.sh restart mysql

Or

use command mysqladmin

>mysqladmin

MySQL add user privilege

Linux config mysql

go to /etc/mysql/mysql.conf.d/

> vim mysqld.conf

command out

bind-address = 127.0.0.1

to

# bind-address = 127.0.0.1

 

get in mysql

$ mysql -u root -p  (-localhost)
Enter password:

if you want to create user fun with password love, and who can access the database from anywhere

> create user 'fun'@'%' identified by 'love'

then

> grant all privileges on *.* to 'fun'@'%' with grant option;

>flush privileges;

 

mysql> GRANT ALL ON . to root@’192.168.1.4′ IDENTIFIED BY ‘your-root-password’;

If … Mysql forget root password

go to the Path of mysql’s config directory

e.g.

/etc/mysql/mysql.conf.d/

or if you are using bitnami

/opt/bitnami/mysql/

vim mysqld.cnf   (my.cnf)

under [mysqld]

add

skip-grant-tables

Now log in to mysql that do not need password, change password for root, e.g.

use mysql

mysql>update user set password=password('newpassword') where user= 'root';

mysql>flush privileges;

difficulty encountered

in bitnami, mysql database’s user table do NOT have column ‘password’, instead it has, ‘authentication_string’ for the password column, so:

mysql>update user set authentication_string=password('newpassword') where user= 'root';

mysql>flush privileges;

password(‘string’), is a function that encrypt the string to safer representation.

then go back to mysql config file and delete  skip-grant-tables

restart mysql

 

add R to jupyter notebook solve -- unable to load shared object 'somepath/anaconda2/lib/R/modules//R_X11.so'

first simply run

$conda install -c r r-irkernel  

 or
$conda install -c r r-essentials 
if encounter the below error when fire up R

unable to load shared object ‘/home/someuser/anaconda2/lib/R/modules//R_X11.so’:
libSM.so.6/libXrender.so.1: cannot open shared object file: No such file or directory

 

usr/lib64/libSM.6.0.1

You need to execute the following commends in orders 

  1. $conda install -c r r-base 
  2. $conda install -c r r-essentials

 

For Oracle Linux 

https://docs.oracle.com/cd/E57012_01/doc.141/e57007/install_r.htm

https://cran.rstudio.com/bin/linux/redhat/README

https://fedoraproject.org/wiki/EPEL

 

Python free space:

Don’t forget to clean up tarballs

$conda clean -a