Bug: Menu Top/ Megamenu -> Menu Editer -> Update 非第一個Item後, 點Save Menu無反應 ========= M2 Venus Theme=========== (20190812) dvonam dv4ml@ksoffice.com.tw + AA2233zz!! + 13202678176 + D-cc Key pair name:dv-1 FingerPrint: ae:db:be:20:18:a1:da:77:2f:86:93:a2:cc:10:79:77:c6:86:ca:cf 3.18.102.65 puttygen.exe + dv-1.pem -> dv-1.ppk ssh: putty + IP + dv-1.ppk -> sudo su (root) ========= M2 =========== -- Apache2 apt install apache2 systemctl status apache2 (查狀態) /var/www/html/index.html (default home page) apache2 -v Server version: Apache/2.4.29 (Ubuntu) Server built: 2019-07-16T18:14:45 -- PHP sudo find / -name 'php.ini' vi /etc/php/7.1/apache2/php.ini vi /etc/php/7.1/cli/php.ini date.timezone = Asia/Taipei memory_limit=1G asp_tags = off (not found) opcache.save_comments=1 service apache2 restart vi /var/www/html/phpinfo.php revres88 mysql -u root -p revres88 mysql> create database magento; create user magento IDENTIFIED BY 'magento'; GRANT ALL ON magento.* TO magento@localhost IDENTIFIED BY 'magento'; flush privileges; mysql -u magento -p magento -- NTP apt-get install ntp apt install ntpsec-ntpdate apt install ntpdate vi /etc/ntp.conf server 0.us.pool.ntp.org server 1.us.pool.ntp.org server 2.us.pool.ntp.org service ntp restart -- phpmyadmin apt install phpmyadmin cd /var/www/html/ sudo ln -s /usr/share/phpmyadmin phpmyadmin mysql -u root -p mysql> USE mysql; mysql> UPDATE user SET plugin='mysql_native_password' WHERE User='root'; mysql> FLUSH PRIVILEGES; mysql> exit; -- Composer apt install composer php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');" -- set SWAP -- https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04 ---- magento 2 ---- useradd m2 mkdir /var/www/html/magento23 su m2 (exit -> back to root) composer create-project --repository=https://repo.magento.com/ magento/project-community-edition /var/www/html/magento2 username: 0c2e51e0297016e62e864f5effe625c7 (Public Key) password: 38410b35ec042696d687ee7c90436d88 (Private Key) cd /dv wget http://61.220.188.84/dv-2019-tmp/dv.tar.bz2 mkdir /var/www/html/magento2 tar jxf ./dv.tar.bz2 -C /var/www/html/magento2 apt-get update apt-get upgrade cd /var/www/html/bin su -s /bin/bash -c su root -s /bin/bash -c magento setup:install sudo -u m2 magento setup:install =================================================== ---- 0 預先安裝 ---- apt install gcc apt install g++ apt install make cd /etc/ld.so.conf.d -> vi local.conf,里边写上 /usr/local/lib ->sudo ldconfig vi xxx.txt i -> insert text mode esc -> command mode :wq -> save + quit :/xyz -> find xyz find / -name abc.xyz ---- 1 httpd ---- -- APR 1.5.2 cd /dv wget -c http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz sudo tar zxvf ./apr-1.5.2.tar.gz -C /usr/lib cd /usr/lib/apr-1.5.2 vi configure => $RM "$cfgfile" -> $RM -f "$cfgfile" ./configure --prefix=/usr/local/apr make make install -- APR-Util 1.5.4 cd /dv wget -c http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz sudo tar zxvf ./apr-util-1.5.4.tar.gz -C /usr/lib cd /usr/lib/apr-util-1.5.4 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr make make install -- PCRE 8.37 cd /dv wget -c http://ftp.pcre.org/pub/pcre/pcre-8.37.tar.bz2 sudo tar jxvf ./pcre-8.37.tar.bz2 -C /usr/lib cd /usr/lib/pcre-8.37 ./configure -prefix=/usr/local/pcre -- Apache HTTP Server 2.4.39 (httpd) cd /dv wget -c http://mirrors.tuna.tsinghua.edu.cn/apache//httpd/httpd-2.4.39.tar.bz2 sudo tar jxvf ./httpd-2.4.39.tar.bz2 -C /usr/lib cd /usr/lib/httpd-2.4.39 x->./configure x->./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util ./configure --prefix=/usr/local/apache --with-pcre=/usr/local/pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util -enable-dav -enable-so -enable-maintainer-mode -enable-rewrite make make install /usr/local/apache/bin/apachectl start (start httpd) /usr/local/apache/htdocs/index.html (default home page) /usr/local/apache/conf/httpd.conf (default configure file) 配置多域名、端口映射 Listen 80 Listen 8080 DocumentRoot /var/www/html/项目1 ServerName http://www.域名1.com Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all DocumentRoot /var/www/html/项目2 ServerName http://www.域名2.com Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all DocumentRoot /var/www/html/项目3 ServerName Ip:8080 Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all https://blog.csdn.net/mashuai720/article/details/83030647 ---- 2 mysql ---- cd /dv wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.27-linux-glibc2.12-x86_64.tar.gz sudo tar zxvf ./mysql-5.7.27-linux-glibc2.12-x86_64.tar.gz -C /usr/local cd /usr/local mv mysql-5.7.27-linux-glibc2.12-x86_64/ mysql57 cd mysql57/ mkdir data groupadd mysql useradd -r -g mysql mysql chown -R mysql /usr/local/mysql57 chgrp -R mysql /usr/local/mysql57 mkdir tmp cd tmp chown -R mysql /usr/local/mysql57/tmp chgrp -R mysql /usr/local/mysql57/tmp chmod 777 /usr/local/mysql57/tmp touch mysql.sock chown -R mysql:mysql /usr/local/mysql57/tmp/mysql.sock chmod 755 /usr/local/mysql57/tmp/mysql.sock touch mysqld.pid chown -R mysql:mysql /usr/local/mysql57/tmp/mysqld.pid chmod 777 /usr/local/mysql57/tmp/mysqld.pid cd .. mkdir log cd log touch mysqld.log chown -R mysql:mysql /usr/local/mysql57/log/mysqld.log chmod 755 /usr/local/mysql57/log/mysqld.log cd .. sudo apt-get install libaio1 libaio-dev bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql57/ --datadir=/usr/local/mysql57/data/ 2019-08-13T02:05:05.914360Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2019-08-13T02:05:06.785562Z 0 [Warning] InnoDB: New log files created, LSN=45790 2019-08-13T02:05:07.007051Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2019-08-13T02:05:07.086730Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: c59b8702-bd6e-11e9-b229-0afe7b634f34. 2019-08-13T02:05:07.088593Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened. 2019-08-13T02:05:07.098887Z 1 [Note] A temporary password is generated for root@localhost: dzs=L)3vh5o? bin/mysql_ssl_rsa_setup --datadir=/usr/local/mysql57/data/ Ignoring -days; not generating a certificate Can't load /root/.rnd into RNG 140465289515456:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/root/.rnd Generating a RSA private key ...................................................................+++++ .....................+++++ writing new private key to 'ca-key.pem' ----- Ignoring -days; not generating a certificate Can't load /root/.rnd into RNG 140610080981440:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/root/.rnd Generating a RSA private key ..................................................+++++ ....................+++++ writing new private key to 'server-key.pem' ----- Ignoring -days; not generating a certificate Can't load /root/.rnd into RNG 140521450791360:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/root/.rnd Generating a RSA private key ..........+++++ ...........+++++ writing new private key to 'client-key.pem' ----- touch /etc/my.cnf vim /etc/my.cnf [mysqld] character_set_server=utf8 init_connect='SET NAMES utf8' basedir=/usr/local/mysql57 datadir=/usr/local/mysql57/data port = 3306 socket=/tmp/mysql.sock log-error=/usr/local/mysql57/log/mysqld.log pid-file=/usr/local/mysql57/tmp/mysqld.pid #表名不区分大小写 lower_case_table_names = 1 max_connections=5000 sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION cp support-files/mysql.server /etc/init.d/mysql vim /etc/init.d/mysql -> basedir= -> basedir=/usr/local/mysql57 -> datadir= -> datadir=/usr/local/mysql57/data /* touch /usr/local/mysql57/tmp/mysqld.pid chown -R mysql /usr/local/mysql57/tmp chgrp -R mysql /usr/local/mysql57/tmp chmod 777 /usr/local/mysql57/tmp */ /etc/init.d/mysql start /etc/init.d/mysql status /etc/init.d/mysql stop ---- 3 PHP ---- -- PHP 7.1.3 -- sudo apt-get -y update sudo add-apt-repository ppa:ondrej/php sudo apt-get -y update sudo apt-get install -y php7.1 libapache2-mod-php7.1 php7.1-common php7.1-gd php7.1-mysql php7.1-curl php7.1-intl php7.1-xsl php7.1-mbstring php7.1-zip php7.1-bcmath php7.1-iconv php7.1-soap -- phpmyadmin -- apt-get install phpmyadmin /* cd /dv wget http://cn2.php.net/distributions/php-7.1.6.tar.bz2 sudo tar jxvf ./php-7.1.6.tar.bz2 -C /usr/lib cd /usr/lib/php-7.1.6 apt install libxml2-dev apt install libssl-dev apt install libbz2-dev apt install libjpeg-dev apt install libpng-dev apt install libfreetype6-dev ./configure --prefix=/usr/local/php7 --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php7/etc --with-pdo-mysql=/usr/local/mysql57 --with-mysqli=/usr/local/mysql57/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif */ 98 Magento 2.3 前台:http://mag.suanok.com/magento/ 後台:http: //mag.suanok.com/magento/admin_4mo0et/ adminmag+frevres0907留 EMAIL: ada@ksoffice.com.tw Encrypt password: 1f4efcbd4a6caf2c7bd08ae94192908c 資料庫名稱是 magento2 cd /www/web/mag/public_html/magento php bin/magento deploy:mode:show php bin/magento deploy:mode:set default php bin/magento deploy:mode:set developer ============================================== 20190811 ===================================================== https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx7fe291f76cf93354&secret=d8fd277920bba0cfddc1fd8f5eacf937 {"access_token":"y-RkXsDVDdxRaMTBybYL8hj5YREkUJmG6hLkGM4E_JkcNmq1pClejE5gF9mTJrmI5qc4Jf2elQf2aD7OBmgx22sWoaZrtArDxAa3A6RWQa8","expires_in":7200} 微信公眾平台 lee@dacomputing.com aa2233zz AppID(应用ID) wx7fe291f76cf93354 AppSecret(应用密钥) d8fd277920bba0cfddc1fd8f5eacf937 weixin.qq.com 101.227.131.102, 101.226.76.175 BIOS 中的南橋USB->8 ports, USB2.0->disable 才不會常常抓不到USB0 BIOS設少8小時->如果linux多8小時 為了確定 wifi AP 是否存在用 ping wifi AP 192.168.188.253 開機增加/etc/sysconfig/network-scripts/ifcfg-eth0:4 --> 192.168.188.100 date -s 2015-01-15 date -s 09:41:30 hwclock -w 把date 寫入 BIOS 點煙器的黃線在中間藍靠主板咖啡靠面板 如果timer_3g卡死,flag-3g-busy將一直存在 ps -ef 列出defunct 僵屍 kill -9 xxxx 進程號 /usr/bin/autossh -M 5678 -NfR 8080:192.168.100.99:22 root@61.220.188.84 ipad-saferi