1.Installing phpMyAdmin
$ sudo apt update $ sudo apt install phpmyadmin
สร้าง link
$ sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
https://server_domain_or_IP/phpmyadmin
$ sudo apt update $ sudo apt install phpmyadmin
สร้าง link
$ sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
https://server_domain_or_IP/phpmyadmin
$ sudo apt update
$ sudo apt install mysql-server
$ sudo mysql_secure_installation
$ mysql -u root -p mysql> GRANT ALL ON *.* TO 'sammy'@'localhost' IDENTIFIED BY 'password'; mysql> FLUSH PRIVILEGES;
$ systemctl status mysql.service ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2020-02-06 15:32:25 +07; 17min ago Main PID: 3831 (mysqld) Tasks: 28 (limit: 4915) CGroup: /system.slice/mysql.service └─3831 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid
ถ้า mysql ไม่ start ให้ start ด้วย
$ sudo systemctl start mysql
ดูเวอร์ชันของ mysqladmin
$ sudo mysqladmin -p -u root version Enter password: mysqladmin Ver 8.42 Distrib 5.7.29, for Linux on x86_64 Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Server version 5.7.29-0ubuntu0.18.04.1 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 18 min 31 sec Threads: 1 Questions: 21 Slow queries: 0 Opens: 113 Flush tables: 1 Open tables: 106 Queries per second avg: 0.018
$ sudo apt update $ sudo apt install nginx
$ sudo ufw app list Available applications: CUPS Nginx Full Nginx HTTP Nginx HTTPS
$ sudo ufw allow 'Nginx Full' $ sudo ufw allow 'Nginx HTTP'
$ sudo ufw status Status: inactive
$ sudo ufw enable
$ sudo ufw status Status: active To Action From -- ------ ---- Nginx Full ALLOW Anywhere Nginx HTTP ALLOW Anywhere Nginx Full (v6) ALLOW Anywhere (v6) Nginx HTTP (v6) ALLOW Anywhere (v6)
เปิดพอร์ทแบบกำหนดไปเลย
$ sudo ufw allow 22/tcp $ sudo ufw allow 80/tcp $ sudo ufw allow 443/tcp
$ systemctl status nginx ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2020-02-06 14:26:15 +07; 33min ago Docs: man:nginx(8) Main PID: 5720 (nginx) Tasks: 5 (limit: 4915) CGroup: /system.slice/nginx.service ├─5720 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; ├─5721 nginx: worker process ├─5722 nginx: worker process ├─5723 nginx: worker process └─5724 nginx: worker process
ติดตั้งด้วย Snap
$ sudo snap install --classic code
Once installed, the Snap daemon will take care of automatically updating VS Code in the background. You will get an in-product update notification whenever a new update is available.
เรียก vscode
$ code .
releases http://releases.ubuntu.com/18.04/
สร้าง shortcut ที่ home
ชื่อ shared
ให้ชี้ไปที่ /media/sf_shared
$ sudo ln -s /media/sf_shared /home/username/shared
chown
$ sudo chown username filename
restart
$ reboot
ปัญหา
Warning in ./libraries/plugin_interface.lib.php#551 count(): Parameter must be an array or an object that implements Countable
วิธีแก้
backup ไฟล์ plugin_interface.lib.php ไว้ก่อน
$ sudo cp /usr/share/phpmyadmin/libraries/plugin_interface.lib.php /usr/share/phpmyadmin/libraries/plugin_interface.lib.php.bak
เข้าไปแก้ไขไฟล์ plugin_interface.lib.php
$ sudo nano /usr/share/phpmyadmin/libraries/plugin_interface.lib.php
กด CTRL + W แล้วค้นหาคำว่า
if ($options != null && count($options) > 0) {
ให้แทนด้วย
if ($options != null && count((array)$options) > 0) {
Link
ปัญหา
Warning in ./libraries/sql.lib.php#613 count(): Parameter must be an array or an object that implements Countable
วิธีแก้
backup ไฟล์ sql.lib.php ไว้ก่อน
$ sudo cp /usr/share/phpmyadmin/libraries/sql.lib.php /usr/share/phpmyadmin/libraries/sql.lib.php.bak
เข้าไปแก้ไขไฟล์ sql.lib.php
$ sudo nano /usr/share/phpmyadmin/libraries/sql.lib.php
กด CTRL + W แล้วค้นหาคำว่า
(count($analyzed_sql_results['select_expr'] == 1)
ให้แทนด้วย
((count($analyzed_sql_results['select_expr']) == 1
Link
Before installing .NET, you’ll need to register the Microsoft key, register the product repository, and install required dependencies. This only needs to be done once per machine.
$ wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb $ sudo dpkg -i packages-microsoft-prod.deb
Update the products available for installation, then install the .NET SDK.
$ sudo add-apt-repository universe $ sudo apt-get install apt-transport-https $ sudo apt-get update $ sudo apt-get install dotnet-sdk-2.2
ตรวจสอบหลังการติดตั้ง
$ dotnet --version 2.2.402
Link