Build a LAMP Web Server with WordPress under Raspberry Pi

Information Source: https://www.raspberrypi.org/learning/lamp-web-server-with-wordpress/worksheet/

Learn to set up a LAMP (Linux, Apache, MySQL, PHP) stack on your Raspberry Pi and configure it to work as a web server. You’ll download and install WordPress and set up a basic website which you can access on any device on the same network as your Pi.

Set up Apache Web Server

Apache is a popular web server application you can install on the Raspberry Pi to allow it to serve web pages.

On its own, Apache can serve HTML files over HTTP, and with additional modules can serve dynamic web pages using scripting languages such as PHP.

Install Apache

First install the apache2 package by typing the following command into the terminal:

sudo apt-get install apache2 -y

Test the web server

By default, Apache puts a test HTML file in the web folder. This default web page is served when you browse to http://localhost/ on the Pi itself, or http://192.168.1.10 (whatever the Pi’s IP address is) from another computer on the network. To find out the Pi’s IP address, type hostname -I at the command line (or read more about finding your IP address) in our documentation.

Browse to the default web page, either on the Pi or from another computer on the network, and you should see the following:

Apache it works

This means you have Apache working!

Changing the default web page

This default web page is just a HTML file on the filesystem. It is located at /var/www/html/index.html.

Note: The directory was /var/www in Raspbian Wheezy but is now /var/www/html in Raspbian Jessie

Navigate to this directory in the Terminal and have a look at what’s inside:

cd /var/www/html
ls -al

This will show you:

total 12
drwxr-xr-x  2 root root 4096 Jan  8 01:29 .
drwxr-xr-x  3 root root 4096 Jan  8 01:28 ..
-rw-r--r--  1 root root  177 Jan  8 01:29 index.html

This shows that there is one file in /var/www/html/ called index.html. The . refers to the directory itself /var/www/html and the .. refers to the parent directory /www/.

What the columns mean

  1. The permissions of the file or directory
  2. The number of files in the directory (or 1 if it’s a file).
  3. The user which owns the file or directory
  4. The group which owns the file or directory
  5. The file size
  6. The last modification date & time

As you can see, by default the html directory and index.html file are both owned by the rootuser, so you’ll need to use sudo to edit them.

Try editing this file and refreshing the browser to see the web page change. Press Ctrl + X and hit Enter to save and exit.

Install PHP

PHP is a preprocessor; it’s code that runs when the server receives a request for a web page. It runs, works out what needs to be shown on the page, then sends that page to the browser. Unlike static HTML, PHP can show different content under different circumstances. Other languages are capable of this, but since WordPress is written in PHP, that’s what we need to use this time. PHP is a very popular language on the web; large projects like Facebook and Wikipedia are written in PHP.

Install the PHP and Apache packages with the following command:

sudo apt-get install php5 libapache2-mod-php5 -y

Test PHP

Create the file index.php:

sudo leafpad index.php

(or use nano)

Put some PHP content in it:

<?php echo "hello world"; ?>

Now save the file. Next delete index.html because it takes precendence over index.php:

sudo rm index.html

Refresh your browser. You should see “hello world”. This is not dynamic but it is still served by PHP. If you see the raw PHP above instead of “hello world”, reload and restart Apache like so:

sudo service apache2 restart

Otherwise try something dynamic, for example:

<?php echo date('Y-m-d H:i:s'); ?>

Or show your PHP info:

<?php phpinfo(); ?>

Install MySQL

MySQL (pronounced My Sequel or My S-Q-L) is a popular database engine. Like PHP, its overwhelming presence on web servers enhanced its popularity. This is why projects like WordPress use it, and why those projects are so popular.

Install the MySQL Server and PHP-MySQL packages by entering the following command into the terminal:

sudo apt-get install mysql-server php5-mysql -y

When installing MySQL you will be asked for a root password. You’ll need to remember this to allow your website to access the database.

Now restart Apache:

sudo service apache2 restart

Download WordPress

You can download WordPress from wordpress.org using the wget command. Helpfully, a copy of the latest version of WordPress is always available at wordpress.org/latest.tar.gz and wordpress.org/latest.zip, so you can grab the latest version without having to look it up on the website. At the time of writing, this is version 4.5.

Navigate to /var/www/html/, and download WordPress to this location. You’ll need to empty the folder first (be sure to check you’re not deleting files you need before running rm); change the ownership of this folder to the pi user too.

