cd /home/jhcis/MEGAsync/jhcisbackup/
FILE=jhcisdb-03306-$(date -d "+0 day" "+%Y.%m.%d").sql
if [ -f "$FILE" ]; then
sudo zip -r jhcisdb-03306-$(date -d "+0 day" "+%Y.%m.%d").zip "$FILE"
fi
cd /home/jhcis/Dropbox/jhcisbackup/
FILE=jhcisdb03309-$(date -d "+0 day" "+%Y.%m.%d").sql
if [ -f "$FILE" ]; then
sudo zip -r jhcisdb03309-$(date -d "+0 day" "+%Y.%m.%d").zip "$FILE"
fi
php_value date.timezone “Asia/Bangkok” ###Start Kloxo PHP config Area ###Please Don’t edit these comments or the content in between. kloxo uses this to recognize the lines it writes to the the file. If the above line is corrupted, it may fail to recognize them, leading to multiple lines. php_value default_charset TIS620
Virtual Network Computing (VNC) is a technology which allows remote control of another computer using the Remote Frame Buffer protocol (RFB). In this guide, we’ll cover how to Install and Configure VNC Server on Ubuntu 18.04 LTS
VNC works in a client/server model. The VNC client is installed on the local computer while the VNC server is installed on the remote system to be managed. The server transmits a duplicate of the remote computer’s display screen to the viewer(client).
Install and Configure VNC Server on Ubuntu 18.04 LTS
Install VNC server on Ubuntu 18.04 by running the commands below in your terminal.
sudo apt update
sudo apt -y install vnc4server
Step 2: Install Desktop Enviroment
Ensure you have a Desktop Environment installed on your Ubuntu 18.04. For this guide, we’ll install Xfce desktop environment.
sudo apt install xfce4 xfce4-goodies
You can choose to use other Desktop environments. Step 3: Configure VNC Server
Once you’ve finished the installation of Desktop environment and VNC server. Configure VNC server on Ubuntu 18.04 LTS as follows.
1. Set a secure access password
Run the vncpasswd command to set password for your VNC server.
$ vncpasswd
Password:
Verify:
When prompted, enter and verify your password to set.
2. Start VNC server
Start VNC Server on Ubuntu 18.04 using the command:
$ vncserver :1
New 'ubuntu-01:1 (computingforgeeks)' desktop is ubuntu-01:1
Creating default startup script /home/computingforgeeks/.vnc/xstartup
Starting applications specified in /home/computingforgeeks/.vnc/xstartup
Log file is /home/computingforgeeks/.vnc/ubuntu-01:1.log
3. Kill VNC Server
Kill VNC Server using the command:
$ vncserver -kill :1
Killing Xvnc4 process ID 20842
4. Set VNC Server Desktop Environment
VNC configuration file is located on ~/.vnc/xstartup. Edit it with your favorite text editor.
sudo vim ~/.vnc/xstartup
Add the following line at the end of the file.
exec /usr/bin/startxfce4 &
Finally start VNC Server with ;
Display number [1]
Screen resolution [800×600]
Color depth [24]
$ vncserver :1 -geometry 800x600 -depth 24
New 'ubuntu-01:1 (computingforgeeks)' desktop is ubuntu-01:1
Starting applications specified in /home/computingforgeeks/.vnc/xstartup
Log file is /home/computingforgeeks/.vnc/ubuntu-01:1.log
Step 4: Connect to the VNC Desktop
You can connect to remote desktop using a VNC client and SSH tunneling. Create an ssh tunnel to VNC server using the following command
ssh @ -C -L 5901:127.0.0.1:5901
Then install vncviewer client
sudo apt install tigervnc-viewer
On Arch Linux, install it with:
sudo pacman -S tigervnc
Once your SSH tunnel is running, connect to localhost:5901 using VNC client. When prompted for password, enter the password created during the VNC server configuration.
Warning: FPDF::include(font/angsa.php): failed to open stream: No such file or directory in /opt/lampp/lib/php/fpdf.php on line 1145
Warning: FPDF::include(): Failed opening 'font/angsa.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/lib/php/fpdf.php on line 1145 FPDF error: Could not include font definition fileroot@jhcis-03301:/home/jhcis# sudo sh /var/jhcis/create-pdf.sh
chmod 644 /opt/lampp/etc/my.cnf
/opt/lampp/bin/mysql
UPDATE mysql.user SET Password=PASSWORD('123456') WHERE User='root';
GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY '123456';
GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY '';
FLUSH PRIVILEGES;
/opt/lampp/lampp restart
/opt/lampp/bin/mysql --port=3333 -u root -p
opt/lampp/phpmyadmin/config.inc.php
Password = '123456';
cd /var/www/jhcisbackup/
FILE=jhcisdb-03301.$(date -d "+0 day" "+%Y-%m-%d").sql
if [ -f "$FILE" ]; then
sudo zip -r jhcisdb-03301.$(date -d "+0 day" "+%Y-%m-%d").zip "$FILE"
fi
cd /var/www/jhcisbackup/
FILE=jhcisdb-03301.$(date -d "+0 day" "+%Y-%m-%d").zip
if [ -f "$FILE" ]; then
sudo rm -f /var/www/jhcisbackup/jhcisdb-03301.$(date -d "-0 day" "+%Y-%m-%d").sql
sudo rm -f /var/www/jhcisbackup/jhcisdb-03301.$(date -d "-73 day" "+%Y-%m-%d").zip
sudo rm -f /var/www/jhcisbackup/jhcisdb-03301.$(date -d "-73 day" "+%Y-%m-%d").zip
fi
If your app was written for older versions of MySQL and is not compatible with strict SQL mode in MySQL 5.7, you can disable strict SQL mode. For example, apps such as WHMCS 6 and Craft 2 do not support strict SQL mode.
Save the file by pressing CTRL + X, then y, then ENTER to confirm changes.
Finally, restart MySQL with this command:
sudo service mysql restart
This change disables two SQL mode settings, STRICT_TRANS_TABLES and ONLY_FULL_GROUP_BY, that were added in MySQL 5.7 and cause problems for some older applications.
Confirming Strict SQL Mode Is Disabled
You can confirm strict SQL mode is disabled by running this command as root:
If strict mode is disabled, you won't see any output from that command.
If disabling strict mode causes any problems for you, you can re-enable it by deleting that file and restarting MySQL again.
What Strict SQL Mode Errors Look Like
If your app isn't compatible with strict SQL mode, you'll often see SQL errors such as:
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of
SELECT list is not in GROUP BY clause and contains nonaggregated column
'yourdbname.tblannouncements.date' which is not functionally dependent on
columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by