Format usb disk
#mkfs.ext4 /dev/sdd123456
查詢系統硬碟的 UUID 有兩種方式:
ls -lh /dev/disk/by-uuid
97e5c775-cb92-4f24-bb9c-95f4d6d3a416 -> ../../sda2
7f54f33c-bffe-008b-6e81-9f4fac92e42a -> ../../sda1
blkid # 建議用此方法, 可以查到最完整的資訊 (blkid /dev/sda1 # 查詢單一磁區)
/dev/sda1: UUID="7f54f33c-bffe-008b-6e81-9f4fac92e42a" UUID_SUB="5fe83019-0f46-b114-35e6-63ca4ee7d5a6" LABEL="web:0" TYPE="linux_raid_member"
/dev/sda2: UUID="97e5c775-cb92-4f24-bb9c-95f4d6d3a416" TYPE="swap"
Other
Cnt-server-note
1. 網卡設定 #nmtui
2. disable Selinux Network direwall
3. yum install httpd php* MariaDb MariaDb-server PhpMyAdmin
4. wget webmin
5. upgrade php 5.4 > 5.6 https://webtatic.com/packages/php56/
fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php56w php56w-opcache
yum install php56w-fpm php56w-opcache
yum install yum-plugin-replace
yum replace php-common --replace-with=php56w-common
yum install php56w-opcache
6. config php.ini
opcache.memory_consumption=256
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
opcache.memory_consumption=192
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so
; Extension PDO
extension=pdo.so
extension=php_pdo.dll
extension=php_pdo_mysql.dll
max_allowed_packet=1024MB
apc.rfc1867 = 1
--------------
In CentOS 7.0 uses Firewall-cmd, so I will customize it to allow external access to port 80 (http) and 443 (https).
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload
Upgrade MariaDB 5.5 to MariaDB 10.0 on CentOS 7
20170209
Performance Schema
# nano /etc/my.cnf
# Performance Schema
performance_schema=on
Linux
Email setting
Postfix 只負責寄信,收信要靠POP3 service,所以需要安裝dovecot程式,執行指令:
nano /etc/dovecot/dovecot.conf
1. GreenCom.com.tw
Asango@greencom.com.tw PW GcAli...........12
2. Ali3.tw
kml aliases service Ali3.tw noreply service@ali3.tw PW GcAli............12
service and asango PW GcAli............12 --> 指向 lkm PW GcAli............12
3.GreenCom.tw (lkm)
supports@greencom.tw GcAli...............12
test smtp_sasl account lkm password GcAli300...........
perl -MMIME::Base64 -e 'print encode_base64("\000lkm\000GcAli300301DeC!@");'
telnet localhost 25
EHLO greencom.com.tw
AUTH PLAIN AGFzYW5nbwBHY0FsaTMwMDMwMURlQyFA
235 2.7.0 Authentication successful
------------------RHEL / CentOS 7 安裝 Postfix, Dovecot
https://www.phpini.com/linux/rhel-centos-7-install-postfix-dovecot
Email
Roundcubemail Setup
在這之前你可能必須要先了解一下Roundcubemail的執行環境
套件: Postfix + Dovecot + Roundcube + mysql + httpd
Protocol : smtp + sasl + TLS (25) / pop3s (995) / imaps (995)
Auth : ldap + file
預設主程式安裝的位置在 /usr/share/roundcubemail 中,而設定檔是置於 /etc/roundcubemail 目錄中。
Alias /gtmail /usr/share/roundcubemail
採用RPM的安裝版本,預設的安裝路徑是 http://yourip/roundcubemail/installer,而為了安全理由,系統會限制只能從本機上用瀏覽器去執行安裝畫面,所以請先設定 /etc/httpd/conf.d/roundcubemail.conf,設定內容說明如下:
請先將以下兩段內容以#符號註解起來:
#
#
# # Apache 2.4
# Require local
#
#
# # Apache 2.2
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
# Allow from ::1
#
#
#
#
# # Apache 2.4
# Require local
#
#
# # Apache 2.2
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
# Allow from ::1
#
#
http://blog.kevinlinul.idv.tw/?p=225
Aug 30 2014
第2章 郵件進階安全性設定--SASL認證
依照前面章節設定完mail server與pop3 server之後,
只能算是簡單的將郵件收發功能架設起來而已,
目前僅能在區域網路寄信,實際上使用起來有很多不便的地方,
使用者在外面想寄信是不被允許的。
要讓使用者可以在任何地方寄信就需要修改郵件伺服器的認證機制,
加入SASL身份認證機制才行。
SASL可以透過 dovecot 或是 cyrus sasl 兩種方式認證,
先說明透過 dovecot的方式如下:
修改 /etc/dovecot/conf.d/10-master.conf
service auth {
# auth_socket_path points to this userdb socket by default. It's typically
# used by dovecot-lda, doveadm, possibly imap process, etc. Its default
# permissions make it readable only by root, but you may need to relax these
# permissions. Users that have access to this socket are able to get a list
# of all usernames and get results of everyone's userdb lookups.
# unix_listener auth-userdb {
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
存檔後離開
修改 /etc/dovecot/conf.d/10-auth.conf
auth_mechanisms = plain login
存檔後離開
修改 /etc/postfix/main.cf
mynetworks = 127.0.0.0/8
這樣即使是區網內使用者,未經過身份認證也不能寄信,提高安全性。
檔末新增以下設定:
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client sbl-xbl.spamhaus.org
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
重新啟動 postfix dovecto 服務之後可以進行登入測試,看設定是否正確:
systemctl restart dovecot
ssystemctl restart postfix
telnet localhost 25
ehlo localhost
要出現以下這兩行才是正確:
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
http://luyaku.pixnet.net/blog/post/184162873
Email
Firewall in Centos 7
1. Webmin
nano /etc/yum.repos.d/webmin.repo
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
rpm --import http://www.webmin.com/jcameron-key.asc
yum check-update
yum install webmin -y
chkconfig webmin on
service webmin start
------------------By default, Webmin will listen on port 10000. Enable webmin Port:
暫時啟用
firewall-cmd --add-port=10000/tcp
開機啟用
firewall-cmd --zone=public --add-port=10000/tcp --permanent
2. Postfix
firewall-cmd --permanent --add-service=smtp
firewall-cmd --permanent --add-service=submission
firewall-cmd --permanent --add-service=smtps
3.Mariadb
[mysqld]
...
#skip-networking
...
#bind-address =
...
mysql -p
SELECT User, Host FROM mysql.user WHERE Host 'localhost';
firewall-cmd --add-port=3306/tcp
firewall-cmd --permanent --add-port=3306/tcp
Firewall
GreenCom DNS-rev
greencom.com.tw.rev
$ORIGIN 229.125.59.in-addr.arpa.
$TTL 3D
@ SOA greencom.greencom.com.tw. root.greencom.com.tw. (2122100 4h 1h 1w 1h)
@ IN NS greencom.greencom.com.tw.
2 IN PTR greencom.greencom.com.tw.
3 IN PTR dns.ali3.tw.
5 IN PTR dns.bking.tw.
6 IN PTR dns.greencom.tw.
7 IN PTR dns.hinoki.tw.
8 IN PTR dns.coonatea.com.tw.
Linux
GreenCom Server 備援計畫
2,5 Greencom.com.tw none mysql Ver 14.14 Distrib 5.5.54 | php56w-5.6.30-1
3 故障 > 3 -->(5) /var/www/blog /var/www/crm /web5
3,8 ali3.tw none mysql Ver 14.14 Distrib 5.1.73 | php-5.3.3-48
2 故障 8 --> (2) /gcroot/www/html
6,9 greencom.tw none
3 故障 9 --> (3) /var/www/html
7 hinoki.tw mysql Ver 14.12 Distrib 5.0.95 | php-5.1.6-45
2 故障 8 --> (2) /gcroot/www/html
2 ^ 3 php-5.3.3-48 mysql-5.1.73-8
6 ^ 7 php56w-5.6.30-1
Linux
Prestashop - webkul/hotelcommerce
QloApps
Hotel Commerce plays a vital role in hotel industry as it has changed the online presence of the hotels.QloApps also known as Qlo is a Hotel Commerce Software or you can say a Hotel Booking & Reservation System. Qlo is an open source and free platform which help you to launch your own hotel booking website and manage your online & On-Desk booking easily
Demo
FrontEnd : http://demo.qloapps.com
Backend : http://demo.qloapps.com/adminhtl/index.php
username : demo@demo.com
Password : demodemo
Server configuration
To install Qlo, you need a web server running PHP 5.2+ and any flavor of MySQL 5.0+ (MySQL, MariaDB, Percona Server, etc) You will also need a database administration tool, such as phpMyAdmin, in order to create a database for PrestaShop. We recommend the Apache or Nginx web servers.
Installation
a) from Source
Please go through this blog : http://qloapps.com/install-qloapps/ for detail instruction about installation.
In nutshell : Once the files in the QloApps archive have been decompressed and uploaded on your hosting space, go to the root of your QloApps directory with your web browser, and the QloApps installer will start automatically. Follow the instructions until QloApps is installed.
b) Docker Image :
https://github.com/webkul/qloapps_docker
https://hub.docker.com/r/webkul/qloapps_docker/
c) Vagrant Image : https://github.com/webkul/Vagrant_qloapps
Getting support
If you need help using QloApps, contact the QloApps support team: qloapps@webkul.com or raise ticket at https://webkul.uvdesk.com
Webkul is known for his proactive support and already developed more than 100+ plugins on prestashop and more than 700+ plugins on other platforms.
license
OSL V3 : https://opensource.org/licenses/OSL-3.0
Credits
Crafted with :heart: at Webkul
Thank you for downloading.
https://github.com/webkul/hotelcommerce
Web Server Spec.
查看motherboard info. # dmidecode -t 2
59.125.226.3
SMBIOS 2.4 present.
Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: Z68A-D3H-B3
Version: x.x
Serial Number:
支援LGA1155插槽處理器:IntelR Core? i7處理器 / IntelR Core? i5處理器 / IntelR Core? i3處理器 / IntelR PentiumR處理器 / IntelR CeleronR處理器
L3快取記憶體取決於CPU (部份 IntelR Core? 處理器需要搭配外接顯示卡, 詳細支援列表請參考 "CPU 支援列表")
晶片組 IntelR Z68 高速晶片組
記憶體 4個1.5V DDR3 DIMM插槽,最高支援到32 GB * 由於Windows 32-bit作業系統的限制,若安裝超過4 GB的實體記憶體時,實際上顯示之記憶體容量將少於4 GB。
支援雙通道記憶體技術
支援DDR3 2133/1866/1600/1333/1066 MHz
支援non-ECC記憶體
支援Extreme Memory Profile (XMP)記憶體
查看 CPU
# cat /proc/cpuinfo
Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
核心數量 2
執行緒數量 4
處理器基礎頻率 3.30 GHz
快取記憶體 3 MB SmartCache
TDP 65 W
最大記憶體大小 (取決於記憶體類型) 32 GB
記憶體類型 DDR3 1066/1333
最大記憶體通道數量 2 最大記憶體頻寬 21 GB/s
59.125.226.2
CPU: Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz
Motherboard
Manufacturer: Gigabyte Technology Co., Ltd. Product Name: EG45M-UD2H
支援雙通道DDR2 1066 (超頻)記憶體架構
4個1.8V DDR2 DIMM插槽,最高支援到16 GB
支援雙通道記憶體技術 支援DDR2 1066(O.C.)/800/667 MHz
Zymphonies pro themes
201611
Amaze Responsive Theme
Rainbow eCommerce Theme
Globers eCommerce Theme
Modern Responsive Theme
20170117
D7 WebOne Responsive Theme http://www18.greencom.tw
D8 Builder Multi-Purpose Theme http://www19.greencom.tw
D8 Fortune Business Theme http://www16.greencom.tw
X D8 IT Consulting Theme http://www20.greencom.tw
Fatal error: Class name must be a valid object or a string in /gcroot/www/zp_it/core/modules/field/src/FieldStorageConfigStorage.php on line 155