cd /var/www/html/
sudo rm *
sudo wget http://wordpress.org/latest.tar.gz

Now extract the tarball, move the contents of the folder it extracted (wordpress) to the current directory and remove the (now empty) folder and the tarball to tidy up:

sudo tar xzf latest.tar.gz
sudo mv wordpress/* .
sudo rm -rf wordpress latest.tar.gz

Running the ls or (tree -L 1) command here will show you the contents of a WordPress project:

.
├── index.php
├── license.txt
├── readme.html
├── wp-activate.php
├── wp-admin
├── wp-blog-header.php
├── wp-comments-post.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

This is the source of a default WordPress installation. The files you edit to customise your installation belong in the wp-content folder.

You should now change the ownership of these files to the Apache user:

sudo chown -R www-data: .

Set up your WordPress Database

To get your WordPress site set up, you need a database. Run the mysql command in the terminal and provide your login credentials (e.g. username root, password password):

mysql -uroot -ppassword

Here I have provided my password (the word password) on the command line; there is no space between -p and your password.

Alternatively you can simply supply an empty -p flag and wait to be asked for a password:

mysql -uroot -p

Now you will be prompted to enter the root user password you created earlier.

Once you’re connected to MySQL, you can create the database your WordPress installation will use:

mysql> create database wordpress;

Note the semi-colon ending the statement. On success you should see the following message:

Query OK, 1 row affected (0.00 sec)

Exit out of the MySQL prompt with Ctrl + D.

WordPress Configuration

You need to find out your Pi’s IP address to access it in the browser, so in a terminal type the command hostname -I.

Navigate to http://YOUR-IP-ADDRESS e.g. http://192.168.1.5 in the web browser on your Pi.

You should see a WordPress weclome page.

WordPress welcome screen

Click the Let's go! button.

Now fill out the basic site information as follows:

Database Name:      wordpress
User Name:          root
Password:           <YOUR PASSWORD>
Database Host:      localhost
Table Prefix:       wp_

and click Submit to proceed.

Now hit the Run the install button.

Now you’re getting close.

WordPress Welcome screen

Fill out the information: give your site a title, create a username and password and enter your email address. Hit the Install WordPress button, then log in using the account you just created.

Now you’re logged in and have your site set up, you can see the website by visiting your IP address in the browser on the Pi or another computer on the network. To log in again (or on another computer), go to http://YOUR-IP-ADDRESS/wp-admin.

Friendly permalinks

It’s recommended that you change your permalink settings to make your URLs more friendly.

To do this, log in to WordPress and go to the dashboard.

Go to Settings then Permalinks.

Select the Post name option and click Save Changes.

You’ll need to enable Apache’s rewrite mod:

sudo a2enmod rewrite

You’ll also need to tell the virtual host serving the site to allow requests to be overwritten.

Edit the Apache configuration file for your virtual host:

sudo leafpad /etc/apache2/sites-available/000-default.conf

(or use nano)

Add the following lines after line 1:

<Directory "/var/www/html">
    AllowOverride All
</Directory>

ensuring it’s within the <VirtualHost *:80> like so:

<VirtualHost *:80>
    <Directory "/var/www/html">
        AllowOverride All
    </Directory>
    ...

And then restart Apache again:

sudo service apache2 restart

Customisation

WordPress is very customisable. By clicking your site name in the WordPress banner along the top of the page (when logged in), you’ll be taken to the Dashboard. From here you can change the theme, add pages and posts, edit the menu, add plugins and lots more. This is just a taster for getting something interesting set up on the Raspberry Pi’s web server.

Procedure to migration Exchange Server Email to Office365

The main steps you perform for a cutover migration are shown in the following illustration.

Process for performing a cutover email migration to Office 365

  1. The administrator communicates upcoming changes to users and verifies domain ownership with the domain registrar.
  2. The administrator prepares the servers for a cutover migration and creates empty mail-enabled security groups in Office 365.
  3. The administrator connects Office 365 to the on-premises email system (this is called creating a migration endpoint).
  4. The administrator migrates the mailboxes and then verifies the migration.
  5. Grant Office 365 licences to your users.
  6. The administrator configures the domain to begin routing email directly to Office 365.
  7. The administrator verifies that routing has changed, and then deletes the cutover migration batch.
  8. The administrator completes post-migration tasks in Office 365 (assigns licenses to users and creates an Autodiscover Domain Name System (DNS) record), and optionally decommissions the on-premises Exchange servers.
  9. The administrator sends a welcome letter to users to tell them about Office 365 and to describe how to sign in to their new mailboxes.

Preparation for Microsoft Azure Solution Exam 70-532

Exam Target Audience

One of the recent hot IT topic is cloud technology. Microsoft and Amaze are two most active providers for cloud service. Microsoft’s Azure solution is very popular now. Learning Azure and obtain its cert will be very useful. The 70-532 Developing Microsoft Azure Solutions exam is targeted towards a Developer candidate. Candidates who are experienced in designing, programming, implementing, automating, and monitoring Microsoft Azure solutions. Candidates are also proficient with development tools, techniques, and approaches used to build scalable and resilient solutions.If you’re an experienced .NET developer, then you’ll likely have an easier time preparing for this exam. As a result, the exam will assume you are proficient with development tools, techniques and have experience developing scalable and resilient solutions.

Skills Measured

Here’s a high level break down of the exam objectives:

  • Design and implement websites (15-20%)
  • Create and manage virtual machines (20-25%)
  • Design and implement cloud services (20-25%)
  • Design and implement a storage strategy (20-25%)
  • Manage application and network services (15-20%)

Note: The percentage next to each is the approximate break out of how much of the exam focuses on each objective area. As you can see it’s pretty evenly distributed across the 5 areas.

The full exam objectives are listed on the official page for the 70-532 Developing Microsoft Azure Solutions exam.

Free Video Courses / Training

There are many video training courses available for the 70-532 Developing Microsoft Azure Solutions exam. The courses top on my list are over at the Microsoft Virtual Academy (MVA), but there are many more. Here’s a list of video courses I used while studying for this exam with the approximate length of the training courses.

Another video training option that’s not Free, but there is a Free Trial available is Opsgility on-demand Azure training.

Books

There are a number of books on Microsoft Azure. The one geared towards studying for the exam is the “Exam Ref 70-532 Developing Microsoft Azure Solutions” from Microsoft Press. This book is an excellent study resource to accompany all the other materials, as it’s condensed to cover the exam objectives list.

Note: Do NOT rely to heavily on any single study resources, even books.

Here a list of some Free eBooks available for download:

Documentation

The documentation for Azure is an excellent study resource too! It’s been built out pretty heavily and even accepts contributions from the community via GitHub. I really encourage you to browse around the documentation and read, read, read in addition to all of your other study efforts.

Practice Tests

The typical practice test vendors do not currently offer any practice exams for the 70-532 Developing Microsoft Azure Solutions exam. Due to this fact, I actually developed some of my own practice test questions to help me prepare for the exam, and I put them up free for anyone to use!

Take the practice tests: Developing Microsoft Azure Solutions (70-532) Practice Test

While the list of questions I put together is not an exhaustive list, this offers yet another tool you can use to help prepare for the exam. Please don’t complain about the quality or the extensiveness of the questions. It takes a lot of time to write test questions! Also, I put these up on GitHub so feel free to browse the source code, fork it or whatever.

Play Time

It’s fine to get “book smart”, but there certainly is no substitute for just getting in there, playing around and practicing. Something Microsoft offers to encourage this is a Free Trial with $200 to spend on all Azure Services. So go dig in and experiment with how this stuff all works, and get some real world experience that will help you pass the exam. This is not just useful if you’re new to Azure. It’s also very useful if you’ve already been developing on Azure but just haven’t done much with certain features yet. Additionally, if you have an MSDN Subscription, then you already have some free monthly credits to use Azure available to you too.

Exam Study Tips

Here’s a few tips of techniques I use when studying and preparing for certification exams:

  • Make sure to go through each exam objective category and study until you’re comfortable with that topic.
  • Use at minimum 3 study resources on each topic. The variety and repetition will help you retain everything.
  • Play with stuff. “Book smarts” are good, but practical hands-on experience is better.
  • Make flash cards and/or practice test questions to help memorizing the stuff that can be memorized.
  • Don’t be afraid to fail an exam. You will learn what areas you need to focus on better and can always take it again.
  • Give yourself a deadline. Once you’re in a comfortable study pace, estimate when you’ll be ready for the exam and schedule it.
  • Get your family on board to support you spending a significant amount of time outside of work to study.
  • Choose the online proctored exam option when scheduling the exam. This way you can take the exam in a less stressful environment that is the comfort of your own home.

By using the above info, hope I can pass the exam and earn your Azure certification !

info source: http://pietschsoft.com/post/2015/06/06/How-I-passed-the-70-532-Developing-Microsoft-Azure-Solutions-certification-exam

Diary of IT Man – Got a MCSA Windows Server 2016 Certification

Cheers that I got a MCSA Windows Server 2016 certification which I passed the exam in one take yesterday. I just needed to take one Microsoft exam # 70-743 to upgrade my MCITP window server 2008 to MCSA. If anyone want to get info to pass the 70-743, feel free to contact me. Moreover, I have a spare Microsoft exam coupon which will be expired in end of Sept 2017; I can sell it to you in great discount, feel free to contact me.

Although I knew this cert did not have any benefit to my career path, it was just the responsibility of IT guy to update his knowledge as well as academic qualification. IT field updates very fast, and it is very hard for to trace the technology. Let’s keep on learning…

Agile的Scrum項目管理

十年前開始流行的的Project Management Professional (PMP) 和 PRINCE2 項目管理認證,現時有新的競爭者叫 Certified Scrum Master (CSM)認證,現已開始越來越多人留意了。

Scrum是一種新的項目管理的架構,通常為Agile (敏捷)方式的開發工具,而且通常用於軟件開發項目上。Agile/Scrum能夠處理複雜問題,將它們分拆,及優先考慮到單獨的任務中,然後將這些任務委託給最適合解決每個任務的專門團隊成員,所以它被認為較有效率。

以下是兩編bloger文章,很好地介紹Agile/Scrum的應用,值得參考:
Scrum 是什麼(1):雙重回饋機制 –> http://teddy-chen-tw.blogspot.hk/2011/12/scrum-1.html
Scrum 是什麼(2):Scrum 的內涵 –> http://teddy-chen-tw.blogspot.hk/2011/12/scrum-2.html

电信业务信息安全责任承诺书

XXX通信有限公司东莞市分公司:

为切实加强广东联通电信业务的安全使用和规范管理,维护国家安全和社会稳定,保障社会公众利益和公民合法权益,保障其它客户的合法权益,根据国家相关法律法规对信息(注:本承诺书所指的信息,是指运行在贵司的通信和计算机网络上并由我单位负责提供的任何介质的信息,包括但不限于语音信息、移动通信信息、互联网信息等,若相关法律法规对此有专门定义且与本处所指定义不一致的,以相关法律法规规定的为准)安全管理的要求,我单位承诺并保证遵守以下各项规定(以下规定包括通用条款和专用条款,通用条款完全适用于我单位,专用条款中与我单位使用贵司的实际业务情形一致)。
第一部分 通用条款
一、遵守国家有关法律、行政法规、行政规章和贵司的有关规定,严格执行信息安全管理规定。
二、对我单位发送信息的真实性、准确性、合法性负责。我单位发布的内容必须严格遵守《中华人民共和国电信条例》有关规定,不得发布和传播有害信息,不得散发传播违法、不健康反动等信息,不得违规制作、发布、传播任何含有“九不准”内容的信息、不开展“六不许”不允许的内容。
“九不准”,即:
1. 反对宪法所确定的基本原则的;
2. 危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;
3. 损害国家荣誉和利益的;
4. 煽动民族仇恨、民族歧视,破坏民族团结的;
5. 破坏国家宗教政策,宣扬邪教和封建迷信的;
6. 散布谣言,扰乱社会秩序,破坏社会稳定的;
7. 散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;
8. 侮辱或者诽谤他人,侵害他们合法权益的;
9. 含有法律、行政法规禁止的其他内容的。
“六不许”,即:
1. 决不允许在群众中散布违背党的理论和路线方针政策的意见;
2. 决不允许公开发表同中央的决定相违背的言论;
3. 决不允许对中央的决策部署阳奉阴违;
4. 决不允许编造、传播政治谣言及丑化党和国家形象的言论;
5. 决不允许以任何形式泄露党和国家的秘密;
6. 决不允许参与各种非法组织和非法活动。
三、我单位承诺所使用的贵司电信业务不开展与诈骗、骚扰、涉黄、涉恐、危害国家安全和社会稳定相关的违法活动。如因此引发的社会群众投诉和违法责任将由我单位全部承担,当收到工信部、12321、10019、10010等各类投诉举报时,凡有关主管部门、贵司核查确认投诉举报内容涉嫌上述情况的,我单位同意贵司关停涉事电信业务(包括但不限于在不通知我单位的情况下立刻关停业务)。若我单位在经营中发现存在上述情形的,则我单位同意立即整改或责令有关合作单位整改,并及时将有关情况及时报告贵司。
四、我单位承诺使用贵司的电信业务,保证所提供的资料真实性和准确性,并在资料、业务用途等发生变更时及时以正式函通知贵司,凡因我单位提供资料不详或不准确造成我单位无法收到贵司发出的业务通知的,由此产生的一切后果均由我单位承担。
五、我单位未经贵司同意不得以任何形式转租、转售电信业务使用权,与贵司签订入网协议的企业必须是符合贵司要求、使用贵司电信业务且经贵司同意的最终客户。如发现转租、转售行为,贵司有权单方终止所有与我单位相关的合同。
六、我单位有提供电信业务使用用途、开放范围的义务,不按协议约定超范围使用所造成的一切后果由我单位承担。
七、我单位须建立信息安全保密制度和用户信息安全管理制度,做好用户信息加密和保密工作,不得以任何形式向第三方泄漏贵司用户个人资料,遵守工业与信息化部《电信和互联网用户信息保护规定》(工信部令〔2013〕24 号)对个人用户信息进行保护,否则,贵司有权单方终止所有与我单位相关的合同。
八、我单位承诺严格按照国家及工信部对用户实名制的要求办理贵司移动业务(包括移动电话、行业卡)及固定业务(包括固定电话、宽带)等业务入网,根据工业和信息化部于2016年5 月18 日印发《关于贯彻落实<反恐怖主义法>等法律规定进一步做好用户真实身份信息登记工作的通知》(工信部网安〔2016〕182 号),对入网业务严格实名登记通信业务的具体使用人/责任人信息。
九、我单位须建立信息安全责任人联系制度,并报送贵司和通信主管部门,保证贵司和通信主管部门可以随时与该安全责任人沟通联系。贵司向如下责任人发送的信息或拨打的电话、发送的邮件、传真均视为向我单位送达。
信息安全责任人
责任人 姓名 职务 办公电话 手机
第一责任人
第二责任人
第三责任人
单位邮箱 传真电话
注:表中所列事项发生变更时,我单位将在两个工作日之内通知贵司和通信主管部门,因未能及时通知导致信息不能送达的,责任由我单位承担,并视为我单位已经收到相关信息。
十、我单位若涉及使用贵司电信业务进行通信信息发布的,须建立公共信息内容自动过滤系统和人工值班实时监控制度。对于互联网信息,用户上传的公共信息在贵司网站上网发布前,必须经过我单位网站工作人员的人工审核后,方能上网发布。对于语音信息,我单位电话信息台应当有健全的信息审查责任制,指定专人负责实时电话信息审查工作,完善自我约束机制,加强信息内容的审核和管理。若我单位接到有关举报、投诉、监管或其他指控,声称我单位发布的信息有违法违规情形的,则我单位将第一时间启动核查机制,发现属实的,立即整改,并向贵司报告。
十一、我单位承诺若被发现冒用或伪造身份证照、违法使用、违规外呼、呼叫频次异常、超约定用途使用、转租转售、被公安机关通报以及用户就上述问题投诉较多等情况的,贵司核实确认后,贵司有权立即停止所有电信业务接入服务,且不负任何违约责任。
十二、我单位如出现任何违反此承诺书中承诺的情况,自愿承担违约责任(包括但不限于在不通知我单位的情况下关停业务,直至单方面终止业务合作协议),接受有关部门的处理,包括但不限于限期整改、公开曝光,并承担相应的法律责任等。贵司有权立即停止所有电信业务接入服务,且不负任何违约责任,一切责任后果全部由我单位自行承担,无论我单位与贵司的合同中是否有与此相反的约定。
十三、我单位接受贵司及国家相关部门的管理、监督和检查,有责任和义务积极配合贵司查找、清除非法网络行为,直至按要求处理完毕。
十四、如有其它影响网络安全和信息安全的突发事件,贵司有权采取紧急措施(包括但不限于暂停提供网络服务),以保证网络安全。
十五、如法律或国家主管部门对信息安全管理有新要求,我单位将无条件配合贵司落实相关整改举措,直至符合相关法律及政策文件要求。
十六、若因我单位违反本承诺书的约定给贵司造成损失(包括但不限于被罚款、向其他第三方赔偿)的,我单位同意全额赔偿因此给贵司造成是损失(包括但不限于律师费、诉讼费、调查费、保全费等)。
十七、此承诺书经我单位签署盖章后立即生效,可作为与贵司业务合同的附件,与业务合同具有同等的法律效力,本承诺书赋予我单位更重义务且与业务合同不一致的,我单位同意贵司可以选择适用本承诺书的条款。
第二部分 语音专线业务条款
一、本承诺书适用的语音专线服务范围包括但不限于普通语音专线、呼叫中心直连业务、本地电话、集线通、商E通、沃企总机等语音接入类业务。同时,贵司语音专线业务呼转功能默认为关闭。
二、我单位承诺所使用的贵司语音专线业务的主叫号码为贵司或工信部分配的号码,传送真实有效主叫号码或号段,不隐藏、变更或转租、转售号码。
三、在使用语音专线接入呼叫中心平台的情况下,我单位承诺建立有效的信息安全管理制度和技术保障措施,确保备份呼叫内容录音文件,并接受相关主管部门的管理、监督和检查,为相关主管部门提供技术支持。
四、我单位承诺合法规范使用贵司提供的语音专线业务,包括但不限于:不利用语音专线业务传播非法内容或泄露国家机密,不违规经营、不变更合同约定用途,不隐藏、变更或转租、转售语音专线主叫号码,不开展无特定主被叫的话务批发业务,不私自转接国际来话,不通过技术手段为非法VoIP、改号电话、网络电话(PC软件/APP等)提供语音落地,不采取自动语音群呼方式进行外呼,不经营国家工业和信息化部不允许的业务(如话务批发、落地)。
五、我公司承诺语音专线使用时段及频次,如下:
1.使用时段为:□上午8:00-下午20:00 □其他时段: _______-______________;
2.使用频次为:_____不超过300次/天/号码 。
(1)不针对某一号码进行频繁违规呼叫(违规定义:超出承诺使用时段和频次即为频繁;违规定义:贵司收到上级主管部门下发通报、贵司收到的客户直接投诉或上级主管部门转来的投诉、贵司收到上级主管部门下发的专项规定均视为我单位违规);
(2)每条语音专线号码呼出次数不得超过__30__次/小时,如我单位因正常业务原因将超过该约定须提前至少3个工作日提交加盖我单位公章的申请函至贵司(违规定义:我单位未提前向贵司提交申请函的情况下,贵司监测到我单位某条或多条语音专线号码呼出次数超过了上述约定均视为我单位违规)。

特此承诺。

承诺方(单位全称):XXX有限公司
法定代表人或授权委托人姓名:
单位地址:
联系人姓名:
联系人电话:
[法定代表人或授权委托人签字]:
承诺方[单位公章]:
[日期]:20 年 月 日

IT人在工廠日記 – 煙花消逝二十年

昨天看到新聞,關於香港回歸20年的成就,使我感到可笑和可悲。另外,新聞報導李源潮說:香港回歸20年,一國兩制取得舉世公認成功。事實上,香港已接近一國一制了。老董說過:中國好,香港更好。其實,中國需要香港時,香港才會好,但是中國好時,便不需要香港,香港又怎會好呢 !

現時,我覺得香港的地位,只是大陸的一個普通城市,比不上北京、上海、廣州等地…,很令我這香港仔感觸。

忽然想起一個網台節目特輯,叫 “煙花消逝十五年”,現時亦可應景地叫 “煙花消逝二十年”。希望各位回味,所以抄到本頁分享,資料來源為 http://www.ourradio.hk/ 網站,但現時已下架了 ,希望他們不介意分享。

工務員 I

工務員 II

金融 I

金融 II

工作轉型 I

工作轉型 II

传媒 I

传媒 II

地產 I

地產 II

國內生育 I

教育 I

教育 II

運輸 I

運輸 II

視聽制作 I

視聽制作 II

六四

IT人在工廠日記 – 念六四

道念六四,尤其是六四或英魂! 想忘記,不能忘,這是慘痛的中國近代歴史!願早日平反六四!

硬漢子李旺陽慘死

 

坦克人王维林(下落不明)

 

Wanna Cry 勒索病毒

近日熱門的網络安全話題是WannaCry勒索病毒,所以我也搜索一些相關文章和解決方法,分享出來。

香港微軟官方最新消息 (13/5 11:59pm)

Microsoft掌握到這個勒索軟件 “WannaCrypt” 和網路攻擊已經影響數個區域的不同行業。我們的安全團隊已迅速採取行動來保護我們的客戶,並已經增修最新偵測與防護功能以避免新的勒索軟件威脅(例如: 知名病毒軟件:Win32.WannaCrypt.) 。

今年3月份,我們已經發布了一個安全更新 (security updates),堵塞了這些攻擊所利用的漏洞。啟用Windows Update的用戶可以防止對此漏洞的攻擊。對於尚未應用安全更新的組織,我們建議您立即部署Microsoft安全公告MS17-010。對於已經安裝我們免費提供的防毒軟件,對該勒索軟件應可以有效偵測並清除,我們強烈建議用戶執行Windows Update 並持續更新,以降低被惡意攻擊的風險。

對於使用Windows Defender的客戶,我們今天稍早時間發布了一個檢測到Ransom:Win32 / WannaCrypt的威脅的更新。作為額外的“深度防禦”措施,請保持安裝最新反惡意軟件軟件。目前Windows Defender已經可以針對發作中的惡意程式,有效的偵測並清除;使用者可以從下列位置下載 Windows Defender: https://support.microsoft.com/zh-hk/help/14210/security-essentials-download

此外,我們正為所有客戶提供額外安全更新,以保護適用於早期Windows 軟件包括Windows Windows XP,Windows 8和Windows Server 2003的Windows平台。請使用以下連結下載安全更新: Windows Server 2003 SP2 x64, Windows Server 2003 SP2 x86,Windows XP SP2 x64, Windows XP SP3 x86, Windows XP Embedded SP3 x86,Windows 8 x86, Windows 8 x64

據我們瞭解,這個勒索軟件攻擊並沒有針對Windows 10,只要有下載3月份安全更新已能夠有效地防禦這次攻擊。我們藉此再次呼籲客户盡快升級Windows 10 ,並積極考慮落實部署Microsoft 企業級雲端服務,以時刻確保保安措施是最新版本,為客户提供最強大的防禦。企業用戶可以隨時聯繫Microsoft的客戶經理查詢。

客戶如有任何查詢,可致電Microsoft 香港客戶服務中心電話:+852 2388 9600

解決方案 from –> Youtube video as below

解決方案 from –> https://unwire.hk/2017/05/13/wannacry-wcry/tech-secure/

未中伏前解決方案:

Step 0 :

甚麼都不用說,先斷網絡進行備份!

星期一上班,我可以開電腦嗎 ?

先切斷網絡,移除 lan 線 /關掉 wifi ,用你的方法停止電腦接上網絡。開機後立即備份重要檔案,緊記別備份在本機或網絡磁碟上。

 

(免責聲明 : 修改 Windows 有風險請先備份,如因以下方法導致任何損失,本網恕不負責)

 

Step 1: 鎖埠

透過路由器 / 防火牆封鎖 139 及 445 埠

 

A)路由器 : 

B) Windows 防火牆

如果你無法更改公司伺服器設定可以設定 Windows 防火牆,安全的話可以考慮先移除 LAN 線 / 關閉 Wifi

 

Step 1:

按 WIN + R 鍵 ,鍵入 firewall.cpl 按 enter

Step 1:
如果你 Firewall 未開啟,請按「請用建議的設定」去開啟

Step 2:

如已開啟了(綠色),請按左邊進階設定

 

Step 3:

左側按 輸入規則 > 右側按 新增規則

 

Step 4 :

選擇 通訊協定及連接埠,選 連接埠

 

Step 5 :

如下圖選擇 TCP , 特定本機連接埠選 445 ,139 ,下一步

Step 6:

選擇封鎖連線,下一步

 

Step 7:

套用所有規則,下一步

 

Step 8 :

隨意命名,完成

Step 9 

重覆 Step 3 至 4 , 今次我們選擇 UDP , 特定本機連接埠選 445 ,139 ,下一步。重覆 Step 6 至 8

 

XP 用家可參考這個方法

改成阻檔 TCP 及 UDP 445 , 139

Step 2 :

你應該快安裝修正檔 !

 

Windows 10 

去 Windows 更新便可

 

Windows 8.1 64:

http://download.windowsupdate.com/c/msdownload/update/software/secu/2017/05/windows8.1-kb4019215-x64_d06fa047afc97c445c69181599e3a66568964b23.msu

Windows 8.1 32:
http://download.windowsupdate.com/c/msdownload/update/software/secu/2017/05/windows8.1-kb4019215-x86_fe1cafb988ae5db6046d6e389345faf7bac587d7.msu

Windows 7 64:
http://download.windowsupdate.com/c/msdownload/update/software/secu/2017/05/windows6.1-kb4019264-x64_c2d1cef74d6cb2278e3b2234c124b207d0d0540f.msu

Windows 7 32:
http://download.windowsupdate.com/c/msdownload/update/software/secu/2017/05/windows6.1-kb4019264-x86_aaf785b1697982cfdbe4a39c1aabd727d510c6a7.msu

==

其他舊版 Windows 已推出安全性更新

 

Windows Server 2003 SP2 x64,

Windows Server 2003 SP2 x86,

Windows XP SP2 x64,

Windows XP SP3 x86,

Windows XP Embedded SP3 x86,

Windows 8 x86,

Windows 8 x64

 

 

<官方修正檔網址>

 

 

======

如以上方法失效,你可以..

 

 手動停止 Windows  SMBv1 服務

如何你無法修改路由器設定,你可以通用系統管理員權限修改以下設定

 

Windows 7/Sever 2008 / Vista 用家:

Step 1

以系統管理員登入,執行regedit

 

Step 2 

HKEY_LOCAL_MACHINESystemCurrentControlSetServicesLanmanServerParameters
找空白處按右鍵新增 DWORD key SMB1, 其數值為 0 (日後成功執行修正檔的話,可把數值由 0 改回 1 )

 

 

 

 

Windows 8 或以上 :

Step 1

右按以管理員執行 CMD

Step 2

鍵入powershell (Enter)

set-ExecutionPolicy Unrestricted   (Enter)

set-SmbServerConfiguration -EnableSMB1Protocol $false (Enter)

看到提示後選 Y

 

成功後重新開機便成功

(日後成功執行修正檔的話,照以上方法,最後一次由 $false 改為 $true )

=====

為何我之前一直有更新,一樣中伏 ?

因為資料顯示此病毒有潛伏期,設定為 5  月 12 附近的日子爆發 ! 因此有可能在你電腦自動更新前已中招潛服在內,以下圖片顯示就算你電腦無連網絡,潛伏於電腦內的病毒照樣爆發。

中伏後解決方案 :

檔案已被加密了怎算 ?

1) 修復檔案

由於加密的過程是這樣的 :

1. 從原檔產生新的加密檔

2. 把原檔刪除

理論上,我們可以利用平時「undelete」的軟件把刪除的檔案救回來,只要那個區域未被新資料覆寫上去就有機會救回。如發現你的硬碟已被感染,請即關機。把硬碟取出搬到「無毒」的電腦上進行修復,方法可以參考 <這裡>的「救 DATA 篇」,不過有心理準備,只有部份檔案可 100% 救回來。

 

2) WNcry@2ol7 非解鎖密碼

Twitter 瘋傳 WNcry@2ol7 是解鎖密碼 ,但其實只是病毒一部份既解壓碼,用來解壓自己其中的 module繼續攻擊,有部份防毒軟件掃瞄不到有密碼的 zip 檔,所以部份病毒會用法方法加密自己的文件。

 

3)付款不等於會收到解密 

由於今次 BITCOIN 收款的地址是統一的,因此開發者無法證明支付者身份,任何人都可以冒認你跟病毒開發者說已付了帳,理論上會提供解密密碼機會很低。話雖如此,Bitcoin 追蹤資料顯示直到現時為止已有 23 單個交易,開發者收取了4.26616859 BITCOIN (現價計算的話,總值 7,210 美元)

 

4)勿亂安裝不明來歷的破解工具

Wanna Decrytor 暫時未有任何通用解密方法,可是中國網上已有很多所謂的破解工具,但其實檔案被加密後,那隨機密碼不可能用你自家電腦的運算力於短時間內破解,因此這類破解檔很多時是木馬程式,安裝後找尋 PC 內銀行或信用咭密碼,讓你受二次傷害